TDMS_AppendDataValuesMultiChannel
- Updated2023-02-21
- 2 minute(s) read
int TDMS_AppendDataValuesMultiChannel (TDMSChannelHandle channels[], size_t numberOfChannels, void *values, size_t numberOfValues, TDMSDataLayout dataLayout, int saveFile);
Purpose
Appends data values to the specified channels. New data values will be added after existing data values. If a specified channel is empty the new data values will be added at the beginning of the channel.
Parameters
| Input | ||
| Name | Type | Description |
| channels | TDMSChannelHandle [] | An array of handles to the channels that will contain the new data values. |
| numberOfChannels | size_t | The number of channel handles in the array specified by the channels parameter. |
| 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. The number of values should be the total number of values that will be written to all channels, not the number of values written to each channel. The number of values must be an even multiple of the number of channels. |
| dataLayout | TDMSDataLayout | The layout of values in the array specified by the values parameter. Pass TDMS_DataLayoutNonInterleaved to indicate that the array contains all of the values for the first channel, followed by all of the values for the second channel, and so on. Pass TDMS_DataLayoutInterleaved to indicate that the array contains the first value for each channel, followed by the second value for each channel, and so on. In either layout, the order of the channels is determined by the order of channel handles in the array specified by the channels 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 2009 and later
© 2016 National Instruments. All rights reserved.