24
Callback function
Data type
numid
prefix
onDataStreamEvent
DataStreamData
EVENT_DATA_NUMID_DATASTREAM_
Data stream module – Data Stream category
Callback function
Data type
numid
prefix
onCicEvent
CicData
EVENT_DATA_NUMID_CIC_
Device module – CIC category
Callback function
Data type
numid
prefix
onIoToolboxEvent
IoToolboxData
EVENT_DATA_NUMID_IO_TOOLBOX_
Interface module – I/O Toolbox category
Callback function
Data type
numid
prefix
onCxpInterfaceEvent
CxpInterfaceData
EVENT_DATA_NUMID_CXP_INTERFACE_
Interface module – CXP Interface category
Examples
We'll soon show a few complete
illustrating events and callbacks, but there
is one more thing we need to explain before we can do that: the context in which callback
functions are executed. This is the subject of the
5.5. EGrabber flavors
When should the callback functions be called? From which context (i.e., which thread)?
Thinking about these questions leads to the definition of several
callback models
:
n
The application asks the grabber:
"Do you have any buffer or event for me? If yes, execute my
callback function now."
This is a polling, synchronous mode of operation, where callbacks are
executed when the application demands it, in the application thread.
We'll refer to this callback model as
on demand
.
n
The application asks the grabber to create a single, dedicated thread, and to wait for events
in this thread. When an event occurs, the grabber executes the corresponding callback
function, also in this single callback thread.
We'll refer to this callback model as
single thread
.
Coaxlink
Programmer Guide
5. Euresys::EGrabber