NI TCLK Attribute Functions - ni/grpc-device GitHub Wiki
- niTClk_GetAttributeViReal64
- niTClk_GetAttributeViSession
- niTClk_GetAttributeViString
- niTClk_SetAttributeViReal64
- niTClk_SetAttributeViSession
- niTClk_SetAttributeViString
ViStatus niTClk_GetAttributeViReal64 (ViSession session, ViConstString channelName, ViAttr attributeId, ViReal64 *value);
Queries the value of an NI-TClk ViReal64 attribute.
Input | ||
---|---|---|
Name | Type | Description |
session | ViSession [] | Specifies the sessions that are being synchronized. |
channelName | ViConstString | Pass VI_NULL or an empty string. |
attributeId | ViAttr | Specifies the ID of the attribute that you want to query. Supported Attribute |
Output | ||
value | ViReal64 | Returns the value of the attribute. |
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.
ViStatus niTClk_GetAttributeViSession (ViSession session, ViConstString channelName, ViAttr attributeId, ViSession *value);
Queries the value of an NI-TClk ViSession attribute.
Input | ||
---|---|---|
Name | Type | Description |
session | ViSession [] | Specifies the sessions that are being synchronized. |
channelName | ViConstString | Pass VI_NULL or an empty string, except for the [NITCLK_ATTR_SCRIPT_TRIGGER_MASTER_SESSION attribute. For this attribute, you must specify scriptTrigger0, scriptTrigger1, scriptTrigger2, or scriptTrigger3 in the channelName parameter. VI_NULL and the empty string are treated as scriptTrigger0 for the NITCLK_ATTR_SCRIPT_TRIGGER_MASTER_SESSION attribute. |
attributeId | ViAttr | Specifies the ID of the attribute that you want to query. Supported Attributes |
Output | ||
value | ViSession | Returns the value of the attribute. |
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.
ViStatus niTClk_GetAttributeViString (ViSession session, ViConstString channelName, ViAttr attributeId, ViInt32 bufSize, ViChar value []);
Queries the value of an NI-TClk ViString attribute.
You must provide a ViChar array to serve as a buffer for the value. Pass the number of bytes in the buffer to the function using the bufSize parameter.
If the current value of the attribute, including the terminating NULL byte, is larger than the size that you specify using the bufSize parameter, the function copies bufSize minus 1 bytes into the buffer. The function then 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 the value that you specify in the bufSize parameter is 4, the function places "123" into the buffer and returns 7.
If you want to call the niTClk_GetAttributeViString function only to get the required array size, specify 0 in the bufSize parameter and VI_NULL in the value parameter.
Input | ||
---|---|---|
Name | Type | Description |
session | ViSession [] | Specifies the sessions that are being synchronized. |
channelName | ViConstString | Pass VI_NULL or an empty string. |
attributeId | ViAttr | Specifies the ID of the attribute that you want to query. Supported Attributes |
bufSize | ViInt32 | The number of bytes in the ViChar array that you specify for the value parameter. |
Output | ||
value | ViChar [] | Returns the value for the attribute. |
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 entire value, this function returns the number of characters needed to report the value.
ViStatus niTClk_SetAttributeViReal64 (ViSession session, ViConstString channelName, ViAttr attributeId, ViReal64 value);
Sets the value of an NI-TClk VIReal64 attribute.
niTClk_SetAttributeViReal64 is a low-level function that you can use to set the values of NI-TClk attributes.
NI-TClk contains high-level functions that set most of the attributes. NI recommends using the high-level functions as much as possible.
Input |
---|
Name | Type | Description |
---|---|---|
session | ViSession | Specifies the sessions that are being synchronized. |
channelName | ViConstString | Pass VI_NULL or an empty string. |
attributeId | ViAttr | Specifies the ID of the attribute that you want to set. Supported Attribute |
value | ViReal64 | Specifies the value of the attribute. |
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.
ViStatus niTClk_SetAttributeViSession (ViSession session, ViConstString channelName, ViAttr attributeId, ViSession value);
Sets the value of an NI-TClk ViSession attribute.
niTClk_SetAttributeViSession is a low-level function that you can use to set the values of NI-TClk attributes.
NI-TClk contains high-level functions that set most of the attributes. NI recommends using the high-level functions as much as possible.
Input |
---|
Name | Type | Description |
---|---|---|
session | ViSession | Specifies the references that are being synchronized. |
channelName | ViConstString | Pass VI_NULL or an empty string, except for the [NITCLK_ATTR_SCRIPT_TRIGGER_MASTER_SESSION attribute. For this attribute, you must specify scriptTrigger0, scriptTrigger1, scriptTrigger2, or scriptTrigger3 in the channelName parameter. VI_NULL and the empty string are treated as scriptTrigger0 for the NITCLK_ATTR_SCRIPT_TRIGGER_MASTER_SESSION attribute. |
attributeId | ViAttr | Specifies the ID of the attribute that you want to set. Supported Attributes |
value | ViSession | Specifies the value of the attribute. |
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.
ViStatus niTClk_SetAttributeViString (ViSession session, ViConstString channelName, ViAttr attributeId, ViConstString value);
Sets the value of an NI-TClk ViString attribute.
niTClk_SetAttributeViString is a low-level function that you can use to set the values of NI-TClk attributes.
NI-TClk contains high-level functions that set most of the attributes. NI recommends using the high-level functions as much as possible.
Input |
---|
Name | Type | Description |
---|---|---|
session | ViSession | Specifies the sessions that are being synchronized. |
channelName | ViConstString | Specifies VI_NULL or an empty string. |
attributeId | ViAttr | Specifies the ID of the attribute that you want to set. Supported Attributes |
value | ViConstString | Specifies the value of the attribute. |
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.