TDMS_AddChannelGroup
- Updated2023-02-21
- 3 minute(s) read
TDMS_AddChannelGroup
int TDMS_AddChannelGroup (TDMSFileHandle file, const char *name, const char *description, TDMSChannelGroupHandle *channelGroup);
Purpose
Adds a new channel group to a file. A valid file should contain one or more channel groups.
Parameters
Input | ||
Name | Type | Description |
file | TDMSFileHandle | The handle of the file that will contain the new channel group. You obtain this handle from the TDMS_OpenFileEx, TDMS_CreateFileEx, TDMS_AdvancedOpenFile, or TDMS_AdvancedCreateFile function. |
name | const char * | The value of the Name property of the channel group object. This property is stored in the channel group and can be accessed with the TDMS_SetChannelGroupProperty and TDMS_GetChannelGroupProperty functions. |
description | const char * | The value of the Description property of the channel group object. This property is stored in the channel group and can be accessed with the TDMS_SetChannelGroupProperty and TDMS_GetChannelGroupProperty functions. |
Output | ||
Name | Type | Description |
channelGroup | TDMSChannelGroupHandle | The handle for the requested channel group. Pass this handle to other TDM Streaming Library functions that require a channel group. LabWindows/CVI automatically discards this handle when you close the containing file handle with TDMS_CloseFile. To discard the channel group handle explicitly, call the TDMS_CloseChannelGroup function. |
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.
Examples
Refer to the following examples that use the TDMS_AddChannelGroup function:
- TDM Streaming\tdmsWriteBenchmark.cws
Open example
- TDM Streaming\Advanced Read and Write\TDMS Advanced Async Write\TDMS Advanced Async Write.cws
Open example
- TDM Streaming\Advanced Read and Write\TDMS Advanced Async Write Throughput Test\TDMS Advanced Async Write Throughput Test.cws
Open example
- TDM Streaming\Advanced Read and Write\TDMS Advanced Sync Write\TDMS Advanced Sync Write.cws
Open example
- TDM Streaming\Advanced Read and Write\TDMS In Memory Write and Read\TDMS In Memory Write and Read.cws
Open example