TDMS_AppendDataValues
- Updated2023-02-21
- 2 minute(s) read
int TDMS_AppendDataValues (TDMSChannelHandle channel, void *values, size_t numberOfValues, int saveFile);
Purpose
Appends data values for the specified channel. New data values will be added after existing data values. If the specified channel is empty the new data values will be added at the beginning of the channel.
To append data values to multiple channels at once refer to the TDMS_AppendDataValuesMultiChannel function.
Parameters
| Input | ||
| Name | Type | Description |
| channel | TDMSChannelHandle | The handle of the channel that will contain the new data values. |
| values | void * | An array of data values. 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. 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. If the data type of the specified channel is string, you must pass an array of type character pointer (char *). The following code illustrates one way to pass an array of strings: char *values[] = {"one", "two", "three", "four", "five"}; TDMS_AppendDataValues (channel, values, 5, 1); |
| numberOfValues | size_t | The number of values in the array specified by the values parameter. |
| saveFile | int | A flag indicating whether to save the file after appending the data values. Specify a nonzero value or select True in the function panel to save the file. Specify 0 or select False in the function panel if you do not want to save the file. If you pass False, you can save the file by calling TDMS_SaveFile. |
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.
