niHSDIO_GetAttributeViString

NI Digital Waveform Generator/Analyzer

niHSDIO_GetAttributeViString

Specific Function

C Function Prototype

ViStatus niHSDIO_GetAttributeViString (ViSession vi, ViConstString channelList, ViAttr attributeID, ViInt32 bufSize, ViChar[ ] value);

Purpose

This function queries the value of a ViString attribute. You can use this function to get the values of device-specific attributes and inherent IVI attributes.

Parameters

Name Type Description
vi ViSession This handle identifies your instrument session. vi was obtained from the niHSDIO_InitAcquisitionSession or niHSDIO_InitGenerationSession function.
channelList ViConstString If the attribute is channel or instance based, this parameter specifies the name of the channel or instance on which to set the value of the attribute; if the attribute is not channel or instance based, pass VI_NULL or an empty string.
attributeID ViAttr The ID of an attribute.
bufSize ViInt32 Pass the number of bytes in the ViChar array you specify for the value parameter.

If the current value of the attribute, including the terminating NULL byte, contains more bytes than you indicate in this parameter, the function copies Array Size-1 bytes into the buffer, places an ASCII NULL byte at the end of the buffer, and returns the array size you must pass to get the entire value. For example, if the value is "123456", and the Array Size is 4, the function places "123" into the buffer and returns 7.

If you pass 0, you can pass VI_NULL for the value buffer parameter.
value ViChar[ ] Returns the current value of the attribute; pass the address of a ViChar array.

Return Value