GenerateFileForWrite is used to start the write file transaction. A successful call of this Method creates a temporary FileType Object and returns the NodeId of this Object and the file handle to access the Object.

Signature

GenerateFileForWrite(

[in] BaseDataTypegenerateOptions

[out] NodeId fileNodeId

[out] UInt32 fileHandle

);

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 use selection

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

EnumerationCan be used to provide a list of options like file handling options

fileNodeId

NodeId of the temporary file.

fileHandle

The fileHandle of the opened TransferFile.

The fileHandle can be used to access the TransferFile Methods Write and Close.

Method Result Codes (defined in Call Service)

Result Code

Description

Bad_UserAccessDenied

See OPC 10000-4 for a general description.

Table C.15 specifies the AddressSpace representation for the GenerateFileForWrite Method.

Table C.15 – GenerateFileForWrite Method AddressSpace Definition

Attribute

Value

BrowseName

GenerateFileForWrite

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory