ClassPrefix_GetAttribute[type]

CVI/LabWindows IVI Class Driver

ClassPrefix_GetAttribute[type]

IVI Inherent Function

To form the ClassPrefix_ of the function name, use the prefix of the class driver with which you are working. For example, if you are working with the IviDmm class driver, use the prefix IviDmm_ to create the correct function name, IviDmm_GetAttribute[type].

ClassPrefix_GetAttributeViInt32
ClassPrefix_GetAttributeViReal64
ClassPrefix_GetAttributeViBoolean
ClassPrefix_GetAttributeViSession

C Function Prototype

ViStatus ClassPrefix_GetAttributeViInt32 (ViSession vi, ViConstString channel,ViAttr attributeID, ViInt32 *attributeValue);

ViStatus ClassPrefix_GetAttributeViReal64 (ViSession vi, ViConstString channel,ViAttr attributeID, ViReal64 *attributeValue);

ViStatus ClassPrefix_GetAttributeViBoolean (ViSession vi, ViConstString channel,ViAttr attributeID, ViBoolean *attributeValue);

ViStatus ClassPrefix_GetAttributeViSession (ViSession vi, ViConstString channel,ViAttr attributeID, ViSession *attributeValue);

Purpose

These functions query the value of an attribute. A separate typesafe function exists for each possible attribute data type.

Note  A separate function description exists for Prefix_GetAttributeViString.

You can use these functions to get the values of instrument specific attributes and inherent IVI attributes. If the attribute represents an instrument state, the function performs instrument I/O in the following cases:

  • State caching is disabled for the entire session or for the particular attribute.
  • State caching is enabled and the currently cached value is invalid.

Parameters

Inputs Type Description
vi ViSession The instrument handle that you obtain from the ClassPrefix_init or ClassPrefix_InitWithOptions functions. The handle identifies a particular IVI session.
channel ViConstString If the attribute is channel-based, pass a channel string or virtual channel name. Otherwise, pass VI_NULL or an empty string.

Note  None of the attributes of the IviDmm class are channel-based. Therefore you always pass VI_NULL or an empty string when accessing the IviDmm class driver.
attributeID ViAttr The ID of the attribute.
     
Outputs Type Description
attributeValue depends on the data type of the attribute Returns the current value of the attribute. Specify the address of a variable that has the same data type as the attribute.

Return Values