7.2.2 GenerateFileForRead

The Method GenerateFileForRead is used to start the read file transaction. A successful call of this Method creates a temporary FileType Object with the file content and returns the NodeId of this Object and the file handle to access the Object. The signature of this Method is specified below. Table 15 and Table 16 specify the Arguments and AddressSpace representation, respectively.

Signature

	GenerateFileForRead (
		[in]	BaseResultTransferOptionsDataType	generateOptions,
		[out]	0:NodeId					fileNodeId,
		[out]	0:UInt32					fileHandle,
		[out]	0:NodeId					completionStateMachine)
Table 15 – GenerateFileForRead Method Arguments
Argument Description
generateOptionsOptions how to generate the file, including the resultId of the result the file belongs to.
fileNodeIdNodeId of the temporary file.
fileHandle

The FileHandle of the opened TransferFile.

The FileHandle can be used to access the TransferFile methods Read and Close.

completionStateMachine

If the creation of the file is completed asynchronously, the parameter returns the NodeId of the corresponding FileTransferStateMachineType Object.

If the creation of the file is already completed, the parameter is null.

If a FileTransferStateMachineType object NodeId is returned, the Read Method of the file fails until the TransferState changed to ReadTransfer.

Table 16 – GenerateFileForRead Method AddressSpace Definition
Attribute Value
BrowseName0:GenerateFileForRead
References Node Class BrowseName DataType TypeDefinition ModellingRule
0:HasPropertyVariable0:InputArguments0:Argument[]0:PropertyType0:Mandatory
0:HasPropertyVariable0:OutputArguments0:Argument[]0:PropertyType0:Mandatory