The Image
Acquisition Toolbox™ engine requires that every
adaptor export five functions. The toolbox calls these functions to
communicate with the device and acquire data. One of your primary
tasks as an adaptor writer is to provide implementations of these
functions. The following table lists these five exported functions
with pointers to sections that provide more detail about how to implement
the function. The Demo adaptor included with the Image
Acquisition Toolbox software
contains sample implementations of these functions in the file mwdemoimaq.cpp
.
Export Function | Purpose |
---|---|
| Performs any initialization required by your adaptor or your device's SDK. See Performing Adaptor and Device SDK Initialization. |
| Provides the toolbox engine with information about the device (or devices) available through your adaptor |
| Specifies the video source, device-specific properties, and hardware trigger information, if supported. See Defining Device-Specific Properties. |
| Instantiates an object of a C++ class that represents the communication between the toolbox and the device. Note: Because you cannot create a stub of this function until you define an adaptor class, this function is described in Defining Your Adaptor Class. |
| Performs any cleanup required by your adaptor and unloads the adaptor DLL. See Unloading Your Adaptor DLL. |
The following figure shows the flow of control between the MATLAB® command line, the toolbox engine, and the exported adaptor functions. Note that the figure does not show how the adaptor communicates with the device's SDK to get information. This varies with each device's SDK.
Flow of Control Among MATLAB, Toolbox Engine, and Adaptor