This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

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 character vector that identifies the device.

  • getDriverVersion() — Returns a character vector 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 character vectors 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');

ans = 

                AdaptorName: 'mydeviceimaq'
                 DeviceName: 'MyDevice'
                  MaxHeight: 280
                   MaxWidth: 120
               TotalSources: 1
    VendorDriverDescription: 'MyDevice_Driver'
        VendorDriverVersion: '1.0.0'


The following example contains skeletal implementations of the getDriverDescription() and getDriverVersion() functions.

const char* MyDeviceAdaptor::getDriverDescription() const{ 
	return "MyDevice_Driver";

const char* MyDeviceAdaptor::getDriverVersion() const { 
	return "1.0.0";
Was this topic helpful?