GtDio6xFileAppend

Applies To

File

Purpose

Combines two files in to a new file in the specified order, or appends second file to an existing file.

Syntax

GtDio6xFileAppend (pszFirstFileName, pszAppendedFileName, pszDestinationFileName, dwStartStep, dwNumOfStepsToAppend, dwVectorOffset, dwNumOfVectors, dwFlags, pnStatus)

Parameters

Name
Type
Comments

pszFirstFileName

PCSTR

If pszFirstFileName<>pszDestinationFileName or pszDestinationFileName is NULL: a new file named pszDestinationFileName will be created containing the vector data and steps information from pszFirstFileName and pszAppendedFileName.

Otherwise: pszAppendedFileName data and steps information will be appended to pszFirstFileName.

pszAppendedFileName

PCSTR

This file's vector data and steps information will always be appended to pszDestinationFileName or pszFirstFileName (see pszFirstFileName).

pszDestinationFileName

PCSTR

If pszFirstFileName<> pszDestinationFileName or pszDestinationFileName is NULL: a new file called pszDestinationFileName will be created containing the vector data and steps information from pszFirstFileName and pszAppendedFileName.

dwStartStep

DWORD

Starting step to append at, -1 append from last step of the master file.

dwNumOfStepsToAppend

DWORD

Number of steps to append, -1 appends all the steps; otherwise append the specified number of steps.

dwVectorOffset

DWORD

Vector memory offset to start appending form, if =-1, appending to the last vector on pszFirstFileName.

dwNumOfVectors

DWORD

Number of vectors to append from pszAppendedFileName, if =-1, all vectors will be appended.

dwFlags

DWORD

The dwFlags allows the user to control which sections in the file appended. Each bit in the represent a section in the file, see comments for details.

pnStatus
PSHORT

Returned status: 0 on success, negative value on failure.

Comments

Utility function that either combine two files in to a new file in the specified order, or append second file to an existing file.

The dwFlags allows the user to control which sections in the file appended. Each bit in the represent a section in the file as follows:

0x00000: GTDIO6X_FILE_APPEND_ALL, default, append all.

0x00001: GTDIO6X_FILE_APPEND_IGNORE_NUM_CHANNELS, ignore (no error) if the two files have different number of channels, otherwise return an error.

0x00002: GTDIO6X_FILE_APPEND_REMOVE_LAST_STEP_FLAG, removes last step flag from all of appended steps.

0x00004: GTDIO6X_FILE_APPEND_REMOVE_FIRST_FILE_LAST_STEP_FLAG, removes last step flag from the first file only.

Example

The following example appends a second file to a first file:

 

SHORT nStatus;

CHAR szFirstFile [512] = "File 1.dio6x";

CHAR szAppendedFile [512] = "File 2.dio6x";

 

GtDio6xFileAppend(szFirstFile, szAppendedFile, NULL, -1, -1, -1, -1, 0, &nStatus);

 

See Also

GtDio6xFileOpen, GtDio6xFileSetChannelCount, GtDio6xFileSetTimingBoardCount, GtDio6xFileLoad, GtDio6xFileSave, GtDio6xGetErrorString