Write is used to write a part of the file starting from the current file position. The file position is advanced by the number of bytes written.

Signature

Write(

[in] UInt32 fileHandle

[in] ByteString data

);

Argument

Description

fileHandle

A handle indicating the access request and thus indirectly the position inside the file.

data

Contains the data to be written at the position of the file. It is server-dependent whether the written data are persistently stored if the session is ended without calling the Close Method with the fileHandle.

Writing an empty or null ByteStringreturns a Good result code without any affect on the file.

Method Result Codes (defined in Call Service)

Result Code

Description

Bad_InvalidArgument

See OPC 10000-4for a general description. Invalid file handle in call.

Bad_NotWritable

See OPC 10000-4for a general description. File might be locked and thus not writable.

Bad_InvalidState

See OPC 10000-4for a general description. File was not opened for write access.

Table C.5 specifies the AddressSpacerepresentation for the Write Method.

Table C.5– Write Method AddressSpace Definition

Attribute

Value

BrowseName

Write

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory