4.4.4 GenerateFileForWrite

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] BaseDataType	generateOptions
		 [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

OptionSet Used to provide a bit mask for file use selection

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

Enumeration Can be used to provide a list of options like file handling options

fileNodeIdNodeId 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_UserAccessDeniedSee OPC 10000-4 for a general description.
Bad_NotWritableThe temporary FileType Object is readonly and can not be generated for wirting.

Table 15 specifies the AddressSpace representation for the GenerateFileForWrite Method.

Table 15 – GenerateFileForWrite Method AddressSpace definition
Attribute Value
BrowseName

GenerateFileForWrite

References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasPropertyVariableInputArgumentsArgument[] PropertyTypeMandatory
HasPropertyVariableOutputArgumentsArgument[] PropertyTypeMandatory
Conformance Units
Base Info TemporaryFileTransferType Base