Ivi_PerformClassInterchangeCheck
Usage
ViStatus Ivi_PerformClassInterchangeCheck (ViSession vi, ViInt32 IVIClassAPI, ViChar functionName[]);
Purpose
This function performs interchangeability checking for the IVI instrument class passed in the IVI Class API parameter. Specific instrument drivers that implement one of the IVI class APIs must call this function from any function that will cause the instrument to initiate a measurement. For example, a driver that implements the IviDmm class API should call this function from the IviDmm_Initiate and IviDmm_Read functions.
This function performs interchangeability checking only if the PREFIX_ATTR_INTERCHANGE_CHECK attribute is set to VI_TRUE. Otherwise, the function returns immediately without performing any actions.
This function performs the following actions:
- Checks that the attributes in the base capability group have been set by the user.
- Checks that attributes in extension capability groups have been set by the user, as required by the interchangeability checking rules specified for the supported IVI class.
- Performs other interchangeability checking steps as required by the interchangeability checking rules for the supported IVI class.
- Generates and logs any interchangeability checking warnings to the session. You can retrieve these warnings by calling the PREFIX_GetNextInterchangeWarning function.
Parameters
Input | ||
Name | Type | Description |
---|---|---|
vi | ViSession | The ViSession handle that you obtain from Ivi_SpecificDriverNew. The handle identifies a particular IVI session. |
IVIClassAPI | ViInt32 | Specifies the IVI class API for which you want to perform interchangeability checking. Valid Values:
|
functionName | ViChar[] | Specify the name of the specific driver function from which this function is called. This value is used in the generated interchangeability checking warnings. In some cases, it may also be used to determine if a particular class extension capability group is supported by the driver. |
Return Value
Contains the status code that the function call returns. IVI engine functions can return error and warning values from several sets of status codes. Some status codes are unique to the IVI engine. Other status codes are the same codes that VISA Library functions return. Still others are error or warning values that functions in specific instrument drivers return. Each set of status codes has its own numeric range.
Regardless of the source of the status code, 0 always indicates success, a positive value indicates a warning, and a negative value indicates an error.