User`s guide

Creating a Stub Adaptor
3-5
const char* formatName,
imaqkit::IPropFactory* devicePropFact,
imaqkit::IVideoSourceInfo* sourceContainer,
imaqkit::ITriggerInfo* hwTriggerInfo){
// Create a video source
sourceContainer->addAdaptorSource("MyDeviceSource", 1);
}
imaqkit::IAdaptor* createInstance(imaqkit::IEngine* engine, const
imaqkit::IDeviceInfo* deviceInfo, const
char* formatName){
imaqkit::IAdaptor* adaptor = NULL;
return adaptor;
}
void uninitializeAdaptor(){
}
3
Build the adaptor DLL. Select the Build Solution option on the Build menu.
4
Start the MATLAB software.
5
Tell the toolbox where to find this new adaptor using the imaqregister function.
See “Registering an Adaptor with the Toolbox” on page 1-10 for more information.
You only need to perform this step once.
6
Call the imaqhwinfo function. Note that the stub adaptor, named mydeviceimaq,
is included in the list of available adaptors returned.
imaqhwinfo
ans =
InstalledAdaptors: {'demo' 'mydeviceimaq' 'winvideo'}
MATLABVersion: '7.12 (R2011a)'
ToolboxName: 'Image Acquisition Toolbox'
ToolboxVersion: '4.1 (R2011a)'
To get more information about the stub adaptor, call imaqhwinfo again, this time
specifying the name of the adaptor.