Group cuvis_worker
Public Functions
| Type | Name |
|---|---|
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_create (CUVIS_WORKER * o_pWorker, CUVIS_WORKER_SETTINGS worker_settings) Create a Worker. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_drop_all_queued (CUVIS_WORKER i_worker) Command the worker to discard all measurements it is currently processing and empty the result queue. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_free (CUVIS_WORKER * io_pWorker) release a worker |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_get_can_drop_results (CUVIS_WORKER i_worker, CUVIS_INT * o_pCanDrop) Query current drop behavior. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_get_can_skip_measurements (CUVIS_WORKER i_worker, CUVIS_INT * o_pCanSkip) Query current skip behavior. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_get_can_skip_supplementary (CUVIS_WORKER i_worker, CUVIS_INT * o_pCanSkip) Query current skip behavior. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_get_input_queue_limit (CUVIS_WORKER i_worker, CUVIS_SIZE * o_pInputQueueLimit) Query the maximum queue size of the input queue. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_get_mandatory_queue_limit (CUVIS_WORKER i_worker, CUVIS_SIZE * o_pMandatoryLimit) Query the maximum queue size of the mandatory queue. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_get_next_result (CUVIS_WORKER i_worker, CUVIS_MESU * o_pMesu, CUVIS_VIEW * o_pView, CUVIS_SIZE i_Timeout_ms) Get the next result in order. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_get_output_queue_limit (CUVIS_WORKER i_worker, CUVIS_SIZE * o_pOutputQueueLimit) Query the maximum queue size of the output queue. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_get_queue_used (CUVIS_WORKER i_worker, CUVIS_INT * o_pQueueUsed) Query the number of items currently in the result queue. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_get_state (CUVIS_WORKER i_worker, CUVIS_WORKER_STATE * o_pWorkerState) Query multiple attributes of the worker at once, see cuvis_worker_state_t . |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_get_supplementary_queue_limit (CUVIS_WORKER i_worker, CUVIS_SIZE * o_pSupplementaryLimit) Query the maximum queue size of the supplementary queue. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_get_threads_busy (CUVIS_WORKER i_worker, CUVIS_INT * o_pThreadsBusy) Query how many measurements the worker is processing right now. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_has_next_result (CUVIS_WORKER i_worker, CUVIS_INT * o_pHasNext) Check, if a new worker result is available. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_ingest_mesu (CUVIS_WORKER i_worker, CUVIS_MESU i_mesu) Push a mesurement into the worker to process. Worker must have neither a session file nor an acquisition context. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_ingest_session_file (CUVIS_WORKER i_worker, CUVIS_SESSION_FILE i_session_file, const char * i_frame_selection) set a session file for the worker to process (read access only). Give CUVIS_HANDLE_NULL to clear. Set parameter SkipDroppedFrames to 1 to skip any dropped frames contained in the session - 0 will insert empty frames. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_is_processing (CUVIS_WORKER i_worker, CUVIS_INT * o_pIsProcessing) Query wether the worker is currently allowed to process measurements - wether it is running. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_is_processing_mandatory (CUVIS_WORKER i_worker, CUVIS_INT * o_pProcessingMandatory) Query wether the processing step is currently mandatory The result is only valid, if a processing context is assigned to the worker. If no processing context is assigned, will always return 0 (false) |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_query_session_progress (CUVIS_WORKER i_worker, double * o_frames_read) Get the current percentage of frames done of the current session. -1.0 if no session file is currently being processed. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_set_acq_cont (CUVIS_WORKER i_worker, CUVIS_ACQ_CONT i_acq_cont) set the acquistion context for the worker. Give CUVIS_HANDLE_NULL to clear |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_set_exporter (CUVIS_WORKER i_worker, CUVIS_EXPORTER i_exporter) set the exporter for the worker. Give CUVIS_HANDLE_NULL to clear |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_set_proc_cont (CUVIS_WORKER i_worker, CUVIS_PROC_CONT i_proc_cont) set the processing context for the worker. Give CUVIS_HANDLE_NULL to clear |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_set_viewer (CUVIS_WORKER i_worker, CUVIS_VIEWER i_viewer) set the viewer for the worker. Give CUVIS_HANDLE_NULL to clear |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_start (CUVIS_WORKER i_worker) Start the worker. |
| SDK_CAPI CUVIS_STATUS SDK_CCALL | cuvis_worker_stop (CUVIS_WORKER i_worker) Pause the worker. |
Public Functions Documentation
function cuvis_worker_create
Create a Worker.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_create (
CUVIS_WORKER * o_pWorker,
CUVIS_WORKER_SETTINGS worker_settings
)
The encapsulates the functions of the Acquisiton Context, Processing Context, Exporter, and Viewer into a single container and manages the communications between these. It also enables multi-threaded operation
Note:
The set functions need to be called in order for the worker to be enabled.
Parameters:
o_pWorkerThe worker handle to be createdworker_settingsThe worker configuration
function cuvis_worker_drop_all_queued
Command the worker to discard all measurements it is currently processing and empty the result queue.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_drop_all_queued (
CUVIS_WORKER i_worker
)
function cuvis_worker_free
release a worker
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_free (
CUVIS_WORKER * io_pWorker
)
function cuvis_worker_get_can_drop_results
Query current drop behavior.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_get_can_drop_results (
CUVIS_WORKER i_worker,
CUVIS_INT * o_pCanDrop
)
Parameters:
i_workerThe worker handleo_pCanDropIf 1, the worker is allowed to drop results when the output queue is full
function cuvis_worker_get_can_skip_measurements
Query current skip behavior.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_get_can_skip_measurements (
CUVIS_WORKER i_worker,
CUVIS_INT * o_pCanSkip
)
Parameters:
i_workerThe worker handleo_pCanSkipIf 1, the worker is allowed to entirely skip processing measurements, if the mandatory queue is full
function cuvis_worker_get_can_skip_supplementary
Query current skip behavior.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_get_can_skip_supplementary (
CUVIS_WORKER i_worker,
CUVIS_INT * o_pCanSkip
)
Parameters:
i_workerThe worker handleo_pCanSkipIf 1, the worker is allowed to skip supplementary processing of measurements, if the supplementary queue is full
function cuvis_worker_get_input_queue_limit
Query the maximum queue size of the input queue.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_get_input_queue_limit (
CUVIS_WORKER i_worker,
CUVIS_SIZE * o_pInputQueueLimit
)
Parameters:
i_workerThe worker handleo_pInputQueueLimitThe maximum size of the input queue
function cuvis_worker_get_mandatory_queue_limit
Query the maximum queue size of the mandatory queue.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_get_mandatory_queue_limit (
CUVIS_WORKER i_worker,
CUVIS_SIZE * o_pMandatoryLimit
)
Parameters:
i_workerThe worker handleo_pMandatoryLimitThe maximum size of the mandatory queue. This is also the maximum number of measurements processed simultaneously
function cuvis_worker_get_next_result
Get the next result in order.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_get_next_result (
CUVIS_WORKER i_worker,
CUVIS_MESU * o_pMesu,
CUVIS_VIEW * o_pView,
CUVIS_SIZE i_Timeout_ms
)
The measurement will be readyly recorded, processed (if set), stored (if set) and have a view (if set).
Parameters:
i_workerThe worker handleo_pMesuThe recorded measurement or NULL if recording failedo_pViewThe view, if calculated sucessfully, else NULLi_Timeout_msThe number of milliseconds to wait for a result. -1 to wait indefinitely
Returns:
status_ok or on error: status_error, status_not_processed, status_not_stored, or status_no_view, or status_not_available
function cuvis_worker_get_output_queue_limit
Query the maximum queue size of the output queue.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_get_output_queue_limit (
CUVIS_WORKER i_worker,
CUVIS_SIZE * o_pOutputQueueLimit
)
Parameters:
i_workerThe worker handleo_pOutputQueueLimitThe maximum size of the output queue
function cuvis_worker_get_queue_used
Query the number of items currently in the result queue.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_get_queue_used (
CUVIS_WORKER i_worker,
CUVIS_INT * o_pQueueUsed
)
Parameters:
i_workerThe worker handleo_pQueueUsedThe number of results currently in the output queue
function cuvis_worker_get_state
Query multiple attributes of the worker at once, see cuvis_worker_state_t .
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_get_state (
CUVIS_WORKER i_worker,
CUVIS_WORKER_STATE * o_pWorkerState
)
Parameters:
i_workerThe worker handleo_pWorkerStateCollection of worker stats
function cuvis_worker_get_supplementary_queue_limit
Query the maximum queue size of the supplementary queue.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_get_supplementary_queue_limit (
CUVIS_WORKER i_worker,
CUVIS_SIZE * o_pSupplementaryLimit
)
Parameters:
i_workerThe worker handleo_pSupplementaryLimitThe maximum size of the supplementary queue. This is also the maximum number of measurements processed simultaneously
function cuvis_worker_get_threads_busy
Query how many measurements the worker is processing right now.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_get_threads_busy (
CUVIS_WORKER i_worker,
CUVIS_INT * o_pThreadsBusy
)
Parameters:
i_workerThe worker handleo_pThreadsBusyThe number of measurements currently being processed
function cuvis_worker_has_next_result
Check, if a new worker result is available.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_has_next_result (
CUVIS_WORKER i_worker,
CUVIS_INT * o_pHasNext
)
Parameters:
i_workerThe worker handleo_pHasNext1 if a result is available now, else 0
function cuvis_worker_ingest_mesu
Push a mesurement into the worker to process. Worker must have neither a session file nor an acquisition context.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_ingest_mesu (
CUVIS_WORKER i_worker,
CUVIS_MESU i_mesu
)
function cuvis_worker_ingest_session_file
set a session file for the worker to process (read access only). Give CUVIS_HANDLE_NULL to clear. Set parameter SkipDroppedFrames to 1 to skip any dropped frames contained in the session - 0 will insert empty frames.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_ingest_session_file (
CUVIS_WORKER i_worker,
CUVIS_SESSION_FILE i_session_file,
const char * i_frame_selection
)
function cuvis_worker_is_processing
Query wether the worker is currently allowed to process measurements - wether it is running.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_is_processing (
CUVIS_WORKER i_worker,
CUVIS_INT * o_pIsProcessing
)
Parameters:
i_workerThe worker handleo_pIsProcessingIf 1, the worker is allowed process measurements. This does not mean, that it is currently working on a measurement - see cuvis_worker_get_threads_busy
function cuvis_worker_is_processing_mandatory
Query wether the processing step is currently mandatory The result is only valid, if a processing context is assigned to the worker. If no processing context is assigned, will always return 0 (false)
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_is_processing_mandatory (
CUVIS_WORKER i_worker,
CUVIS_INT * o_pProcessingMandatory
)
Parameters:
i_workerThe worker handleo_pProcessingMandatoryIf 1, the appying the processing context to the measurement is part of the mandatory processing steps
function cuvis_worker_query_session_progress
Get the current percentage of frames done of the current session. -1.0 if no session file is currently being processed.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_query_session_progress (
CUVIS_WORKER i_worker,
double * o_frames_read
)
function cuvis_worker_set_acq_cont
set the acquistion context for the worker. Give CUVIS_HANDLE_NULL to clear
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_set_acq_cont (
CUVIS_WORKER i_worker,
CUVIS_ACQ_CONT i_acq_cont
)
function cuvis_worker_set_exporter
set the exporter for the worker. Give CUVIS_HANDLE_NULL to clear
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_set_exporter (
CUVIS_WORKER i_worker,
CUVIS_EXPORTER i_exporter
)
function cuvis_worker_set_proc_cont
set the processing context for the worker. Give CUVIS_HANDLE_NULL to clear
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_set_proc_cont (
CUVIS_WORKER i_worker,
CUVIS_PROC_CONT i_proc_cont
)
function cuvis_worker_set_viewer
set the viewer for the worker. Give CUVIS_HANDLE_NULL to clear
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_set_viewer (
CUVIS_WORKER i_worker,
CUVIS_VIEWER i_viewer
)
function cuvis_worker_start
Start the worker.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_start (
CUVIS_WORKER i_worker
)
function cuvis_worker_stop
Pause the worker.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_worker_stop (
CUVIS_WORKER i_worker
)