UaClientSdk::UaSubscriptionCallback Class Reference
[UA Client Library]

#include <uaclientsdk.h>

List of all members.


Public Member Functions

virtual void subscriptionStatusChanged (OpcUa_UInt32 clientSubscriptionHandle, const UaStatus &status)=0
 [in] Changes status for the subscription
virtual void keepAlive (OpcUa_UInt32 clientSubscriptionHandle)
 [in] Client defined handle of the affected subscription
virtual void notificationsMissing (OpcUa_UInt32 clientSubscriptionHandle, OpcUa_UInt32 previousSequenceNumber, OpcUa_UInt32 newSequenceNumber)
 [in] Sequence number of the new notification
virtual void dataChange (OpcUa_UInt32 clientSubscriptionHandle, const UaDataNotifications &dataNotifications, const UaDiagnosticInfos &diagnosticInfos)=0
 [in] List of diagnostic info related to the data notifications. This list can be empty.
virtual void newEvents (OpcUa_UInt32 clientSubscriptionHandle, UaEventFieldLists &eventFieldList)=0
 [in] List of event notifiations sent by the server

Detailed Description

UaSubscriptionCallback defines the callback interface for the UaSubscription class. This callback interface needs to be implemented by the user of the UaSubscription class to receive data change, event and subscription status change callbacks from the Client SDK. The interface provides also a callback function for keep alive calls from the server. This functione need to be implemented only by users of the SDK interested in the keep alive callbacks. The status of the subscription is normally monitored by the SDK and changes are indicated by sending subscription status changed callbacks. In cases of Subscription errors the user of the SDK is responsible for creating a new subscription since the SDK does not keep the information to recreate the Subscription to not increase memory consumption. The necessary information needs to be kept also by the client application anyway. To duplicate this information in the SDK consumes too much memory.
Callbacks from the SDK APIs are coming from worker threads and not from the thread that was used to connect to the server. It is in the responsibility of the user of the client API to syncronize the data provided by the callbacks with a GUI main thread if this is necessary.

Member Function Documentation

virtual void UaClientSdk::UaSubscriptionCallback::subscriptionStatusChanged ( OpcUa_UInt32  clientSubscriptionHandle,
const UaStatus status 
) [pure virtual]

[in] Changes status for the subscription

Send subscription state change. This callback function informs the client if the status of a subscription changes.

Parameters:
clientSubscriptionHandle  [in] Client defined handle of the affected subscription

void UaClientSdk::UaSubscriptionCallback::keepAlive ( OpcUa_UInt32  clientSubscriptionHandle  )  [virtual]

[in] Client defined handle of the affected subscription

Send subscription keep alive. This callback function provides the keep alive messages sent by the server if no changed data or events are available.

void UaClientSdk::UaSubscriptionCallback::notificationsMissing ( OpcUa_UInt32  clientSubscriptionHandle,
OpcUa_UInt32  previousSequenceNumber,
OpcUa_UInt32  newSequenceNumber 
) [virtual]

[in] Sequence number of the new notification

Informs the client about missing notification messages. The client SDK monitores the sequence numbers of the received data and event notifications and reports gaps in the sequence numbers using this callback method. The client can use the UaSubscription::republish method to request the missing notifications.

Parameters:
clientSubscriptionHandle  [in] Client defined handle of the affected subscription
previousSequenceNumber  [in] Sequence number of the previously received notification

virtual void UaClientSdk::UaSubscriptionCallback::dataChange ( OpcUa_UInt32  clientSubscriptionHandle,
const UaDataNotifications &  dataNotifications,
const UaDiagnosticInfos &  diagnosticInfos 
) [pure virtual]

[in] List of diagnostic info related to the data notifications. This list can be empty.

Send changed data. This callback function provides the data notification for a subscription.

Parameters:
clientSubscriptionHandle  [in] Client defined handle of the affected subscription
dataNotifications  [in] List of data notifiations sent by the server

virtual void UaClientSdk::UaSubscriptionCallback::newEvents ( OpcUa_UInt32  clientSubscriptionHandle,
UaEventFieldLists &  eventFieldList 
) [pure virtual]

[in] List of event notifiations sent by the server

Send new events. This callback function provides the event notification for a subscription.

Parameters:
clientSubscriptionHandle  [in] Client defined handle of the affected subscription


The documentation for this class was generated from the following files:
  • src/uaclient/uaclientcpp/uaclientsdk.h
  • src/uaclient/uaclientcpp/uaclientsdk.cpp