TDMS_GetDataValues
- Updated2023-02-21
- 2 minute(s) read
TDMS_GetDataValues
int TDMS_GetDataValues (TDMSChannelHandle channel, unsigned int indexOfFirstValueToGet, unsigned int numberOfValuesToGet, void *values);
Purpose
![]() |
Note This function has been superseded by TDMS_GetDataValuesEx. |
Obtains the data values in the specified channel.
Parameters
Input | ||
Name | Type | Description |
channel | TDMSChannelHandle | The channel handle. |
indexOfFirstValueToGet | unsigned int | The zero-based index of the first data value to get. |
numberOfValuesToGet | unsigned int | The number of data values to get, starting at the specified index. |
Output | ||
Name | Type | Description |
values | void * | An array that receives the data values of the specified channel. The type of this array must match the data type of the specified channel. You can call TDMS_GetDataType to get the data type of a channel. This array must be large enough to hold at least the number of values specified by the numberOfValuesToGet parameter. If the data type of the specified channel is string, you must pass an array of type character pointer (char *). This function fills the array with string pointers allocated by this function. You must free these strings. The following code illustrates one way to obtain data values and free the strings: char *values[5]; int i; TDMS_GetDataValues (channel, 0, 5, values); for (i = 0; i < 5; i++) TDMS_FreeMemory (values[i]); If the data type of the specified channel is TDMS_Timestamp, you must pass an array of type CVIAbsoluteTime. Refer to the Absolute Time functions in the Utility Library for more information about this type. |
Return Value
Name | Type | Description |
status | int | Return value indicating whether the function was successful. Unless otherwise stated, zero represents successful execution and a negative number represents the error code. Error codes are defined in cvi\include\cvitdms.h. |
Additional Information
Library: TDM Streaming Library
Include file: cvitdms.h
LabWindows/CVI compatibility: LabWindows/CVI 8.1 and later
© 2016 National Instruments. All rights reserved.