TDMS_AdvancedSyncRead
- Updated2023-02-21
- 3 minute(s) read
int TDMS_AdvancedSyncRead (TDMSFileHandle file, void *samples, size_t numberOfSamples, TDMSDataType dataType, size_t *numberOfSamplesRead);
Purpose
Reads data from the specified file.
(Linux) This function is not supported.
Parameters
| Input | ||||
| Name | Type | Description | ||
| file | TDMSFileHandle | The file handle. You obtain this handle from TDMS_AdvancedOpenFile or TDMS_AdvancedCreateFile. You must not specify the enable asynchronous operations option when you open or create the file. | ||
| numberOfSamples | size_t | The number of samples to read.
|
||
| dataType | TDMSDataType | The data type of the samples to read. This function does not support reading samples of type string. | ||
| Output | ||||
| Name | Type | Description | ||
| samples | void * | An array that receives the samples from the specified file. This array must be large enough to hold at least the number of samples specified by the numberOfSamples parameter. The type of this array should match the type of the samples you are reading. This function does not support reading samples of type string. If the type of the samples you are reading 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.
|
||
| numberOfSamplesRead | size_t | The number of samples actually read from the file. This value can be less than numberOfSamples if the end of the file is reached before the specified number of samples have been read. | ||
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 2013 and later
© 2016 National Instruments. All rights reserved.
Example
Refer to TDM Streaming\Advanced Read and Write\TDMS Advanced Sync Read\TDMS Advanced Sync Read.cws for an example of using the TDMS_AdvancedSyncRead function.
