Cilxs_getattributevistring – AMETEK Ls Series Driver Manual User Manual
Page 168

IVI Driver Manual
Lx / Ls Series
164
ciLxs_GetAttributeViString
ViStatus ciLxs_GetAttributeViString (ViSession instrumentHandle,
ViChar _VI_FAR channelName[],
ViAttr attributeID,
ViInt32 bufferSize,
ViChar _VI_FAR attributeValue[]);
Purpose
This function queries the value of a ViString attribute.
You can use this function to get the values of instrument- specific
attributes and inherent IVI attributes. If the attribute represents an
instrument state, this 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.
You must provide a ViChar array to serve as a buffer for the value. You
pass the number of bytes in the buffer as the Buffer Size parameter. If
the current value of the attribute, including the terminating NUL 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
NUL 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.
If you want to call this function just to get the required buffer size,
you can pass 0 for the Buffer Size and VI_NULL for the Attribute Value
buffer.
If you want the function to fill in the buffer regardless of the number
of bytes in the value, pass a negative number for the Buffer Size
parameter.
Parameter List
instrumentHandle
Variable Type ViSession
The ViSession handle that you obtain from the ciLxs_init or
ciLxs_InitWithOptions function. The handle identifies a particular
instrument session.
Default Value: None