TDMS_ConfigureAsyncReads
- Updated2023-02-21
- 2 minute(s) read
TDMS_ConfigureAsyncReads
int TDMS_ConfigureAsyncReads (TDMSFileHandle file, unsigned int maxConcurrentAsyncReads, __int64 totalSamplesToRead, TDMSDataType dataType, double readTimeoutInSec);
Purpose
Configures the maximum number of asynchronous reads, total amount of data to read, and the timeout value for the asynchronous reads. The timeout value applies to all subsequent asynchronous reads. You must use this function to configure the asynchronous reads before calling TDMS_AdvancedAsyncRead. If any asynchronous read operations on the specified file are pending at the time you call this function then this function will wait for the pending operations to complete first.
(Linux) This function is not supported.
(Real-Time Module) 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 specify the enable asynchronous operations option when you open or create the file. |
maxConcurrentAsyncReads | unsigned int | Specifies the maximum number of asynchronous reads that can run concurrently in the background. The value must be greater than zero. When the number of pending asynchronous reads reaches the maximum value, TDMS_AdvancedAsyncRead waits for a pending asynchronous read to complete before issuing another asynchronous read. |
totalSamplesToRead | __int64 | Specifies the total size, in samples of type dataType, of the data to read from the specified file. Use this value in conjunction with the readProcessFinished output of TDMS_AdvancedAsyncRead to determine how many times to call TDMS_AdvancedAsyncRead. |
dataType | TDMSDataType | The data type of the samples referred to by totalSamplesToRead. |
readTimeoutInSec | double | Specifies the timeout value, in seconds, for TDMS_AdvancedAsyncRead. When the number of pending asynchronous reads reaches the maximum value, TDMS_AdvancedAsyncRead waits up to the timeout value for a pending asynchronous read to complete before issuing another asynchronous 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.
Examples
Refer to the following examples that use the TDMS_ConfigureAsyncReads function: