The action functions are defined alphabetically in Table 87.

Table 87– Functions

Function

Description

ClientValidated()

A boolean function that returns TRUE only when the Clientthat is submitting a TransferSubscriptions request is operating on behalf of the same user and supports the same Profilesas the Clientof the previous Session.

CreateNotificationMsg()

Increment the SeqNum and create a NotificationMessagefrom the MonitoredItemsassigned to the Subscription.

Save the newly-created NotificationMessagein the retransmission queue.

If all available Notificationscan be sent in the Publishresponse, the MoreNotifications state Variableis set to FALSE. Otherwise, it is set to TRUE.

CreateSubscription()

Attempt to create the Subscription.

DeleteAckedNotificationMsgs()

Delete the NotificationMessagesfrom the retransmission queue that were acknowledged by the request.

DeleteClientPublReqQueue()

Clear the Publishrequest queue for the Clientthat is sending the DeleteSubscriptions request, if there are no more Subscriptionsassigned to that Client.

DeleteMonitoredItems()

Delete all MonitoredItemsassigned to the Subscription.

DequeuePublishReq()

De-queue a publishing request in first-in first-out order.

Validate if the publish request is still valid by checking the timeoutHint in the RequestHeader.

If the request timed out, send a Bad_Timeoutservice result for the request and de-queue another publish request.

ResetLifetimeCounter()

EnqueuePublishingReq()

Enqueue the publishing request.

InitializeSubscription()

ResetLifetimeCounter()

MoreNotifications = FALSE

PublishRateChange = FALSE

PublishingEnabled = value of publishingEnabled parameter in the CreateSubscription request

PublishingReqQueued = FALSE

SeqNum = 0

SetSession()

StartPublishingTimer()

IssueStatusChangeNotification()

Issue a StatusChangeNotification notificationMessagewith a status code for the status change of the Subscription. The StatusChangeNotification notificationMessagetype is defined in 7.25.4. Bad_Timeout status code is used if the lifetime expires and Good_SubscriptionTransferred is used if the Subscriptionswas transferred to another Session.

ResetKeepAliveCounter()

Reset the keep-alive counter to the maximum keep-alive count of the Subscription. The maximum keep-alive count is set by the Clientwhen the Subscriptionis created and may be modified using the ModifySubscription Service.

ResetLifetimeCounter()

Reset the LifetimeCounter Variableto the value specified for the lifetime of a Subscriptionin the CreateSubscription Service(5.13.2).

ReturnKeepAlive()

CreateKeepAliveMsg()

ReturnResponse()

ReturnNegativeResponse ()

Return a Serviceresponse indicating the appropriate Servicelevel error. No parameters are returned other than the responseHeader that contains the Servicelevel StatusCode.

ReturnNotifications()

CreateNotificationMsg()

ReturnResponse()

If (MoreNotifications == TRUE) && (PublishingReqQueued == TRUE)

{

DequeuePublishReq()

Loop through this function again

}

ReturnResponse()

Return the appropriate response, setting the appropriate parameter values and StatusCodesdefined for the Service.

SessionChanged()

A boolean function that returns TRUE only when the Sessionused to send a TransferSubscriptions request is different from the Client Sessioncurrently associated with the Subscription.

SetPublishingEnabled ()

Set the PublishingEnabled state Variableto the value of the publishingEnabled parameter received in the request.

SetSession

Set the Sessioninformation for the Subscriptionto match the Sessionon which the TransferSubscriptions request was issued.

StartPublishingTimer()

Start or restart the publishing timer and decrement the LifetimeCounter Variable.

UpdateSubscriptionParams()

Negotiate and update the Subscriptionparameters. If the new keep-alive interval is less than the current value of the keep-alive counter, perform ResetKeepAliveCounter() and ResetLifetimeCounter().