imgSessionWaitSignalAsync
Usage
rval imgSessionWaitSignalAsync(SESSION_ID sid, uInt32 signal, uInt32 state, CALL_BACK_PTR function, void* data);
Purpose
Waits for a signal to be in a given state and when the signal is in that state, calls a user-defined function.
Note This function is obsolete. The replacement function is imgSessionWaitSignalAsync2, which incorporates the functionality of imgSessionWaitSignalAsync but also returns additional information. |
Parameters
Name | Type | Direction |
sid | SESSION_ID | input |
signal | uInt32 | input |
state | uInt32 | input |
function | CALL_BACK_PTR | input |
data | void* | input |
rval | Int32 | output |
Parameter Discussion
sid: valid SESSION_ID.
signal: signal to wait for. The signal can one of the following constants:
IMG_AQ_IN_PROGRESS | Asserted when the device initiates an acquisition either through a software- or hardware-triggered start. |
IMG_AQ_DONE | Asserted at the end of an acquisition when the last piece of data has been transferred to memory. |
IMG_FRAME_START | Asserted at the start of acquisition into each image buffer. |
IMG_FRAME_DONE | Asserted at the end of acquisition into each image buffer. |
IMG_BUF_COMPLETE | Asserted when an image buffer has been transferred to memory and is available for image processing. |
IMG_EXT_TRIG0 | Specifies the external trigger 0. |
IMG_EXT_TRIG1 | Specifies the external trigger 1. |
IMG_EXT_TRIG2 | Specifies the external trigger 2. |
IMG_EXT_TRIG3 | Specifies the external trigger 3. |
IMG_EXT_RTSI0 | Specifies RTSI line 0. |
IMG_EXT_RTSI1 | Specifies RTSI line 1. |
IMG_EXT_RTSI2 | Specifies RTSI line 2. |
IMG_EXT_RTSI3 | Specifies RTSI line 3. |
IMG_EXT_RTSI4 | Specifies RTSI line 4. |
IMG_EXT_RTSI5 | Specifies RTSI line 5. |
IMG_EXT_RTSI6 | Specifies RTSI line 6. |
Note IMG_EXT_TRIG ‹0..3› refers to the external trigger lines of the image acquisition device. IMG_EXT_RTSI ‹0..6› refers to the internal pins on the RTSI controller of the image acquisition device. |
state: state of the signal to wait for. state can be one of the following constants:
IMG_SIGNAL_STATE_RISING | Waits for a rising edge. |
IMG_SIGNAL_STATE_FALLING | Waits for a falling edge. |
IMG_SIGNAL_STATE_HIGH | Returns immediately if the signal is high. Otherwise, waits for a rising edge. |
IMG_SIGNAL_STATE_LOW | Returns immediately if the signal is low. Otherwise, waits for a falling edge. |
function: pointer to the callback function. Your function should match the following prototype:
uInt32(*function)(SESSION_ID sid, IMG_ERR err, uInt32 signal, void* userdata)
Note The return value of the callback function determines the behavior of the driver for subsequent signal assertions. Return zero to disregard future signal assertions. Return a non-zero value to reinstate the callback function. |
data value that is passed to the callback function. The value can be a pointer to user data.
Return Value
This function returns 0 on success. On failure, this function returns an error code. For information about the error code, call imgShowError.
For more information, refer to the Obsolete functions topic.