User`s guide

Looking at the Demo Adaptor
1-9
DemoAdaptor.h
After viewing the exported functions, take a look at the definition of the DemoAdaptor
class in DemoAdaptor.h. The adaptor class is a subclass of the IAdaptor class, which
defines the virtual functions an adaptor must implement. This header file contains
comments that explain the purpose of each member function.
DemoAdaptor.cpp
After seeing the definition of the adaptor class, look at the implementation of the class
in the DemoAdaptor.cpp file. This file contains the acquisition thread function which
is the main frame acquisition loop. This is where the adaptor connects to the device and
acquires image frames.
Other Demo Adaptor Files
The demo directory contains other files that implement optional adaptor kit capabilities.
For example, the DemoDeviceFormat.h and corresponding .cpp files illustrate one way
to store device-specific format information using adaptor data. You define a class that is
a subclass of the IMAQInterface class to hold the information. See “Defining Classes to
Hold Device-Specific Information” on page 3-17 for more information.
The DemoPropListener.h and corresponding .cpp files and the
DemoSourceListener.h and .cpp files illustrate how your adaptor can get notified
if a user changes the setting of a property. See “Implementing Get and Set Support for
Device-Specific Properties” on page 6-10 for more information.
Setting Breakpoints
You can use debugger breakpoints to examine which adaptor functions are called when
users call toolbox functions, such as imaqhwinfo, videoinput, start, and stop. The
following table lists places in the demo adaptor where you can set a breakpoints.
MATLAB Command Breakpoint
imaqhwinfo initializeAdaptor()
imaqreset uninitializeAdaptor()
imaqhwinfo(adaptorname) getAvailHW()
videoinput getDeviceAttributes()