Annex C (normative) File Transfer ToC Previous Next

C.2 FileType ToC Previous Next index

C.2.3 Read ToC Previous Next

Read is used to read a part of the file starting from the current file position. The file position is advanced by the number of bytes read.


[in] UInt32 fileHandle
[in] Int32 length
[out] ByteString data
Argument Description
fileHandle A handle indicating the access request and thus indirectly the position inside the file.
Length Defines the length in bytes that should be returned in data, starting from the current position of the file handle. If the end of file is reached all data until the end of the file is returned. The Server is allowed to return less data than specified length.
Only positive values are allowed.
Data Contains the returned data of the file. If the ByteString is empty it indicates that the end of the file is reached.

Method Result Codes (defined in Call Service)

Result Code Description
Bad_InvalidArgument See OPC 10000-4 Invalid file handle in call or non-positive length.
Bad_UnexpectedError See OPC 10000-4 for a general description.
Bad_InvalidState See OPC 10000-4 for a general description. File was not opened for read access.

Table C.4 specifies the AddressSpace representation for the Read Method.

Table C.4 – Read Method AddressSpace Definition

Attribute Value
BrowseName Read
References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasProperty Variable InputArguments Argument[] PropertyType Mandatory
HasProperty Variable OutputArguments Argument[] PropertyType Mandatory

Previous Next