User`s guide

Specifying Device Driver Identification Information
5-33
Specifying Device Driver Identification Information
Two of the virtual functions you must implement return identification information about
the device driver used to communicate with your device. This information can be useful
for debugging purposes.
getDriverDescription() — Returns a text string that identifies the device.
getDriverVersion() — Returns a text string that specifies the version of the
device driver.
Adaptors typically use an SDK function to query the device to get this information, if the
SDK supports it, or obtain the information from the device documentation.
User Scenario
The identification text strings returned by getDriverDescription() and
getDriverVersion() are visible to users if they call imaqhwinfo, specifying a video
input object as an argument, as follows.
vid = videoinput('mydeviceimaq');
imaqhwinfo(vid)
ans =
AdaptorName: 'mydeviceimaq'
DeviceName: 'MyDevice'
MaxHeight: 280
MaxWidth: 120
TotalSources: 1
VendorDriverDescription: 'MyDevice_Driver'
VendorDriverVersion: '1.0.0'
Example
The following example contains skeletal implementations of the
getDriverDescription() and getDriverVersion() functions.
const char* MyDeviceAdaptor::getDriverDescription() const{
return "MyDevice_Driver";
}