Class Driver Relationship to Instrument Specific Drivers

National Instruments IVI Driver

Class Driver Relationship to Instrument Specific Drivers

The following figure shows an example of the relationship between the capability groups of a class driver and a specific driver. In this figure, the class driver implements the inherent IVI capabilities, the base instrument capabilities, and two extension capability groups. The specific driver implements the inherent IVI capabilities, the base instrument capabilities, one of the extension capability groups, and instrument specific capabilities.

The class driver dynamically loads the specific driver. The IVI class drivers require that the specific driver be in a .dll, .c, or .obj file. The specific drivers normally come in .dll and .c file formats. If you use the class drivers outside of the LabWindows/CVI environment, you must use the .dll file.

In general, when a test program calls functions and attributes of a capability group in the class driver, the class driver maps these calls to the corresponding capability group in the specific driver. If the test program attempts to call extension group functions that the specific driver does not implement, the class driver returns an error.

The class driver does not implement instrument specific capabilities. Instead, the test program accesses the instrument specific capabilities by invoking functions and attributes of the specific driver directly.

Your test program can access the inherent IVI, base instrument, and extension capabilities by invoking functions and attributes in either the class driver or specific driver. However, unless you are using a family driver, you must use the class driver to achieve interchangeability.

Note  To access the capabilities of the instrument through the class driver, call the initialize function in the class driver to create the instrument driver session.

In the figure above, a dashed line connects the inherent IVI capabilities of the class driver and specific driver because some inherent IVI functions and attributes are accessible only through the class driver. If you initialize an instrument driver session by calling the initialize function in the specific driver, you cannot access the class–only functions and attributes.

The following table lists the inherent IVI attributes that you can access only through the class driver.

Note  To complete the attribute names in the following table for any one of the IVI class drivers, replace CLASSPREFIX with one of the class prefixes: IviDmm, IviDCPwr, IviFgen, IviPwrMeter, IviScope, IviSpecAn, IviSwtch or IviRFSigGen. For example, in the DMM class, CLASSPREFIX_ATTR_CLASS_DRIVER_VENDOR becomes IVIDMM_ATTR_CLASS_DRIVER_VENDOR.

Inherent IVI Attributes: Class Driver Access Only

Description Function Name
Specific Driver Module Pathname CLASSPREFIX_ATTR_SPECIFIC_DRIVER_LOCATOR
Class Revision CLASSPREFIX_ATTR_CLASS_DRIVER_REVISION
Class Specification Major Version CLASSPREFIX_ATTR_CLASS_DRIVER_SPEC_MAJOR_VERSION
Class Specification Minor Version CLASSPREFIX_ATTR_CLASS_DRIVER_SPEC_MINOR_VERSION
Class Driver Vendor CLASSPREFIX_ATTR_CLASS_DRIVER_VENDOR
Class Driver Description CLASSPREFIX_ATTR_CLASS_DRIVER_DESCRIPTION
Spy CLASSPREFIX_ATTR_SPY
Use Specific Simulation CLASSPREFIX_ATTR_USE_SPECIFIC_SIMULATION
Function Capabilities CLASSPREFIX_ATTR_FUNCTION_CAPABILITIES