User`s guide

7
Using Events and Callbacks
You can enhance the power and flexibility of your image acquisition
application by using event callbacks. An event is a specific o ccurrence that
can happen while an image acquisition object is running. The toolbox defines
a set of events that include starting, stopping, or acquiring frames of data.
When a particular event occurs, the toolbox can execute a function that you
specify. This is called a callback. Certain events can result in one or more
callbacks. You can use callbacks to perform processing tasks while your image
acquisition object continues running. For example, you can display a message,
analyze data, or perform other tasks. The start and stop callbacks, however,
execute synchronously; the object does not perform any further processing
until the callback function finishes.
Callbacks are controlled through video input object properties. Each event
type has an associated property. Yo u specify the function that you want
executed as the value of the property.
Example: Using the Default
Callback F unction (p. 7-2)
Introduces events and callbacks by
showing a simple example
Event Types (p. 7-4)
Defines all the event types supported
by the toolbox
Retrieving Event Information (p. 7-7)
Describes the information generated
with each event and describes how
to access it
Creating and Executing Callback
Functions (p. 7-12)
Describes how to write a callback
function and associate it with an
event callback