5.14.7 TransferSubscriptions

5.14.7.1 Description

This Service is used to transfer a Subscription and its MonitoredItems from one Session to another. For example, a Client may need to reopen a Session and then transfer its Subscriptions to that Session. It may also be used by one Client to take over a Subscription from another Client by transferring the Subscription to its Session.

The authenticationToken contained in the request header identifies the Session to which the Subscription and MonitoredItems shall be transferred. The Server shall validate that the Client of that Session is operating on behalf of the same non-ANONYMOUS ClientUserId. The ClientUserId is defined in OPC 10000-5. If the Client uses an ANONYMOUS UserTokenType, the Server shall validate if the ApplicationUri is the same for the old and the new Session and the MessageSecurityMode is SIGN or SIGNANDENCRYPT. If the Server transfers the Subscription, it returns the sequence numbers of the NotificationMessages that are available for retransmission. The Client should acknowledge all Messages in this list for which it will not request retransmission.

If the Server transfers the Subscription to the new Session, the Server shall issue a StatusChangeNotification notificationMessage with the status code Good_SubscriptionTransferred to the old Session. The StatusChangeNotification notificationMessage type is defined in 7.25.4.

5.14.7.2 Parameters

Table 94 defines the parameters for the Service.

Table 94 – TransferSubscriptions Service Parameters
NameTypeDescription
Request

requestHeader

RequestHeaderCommon request parameters (see 7.32 for RequestHeader definition).

subscriptionIds []

IntegerIdList of identifiers for the Subscriptions to be transferred to the new Client (see 7.19 for IntegerId definition). These identifiers are transferred from the primary Client to a backup Client via external mechanisms.

sendInitialValues

Boolean

A Boolean parameter with the following values:

TRUE the first Publish response(s) after the TransferSubscriptions call shall contain the current value for each data MonitoredItem in the Subscription where the Monitoring Mode is set to Reporting.
If a value is queued for a data MonitoredItem, the next value in the queue is sent in the Publish response. If no value is queued for a data MonitoredItem, the last value sent is repeated in the Publish response.

FALSE the first Publish response after the TransferSubscriptions call shall contain only the value changes since the last Publish response was sent.

This parameter only applies to MonitoredItems used for monitoring Attribute changes.

The data should be sent in the next regular PublishingInterval.

Response

responseHeader

ResponseHeaderCommon response parameters (see 7.33 for ResponseHeader definition).

results []

TransferResultList of results for the Subscriptions to transfer. The size and order of the list matches the size and order of the subscriptionIds request parameter. This structure is defined in-line with the following indented items.

statusCode

StatusCode StatusCode for each Subscription to be transferred (see 7.38 for StatusCode definition).

availableSequence

Numbers []

CounterA list of sequence number ranges that identify NotificationMessages that are in the Subscription’s retransmission queue. This parameter is null or empty if the transfer of the Subscription failed. The Counter type is defined in 7.8.

diagnosticInfos []

DiagnosticInfoList of diagnostic information for the Subscriptions to transfer (see 7.12 for DiagnosticInfo definition). The size and order of the list matches the size and order of the subscriptionIds request parameter. This list is empty if diagnostics information was not requested in the request header or if no diagnostic information was encountered in processing of the request.
5.14.7.3 Service results

Table 95 defines the Service results specific to this Service. Common StatusCodes are defined in Table 178.

Table 95 – TransferSubscriptions Service Result Codes
Symbolic IdDescription
Bad_NothingToDoSee Table 178 for the description of this result code.
Bad_TooManyOperationsSee Table 178 for the description of this result code.
Bad_InsufficientClientProfileThe Client of the current Session does not support one or more Profiles that are necessary for the Subscription.
5.14.7.4 StatusCodes

Table 96 defines values for the operation level statusCode parameter that are specific to this Service. Common StatusCodes are defined in Table 179.

Table 96 – TransferSubscriptions Operation Level Result Codes
Symbolic IdDescription
Bad_SubscriptionIdInvalidSee Table 178 for the description of this result code.
Bad_UserAccessDenied

See Table 178 for the description of this result code.

The Client of the current Session is not operating on behalf of the same user as the Session that owns the Subscription.

Bad_TooManySubscriptionsThe Server has reached its maximum number of Subscriptions for the Session.
Bad_NothingToDo

See Table 178 for the description of this result code.

This result code is returned if the Subscription is already owned by the Session used to call TransferSubscription.