LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

TDMS_SetNextWritePosition

TDMS_SetNextWritePosition

int TDMS_SetNextWritePosition (TDMSChannelHandle channel, __int64 offset, TDMSOffsetReferencePoint offsetReferencePoint);

Purpose

Configures the offset, relative to the specified channel, at which TDMS_AdvancedAsyncWrite or TDMS_AdvancedSyncWrite starts writing data to a .tdms file.

(Linux) This function is not supported.

Parameters

Input
Name Type Description
channel TDMSChannelHandle The channel relative to which the next write position will be set.
offset __int64 The offset of the next write position relative to the specified channel and specified offset reference point. If you set the offsetReferencePoint parameter to TDMS_OffsetRelativeToChannelStart, then the offset must be greater than or equal to zero. If you set the offsetReferencePoint parameter to TDMS_OffsetRelativeToChannelEnd, then the offset must be less than or equal to zero. Specify the offset in units of samples of the specified channel.

If you use the disable buffering option of TDMS_AdvancedCreateFile or TDMS_AdvancedOpenFile, the write position you set must correspond to a file position that is on a hard disk sector boundary. You can obtain the sector size of the hard disk from the sectorSize output parameter of TDMS_AdvancedCreateFile or TDMS_AdvancedOpenFile.
offsetReferencePoint TDMSOffsetReferencePoint The reference point, relative to the specified channel, to which the specified offset is applied.


Value Description
TDMS_OffsetRelativeToChannelStart Specifies that the offset is relative to the start of the specified channel.
TDMS_OffsetRelativeToChannelEnd Specifies that the offset is relative to the end of the specified channel.

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.

Was this information helpful?