The TransferToDeviceand TransferFromDevice Methodsexecute asynchronously after sending a response to the Client. Execution status and execution results are collected during execution and can be retrieved using the FetchTransferResultData Method. The TransferIDis used as identifier to retrieve the data.

The Clientis assumed to fetch the result data in a timely manner. However, because of the asynchronous execution and the possibility of data loss due to transmission errors to the Client, the Servershall wait some time (some minutes) before deleting data that have not been acknowledged. This should be even beyond Sessiontermination, i.e., Clientsthat have to re-establish a Sessionafter an error may try to retrieve missing result data.

Result data will be deleted with each new transfer request for the same Device.

FetchTransferResultDatais used to request the execution status and a set of result data. If called before the transfer is finished it will return only partial data. The amount of data returned may be further limited if it would be too large. “Too large” in this context means that the Serveris not able to return a larger response or that the number of results to return exceeds the maximum number of results that was specified by the Clientwhen calling this Method.

Each result returned to the Clientis assigned a sequence number. The Clientacknowledges that it received the result by passing the sequence number in the new call to this Method. The Servercan delete the acknowledged result and will return the next result set with a new sequence number.

Clients shall not call the Methodbefore the previous one returned. If it returns with an error (e.g., Bad_Timeout), the Clientcan call the FetchTransferResultData with a sequence number 0. In this case the Server will resend the last result set.

The Server will return Bad_NothingToDo in the Method-specific StatusCodeof the Call Serviceif the transfer is finished and no further result data are available.

The signature of this Methodis specified below. Table 52and Table 53specify the arguments and AddressSpacerepresentation, respectively.

Signature

FetchTransferResultData(

[in] 0:Int32 TransferID,

[in] 0:Int32 SequenceNumber,

[in] 0:Int32 MaxParameterResultsToReturn,

[in] Boolean OmitGoodResults,

[out] FetchResultType FetchResultData);

Table 52– FetchTransferResultData Method arguments

Argument

Description

TransferID

Transfer Identifier returned from TransferToDeviceor TransferFromDevice.

SequenceNumber

The sequence number being acknowledged. The Servermay delete the result set with this sequence number.

“0” is used in the first call after initialising a transfer and also if the previous call of FetchTransferResultData failed.

MaxParameterResultsToReturn

The number of Parametersin TransferResult.ParameterDefsthat the Client wants the Serverto return in the response. The Serveris allowed to further limit the response, but shall not exceed this limit.

A value of 0 indicates that the Clientis imposing no limitation.

OmitGoodResults

If TRUE, the Server will omit data for Parameters which have been correctly transferred. Note that this causes all good results to be released.

FetchResultData

Two subtypes are possible:

  • TransferResultError Type is returned if the transfer failed completely
  • TransferResultData Type is returned if the transfer was performed. Status information is returned for each transferred Parameter.

Table 53– FetchTransferResultData Method AddressSpace definition

Attribute

Value

BrowseName

FetchTransferResultData

References

NodeClass

BrowseName

DataType

TypeDefinition

Other

0:HasProperty

Variable

InputArguments

0:Argument[]

0:PropertyType

M

0:HasProperty

Variable

OutputArguments

0:Argument[]

0:PropertyType

M

Conformance Units

DI Offline

The FetchResultDataTypeis an abstract type. It is the base DataTypefor concrete result types of the FetchTransferResultData. Its elements are defined in Table 54.

Table 54– FetchResultDataType structure

Attribute

Value

BrowseName

FetchResultDataType

IsAbstract

True

Subtype of 0:Structure defined in OPC 10000-3

References

NodeClass

BrowseName

DataType

Conformance Units

DI Offline

The TransferResultErrorDataTypeis a subtype of the FetchResultDataTypeand represents an error result. It is defined in Table 55.

Table 55– TransferResultErrorDataType structure

Name

Type

Description

TransferResultErrorDataType

0:Structure

This structure is returned in case of errors. No result data are returned. Further calls with the same TransferIDare not possible.

status

0:Int32

-1 – Invalid TransferID: The Id is unknown. Possible reason: all results have been fetched or the result may have been deleted.

-2 – Transfer aborted: The transfer operation was aborted; no results exist.

-3 – DeviceError: An error in the device or the communication to the Deviceoccurred. “diagnostics” may contain device- or protocol-specific error information.

-4 – UnknownFailure: The transfer failed. “diagnostics” may contain Device- or Protocol-specific error information.

diagnostics

0:DiagnosticInfo

Diagnostic information. This parameter is empty if diagnostics information was not requested in the request header or if no diagnostic information was encountered in processing of the request. The DiagnosticInfotype is defined in OPC 10000-4.

Its representation in the AddressSpaceis defined in Table 56.

Table 56– TransferResultErrorDataType Definition

Attribute

Value

BrowseName

TransferResultErrorDataType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

Other

Subtype of FetchResultDataType.

Conformance Units

DI Offline

The TransferResultData DataTypeis a subtype of the FetchResultDataTypeand includes parameter-results from the transfer operation. It is defined in Table 57.

Table 57– TransferResultDataDataType structure

Name

Type

Description

TransferResultDataDataType

0:Structure

A set of results from the transfer operation.

sequenceNumber

0:Int32

The sequence number of this result set.

endOfResults

0:Boolean

TRUE – all result data have been fetched. Additional FetchTransferResultDatacalls with the same TransferIDwill return a FetchTransferError with status=InvalidTransferID.

FALSE – further result data shall be expected.

parameterDefs

ParameterResult

DataType []

Specific value for each Parameterthat has been transferred. If OmitGoodResults is TRUE, parameterDefs will only contain Parameterswhich have not been transferred correctly.

NodePath

0:QualifiedName[]

List of BrowseNames that represent the relative path from the Device Objectto the Parameterfollowing hierarchical references. The Clientmay use these names for TranslateBrowsePathsToNodeIdsto retrieve the Parameter NodeIdfor the online or the offline representation.

statusCode

0:StatusCode

OPC UA StatusCodeas defined in OPC 10000-4and in OPC 10000-8.

diagnostics

0:DiagnosticInfo

Diagnostic information. This parameter is empty if diagnostics information was not requested in the request header or if no diagnostic information was encountered in processing of the request. The DiagnosticInfotype is defined in OPC 10000-4.

Its representation in the AddressSpaceis defined in Table 58.

Table 58– TransferResultDataDataType definition

Attribute

Value

BrowseName

TransferResultDataDataType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

Other

Subtype of FetchResultDataType.

Conformance Units

DI Offline