User`s guide
Creating a Stub Adaptor Test Procedure
8-3
Creating a Stub Adaptor Test Procedure
As part of the Image Acquisition Toolbox Adaptor Kit, we now offer a test procedure and
automated tests for third-party adaptor developers and camera vendors to test adaptors
and hardware against the toolbox. This test procedure is part of that suite. For more
information, see “Testing Adaptors or Hardware” on page 8-2.
After creating a stub adaptor per instructions in “Creating a Stub Adaptor” in this
Adaptor Kit documentation, follow these steps to verify that the stub adaptor shows up in
MATLAB.
Test Procedures Expected Results
In MATLAB, register the adaptor using
the following command:
imaqregister('AdaptorDllName')
where 'AdaptorDllName' is the
adaptor dll file name with the full path
to the file.
The registration of the adaptor should work
without any errors or warnings.
Once verified, run the following command:
imaqreset
Run the following command:
imaqhwinfo
imaqhwinfo will output a list of available
adaptors. The adaptor being built should be
listed in InstalledAdaptors.
Run the following command:
imaqhwinfo('AdaptorName')
The details of the adaptor library are shown.
AdaptorDllName should be the full path to
the adaptor library. At this point DeviceIDs
and DeviceInfo should empty (1x0).
Once the device enumeration code has been added, follow these steps to verify the device
information.
Test Procedures Expected Results
Run the following command:
devInfo = imaqhwinfo
('AdaptorName')
The DeviceIDs and DeviceInfo fields
should now be populated. DeviceIDs should
be from 1 to N based on the number of devices
added. DeviceInfo is a MATLAB structure
(or array of structures if there are multiple
devices).
Run the following command: DeviceInfo should show the information as
follows for each device: