GenerateFileForReadis used to start the read file transaction. A successful call of this Methodcreates a temporary FileType Objectwith the file content and returns the NodeIdof this Objectand 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 Servershall specify a concrete DataTypein the Argument Structurefor this argument in the instance of the Method.

If the DataTypeis 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 Readand 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 ReadMethod of the file fails until the TransferStatechanged to ReadTransfer.

Method Result Codes (defined in Call Service)

Result Code

Description

Bad_UserAccessDenied

See OPC 10000-4for a general description.

Table C.14 specifies the AddressSpacerepresentation 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