Errata exists for this version of the document.

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.

Signature

GenerateFileForRead(

[in] BaseDataType generateOptions

[out] NodeId fileNodeId

[out] UInt32 fileHandle

[out] NodeId completionStateMachine

);

Argument

Description

generateOptions

The optional parameter can be used to specify server specific file generation options. To allow such options, the Server shall specify a concrete DataType in the Argument Structure for this argument in the instance of the Method.

If the DataType is BaseDataType, the Client shall pass Null for this argument.

Examples for concrete DataTypes are

OptionsSetUsed to provide a bit mask for file content selection

String Can be used to provide a string filter or a regular expression

StructureCan be used to provide a structure with create settings e.g. to create a report

EnumerationCan be used to provide a list of options

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 asynchronous, 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.

Method Result Codes (defined in Call Service)

Result Code

Description

Bad_UserAccessDenied

See OPC 10000-4 for a general description.

Table C.14 specifies the AddressSpace representation for the GenerateFileForRead Method.

Table C.14 – GenerateFileForRead Method AddressSpace Definition

Attribute

Value

BrowseName

GenerateFileForRead

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory