User`s guide
3 Providing Hardware Information
3-2
Using Adaptor Exported Functions
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
initializeAdaptor() Performs any initialization required by your adaptor or your device's
SDK. See “Performing Adaptor and Device SDK Initialization” on
page 3-7.
getAvailHW() Provides the toolbox engine with information about the device (or
devices) available through your adaptor
getDeviceAttributes() Specifies the video source, device-specific properties, and hardware
trigger information, if supported. See “Defining Device-Specific
Properties” on page 6-2.
createInstance() 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” on page 4-2.
uninitializeAdaptor() Performs any cleanup required by your adaptor and unloads the
adaptor DLL. See “Unloading Your Adaptor DLL” on page 3-19.
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.