Skip to content

Group cuvis_async

Modules > cuvis_async

The Async Capabilites of the SDK. More...

Public Functions

Type Name
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_async_call_free (CUVIS_ASYNC_CALL_RESULT * io_pAsyncResult)
Free an async call result without calling it.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_async_call_get (CUVIS_ASYNC_CALL_RESULT * io_pAsyncResult, CUVIS_INT timeout_ms)
get the result of a async call.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_async_call_status (CUVIS_ASYNC_CALL_RESULT i_pAsyncResult, CUVIS_STATUS * io_pStatusResult)
checks the status of the async call object and returns it
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_async_capture_free (CUVIS_ASYNC_CAPTURE_RESULT * io_pAsyncResult)
Free an async measurement result without calling it.
SDK_CAPI CUVIS_STATUS SDK_CCALL cuvis_async_capture_status (CUVIS_ASYNC_CAPTURE_RESULT i_pAsyncResult, CUVIS_STATUS * io_pStatusResult)
checks the status of the async capture object and returns it

Detailed Description

The functions of the sdk with depend on either setting a state of the camera, or awaiting image data from the camera have async variations of themself. This includes most of the setter of the acqusition context as well as cuvis_acq_cont_capture.

The non async version of these functions execute the respective task and block as long as it takes. The async counterpart function call completes immediately and returns the handle to an aync result or async Measurement.

Theses async handles can then be used to check the state of the respective function call.

Public Functions Documentation

function cuvis_async_call_free

Free an async call result without calling it.

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_async_call_free (
    CUVIS_ASYNC_CALL_RESULT * io_pAsyncResult
) 


function cuvis_async_call_get

get the result of a async call.

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_async_call_get (
    CUVIS_ASYNC_CALL_RESULT * io_pAsyncResult,
    CUVIS_INT timeout_ms
) 

Get the return code (and error message, if applicable) of an async function, that has been called. If result is not status_ok use the cuvis_get_last_error_msg function to get details.

If the timeout is used (value above 0ms), status_timeout or status_deferred will be returned, if the function is not yet finished. In that case, the asyncResult handle is still valid and can be used again. If the result is status_ok the function has finished. For both status_ok and status_error, the handle is now invalid.

If the result is status_overwritten the function's call was overwritten by another (similar) call. The actual value set by this async function was not used, but the one of the other call. On this result, the handle is now invalid.

Parameters:

  • io_pAsyncResult the async handle obtained by calling a async function. If the call finished, the handle will be invalidated
  • timeout_ms the timeout in ms. Give 0 to wait for ever.

Returns:

status_ok if the async function finished successfully. status_timeout or status_deferred will be returned, if the function is not yet finished. If the call failed, because it was overwritten it this function will return status_overwritten. If it failed for other reasons, the this function returns status_error.


function cuvis_async_call_status

checks the status of the async call object and returns it

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_async_call_status (
    CUVIS_ASYNC_CALL_RESULT i_pAsyncResult,
    CUVIS_STATUS * io_pStatusResult
) 


function cuvis_async_capture_free

Free an async measurement result without calling it.

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_async_capture_free (
    CUVIS_ASYNC_CAPTURE_RESULT * io_pAsyncResult
) 


function cuvis_async_capture_status

checks the status of the async capture object and returns it

SDK_CAPI  CUVIS_STATUS  SDK_CCALL cuvis_async_capture_status (
    CUVIS_ASYNC_CAPTURE_RESULT i_pAsyncResult,
    CUVIS_STATUS * io_pStatusResult
)