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 13 and Table 14 specify the Arguments and AddressSpace representation, respectively.
Signature
GenerateFileForRead (
[in]BaseResultTransferOptionsDataTypegenerateOptions,
[out]0:NodeId fileNodeId,
[out]0:UInt32 fileHandle,
[out]0:NodeId completionStateMachine)
Table 13 – GenerateFileForRead Method Arguments
Argument |
Description |
generateOptions |
Options how to generate the file, including the resultId of the result the file belongs to. |
fileNodeId |
NodeId 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 14 – GenerateFileForRead Method AddressSpace Definition
Attribute |
Value |
||||
BrowseName |
0:GenerateFileForRead |
||||
References |
Node Class |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
0:HasProperty |
Variable |
0:InputArguments |
0:Argument[] |
0:PropertyType |
0:Mandatory |
0:HasProperty |
Variable |
0:OutputArguments |
0:Argument[] |
0:PropertyType |
0:Mandatory |