User`s guide
3 Providing Hardware Information
3-12
You can specify any values for these arguments, but note that they are visible to toolbox
users in the structure returned by imaqhwinfo.
For device name, specify a text string that easily identifies the device. For example, you
might use the manufacturer's model number.
The ID you specify for the device must be unique because it identifies the device for the
adaptor. Because MATLAB indexing starts at 1, start the numbering of device IDs at 1,
not zero. The device with ID 1 is the default device for your adaptor.
The IDeviceInfo object you create supports member functions to perform many tasks,
such as creating, adding, and retrieving the IDeviceFormat objects associated with
the device, and indicating whether the device supports device configuration files (also
known as camera files). For more information about this class, see the Image Acquisition
Toolbox Adaptor Kit API Reference documentation.
Adding the IDeviceInfo Object to the IHardwareInfo Object
After you create the IDeviceInfo object, you must add it to the IHardwareInfo object
that the engine passed to your getAvailHW() function. Use the addDevice() member
function of the IHardwareInfo object, as in the following example:
hardwareInfo->addDevice(deviceInfo);
Storing Format Information
You store format information in an IDeviceFormat object. To create this object, use
the createDeviceFormat() member function of an IDeviceInfo object, as in the
following example:
imaqkit::IDeviceFormat* deviceFormat =
deviceInfo->createDeviceFormat(1,"RS170");
As arguments to createDeviceFormat(), you specify
• Name you want to assign to the format
• ID you want to assign to the format
For the format name, specify a text string that describes the format. Note that the format
name is visible to toolbox users. Use names that might be familiar to users of the device,
such as a name similar to the format names used by the device manufacturer.