|Download Help (Windows Only)|
ViStatus niRFSG_GetAttributeViString (ViSession vi, ViConstString channelName, ViAttr attributeID, ViInt32 bufferSize, ViChar attributeValue);
Queries the value of a ViString attribute.
Use this low-level function to get the values of inherent IVI attributes, class-defined attributes, and instrument-specific attributes. If the attribute represents an instrument state, this function performs instrument I/O in the following cases:
You must provide a ViString (ViChar array) to serve as a buffer for the value. Pass the number of bytes in the buffer as the Buffer Size parameter. If the current value of the attribute, including the terminating NULL byte, is larger than the size you indicate in the buffer size parameter, the function copies buffer size-1 bytes into the buffer, places an ASCII NULL byte at the end of the buffer, and returns the buffer size you must pass to get the entire value. For example, if the value is "123456" and the buffer size is 4, the function places "123" into the buffer and returns 7.
To call this function to get only the required buffer size, pass 0 for the buffer size and VI_NULL for the attribute value buffer.
|vi||ViSession||Identifies your instrument session. The ViSession handle is obtained from the niRFSG_init function or the niRFSG_InitWithOptions function and identifies a particular instrument session.|
|channelName||ViConstString||Specifies the channel to which the attribute applies if this attribute is channel-based. If the attribute is not channel-based, set this parameter to "" (empty string) or VI_NULL.|
|attributeID||ViAttr||Pass the ID of an attribute.|
|bufferSize||ViInt32||Pass the number of bytes in the ViChar buffer you specify for the attributeValue parameter.
If you pass 0, you can pass VI_NULL for the attributeValue parameter.
|attributeValue||ViChar||The buffer in which the function returns the current value of the attribute. The buffer must be of type ViChar and have at least as many bytes as indicated in the bufferSize parameter.
If you specify 0 for the bufferSize parameter, you can pass VI_NULL for this parameter.