IMAQdxRegisterFrameDoneEvent

NI-IMAQdx Function Reference

IMAQdxRegisterFrameDoneEvent

Format

rval = IMAQdxRegisterFrameDoneEvent (IMAQdxSession id, unsigned int bufferInterval, FrameDoneEventCallbackPtr callbackFunction, void *callbackData);

Purpose

Configures the NI-IMAQdx driver to execute a callback function when a frame done event occurs.

Note  Make sure that the code inside the callback is thread safe since the callback executes in a different thread.

Parameters

Parameter Type Description
id IMAQdxSession A valid Session ID, which you can obtain using IMAQdxOpenCamera.
bufferInterval unsigned int The number of images to acquire before executing the callback function. Specify a buffer interval of 1 to receive a callback for every buffer.
callbackFunction FrameDoneEventCallbackPtr The address of the callback function.
callbackData void * A pointer to user-defined data passed to the event function.

Return Value

On success, this function returns IMAQdxErrorSuccess. On failure, this function returns an error code. You can obtain a more detailed error message with IMAQdxGetErrorString.