LabWindows/CVI

TDMS_ConfigureAsyncWrites

int TDMS_ConfigureAsyncWrites (TDMSFileHandle file, unsigned int maxConcurrentAsyncWrites, double writeTimeoutInSec);

Purpose

Configures the maximum number of asynchronous writes and the timeout value for the asynchronous writes. The timeout value applies to all subsequent asynchronous writes. You must use this function to configure the asynchronous writes before calling TDMS_AdvancedAsyncWrite. If any asynchronous write 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.
maxConcurrentAsyncWrites unsigned int Specifies the maximum number of asynchronous writes that can run concurrently in the background. The value must be greater than zero. When the number of pending asynchronous writes reaches the maximum value, TDMS_AdvancedAsyncWrite waits for a pending asynchronous write to complete before issuing another asynchronous write.
writeTimeoutInSec double Specifies the timeout value, in seconds, for TDMS_AdvancedAsyncWrite. When the number of pending asynchronous writes reaches the maximum value, TDMS_AdvancedAsyncWrite waits up to the timeout value for a pending asynchronous write to complete before issuing another asynchronous write.

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_ConfigureAsyncWrites function:

  • 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

Log in to get a better experience