niTClk_GetAttributeViString
C Function Prototype
ViStatus niTClk_GetAttributeViString (ViSession session, ViConstString channelName, ViAttr attributeId, ViInt32 bufSize, ViChar value []);
Purpose
This function queries the value of an NI-TClk ViString attribute.
You must provide a ViChar array to serve as a buffer for the value. You pass the number of bytes in the buffer as bufSize. If the current value of the attribute, including the terminating NULL byte, is larger than the size you indicate in bufSize, the function copies bufSize minus 1 bytes into the buffer, places an ASCII NULL byte at the end of the buffer, and returns the array size that you must pass to get the entire value. For example, if the value is "123456" and bufSize is 4, the function places "123" into the buffer and returns 7.
If you want to call niTClk_GetAttributeViString just to get the required array size, pass 0 for bufSize and VI_NULL for the value.
Parameters
Name | Type | Description |
---|---|---|
session | ViSession | session references the sessions being synchronized. |
channelName | ViConstString | Pass VI_NULL or an empty string. |
attributeId | ViAttr | The ID of the attribute that you want to get.
Supported Attributes NITCLK_ATTR_SYNC_PULSE_SOURCE
NITCLK_ATTR_SYNC_PULSE_CLOCK_SOURCE |
bufSize | ViInt32 | The number of bytes in the ViChar array that you specify for the value parameter. |
value | ViChar [] | The value that you are getting. |
Return Value
The status code returned by the function.
- A value of 0 indicates success.
- A negative value indicates an error.
- A value greater than 0 indicates a warning.
Use niTClk_GetExtendedErrorInfo to get detailed information about individual errors and warnings.
If you pass NULL for the value or 0 for the buffer size, or if the size of value prevents the function from reporting the value in its entirety, this function returns the number of characters needed to report the value.