User`s guide

Creating an Adaptor
1-5
Stage 3: Provide Hardware Information
In this stage, you start development by creating a stub implementation of your adaptor.
Every adaptor must provide the toolbox with information about the device (or devices)
it makes available to users. As a first step, you define the labels you want to use to
identify the devices available through your adaptor and the formats they support, and
you implement the adaptor functions that return this information to users. The toolbox
displays these labels to users who must specify the device and format they want to use
for an acquisition.
After building this stub implementation of your adaptor DLL and registering it with the
toolbox, you can use the imaqhwinfo function and verify that the toolbox can find your
adaptor and load it. For more information about this stage, see “Using Adaptor Exported
Functions” on page 3-2.
Stage 4: Define Your Adaptor Class
In this stage, you define your adaptor class and add a stub implementation of this class
to your adaptor project. Every adaptor must define an adaptor class that is a subclass of
the adaptor kit IAdaptor class.
After building your adaptor DLL, a call to the videoinput function instantiates a video
input object with your adaptor. For more information, see “Defining Your Adaptor Class”
on page 4-2.
Stage 5: Implement Virtual Functions in Adaptor Class
In this stage, you flesh out the stub implementations of the virtual functions in your
adaptor class. After completing this stage, you will be able to acquire data from your
device and bring it into the MATLAB
®
workspace.
In addition, in this step you can also implement support for defining a region-of-interest
(ROI) and for using hardware triggering, if your device supports this capability. For more
information, see “Acquiring Image Data” on page 5-2.
Stage 6: Choose Which Device Properties to Expose
In this stage, you decide which properties of the device you want to expose to toolbox
users. You make this determination by reading the device's SDK documentation,
determining its capabilities, and deciding which capabilities toolbox users will expect
to configure. Once you decide to expose a property, you must decide on a name for
the property, determine its data type, and, optionally, the range of valid values. As