#include <uaclientsdk.h>
List of all members.
Public Member Functions |
virtual void | subscriptionStatusChanged (OpcUa_UInt32 clientSubscriptionHandle, const UaStatus &status)=0 |
virtual void | keepAlive (OpcUa_UInt32 clientSubscriptionHandle) |
virtual void | notificationsMissing (OpcUa_UInt32 clientSubscriptionHandle, OpcUa_UInt32 previousSequenceNumber, OpcUa_UInt32 newSequenceNumber) |
virtual void | dataChange (OpcUa_UInt32 clientSubscriptionHandle, const UaDataNotifications &dataNotifications, const UaDiagnosticInfos &diagnosticInfos)=0 |
virtual void | newEvents (OpcUa_UInt32 clientSubscriptionHandle, UaEventFieldLists &eventFieldList)=0 |
virtual void | createMonitoredItemsComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const UaMonitoredItemCreateResults &createResults, const UaDiagnosticInfos &diagnosticInfos) |
virtual void | modifyMonitoredItemsComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const UaMonitoredItemModifyResults &modifyResults, const UaDiagnosticInfos &diagnosticInfos) |
virtual void | setMonitoringModeComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const UaStatusCodeArray &setModeResults, const UaDiagnosticInfos &diagnosticInfos) |
virtual void | deleteMonitoredItemsComplete (OpcUa_UInt32 transactionId, const UaStatus &result, const UaStatusCodeArray &deleteResults, const UaDiagnosticInfos &diagnosticInfos) |
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
void UaClientSdk::UaSubscriptionCallback::createMonitoredItemsComplete |
( |
OpcUa_UInt32 |
transactionId, |
|
|
const UaStatus & |
result, |
|
|
const UaMonitoredItemCreateResults & |
createResults, |
|
|
const UaDiagnosticInfos & |
diagnosticInfos |
|
) |
| [virtual] |
Send createMonitoredItems results.
- Parameters:
-
[in] | transactionId | Client defined transction id for the createMonitoredItems |
[in] | result | Overall createMonitoredItems result |
[in] | createResults | List of createMonitoredItems results |
[in] | diagnosticInfos | List of diagnostic information |
virtual void UaClientSdk::UaSubscriptionCallback::dataChange |
( |
OpcUa_UInt32 |
clientSubscriptionHandle, |
|
|
const UaDataNotifications & |
dataNotifications, |
|
|
const UaDiagnosticInfos & |
diagnosticInfos |
|
) |
| [pure virtual] |
Send changed data. This callback function provides the data notification for a subscription.
- Parameters:
-
[in] | clientSubscriptionHandle | Client defined handle of the affected subscription |
[in] | dataNotifications | List of data notifiations sent by the server |
[in] | diagnosticInfos | List of diagnostic info related to the data notifications. This list can be empty. |
void UaClientSdk::UaSubscriptionCallback::deleteMonitoredItemsComplete |
( |
OpcUa_UInt32 |
transactionId, |
|
|
const UaStatus & |
result, |
|
|
const UaStatusCodeArray & |
deleteResults, |
|
|
const UaDiagnosticInfos & |
diagnosticInfos |
|
) |
| [virtual] |
Send deleteMonitoredItems results.
- Parameters:
-
[in] | transactionId | Client defined transction id for the deleteMonitoredItems |
[in] | result | Overall deleteMonitoredItems result |
[in] | deleteResults | List of deleteMonitoredItems results |
[in] | diagnosticInfos | List of diagnostic information |
void UaClientSdk::UaSubscriptionCallback::keepAlive |
( |
OpcUa_UInt32 |
clientSubscriptionHandle ) |
[virtual] |
Send subscription keep alive. This callback function provides the keep alive messages sent by the server if no changed data or events are available.
- Parameters:
-
[in] | clientSubscriptionHandle | Client defined handle of the affected subscription |
void UaClientSdk::UaSubscriptionCallback::modifyMonitoredItemsComplete |
( |
OpcUa_UInt32 |
transactionId, |
|
|
const UaStatus & |
result, |
|
|
const UaMonitoredItemModifyResults & |
modifyResults, |
|
|
const UaDiagnosticInfos & |
diagnosticInfos |
|
) |
| [virtual] |
Send modifyMonitoredItems results.
- Parameters:
-
[in] | transactionId | Client defined transction id for the modifyMonitoredItems |
[in] | result | Overall modifyMonitoredItems result |
[in] | modifyResults | List of modifyMonitoredItems results |
[in] | diagnosticInfos | List of diagnostic information |
virtual void UaClientSdk::UaSubscriptionCallback::newEvents |
( |
OpcUa_UInt32 |
clientSubscriptionHandle, |
|
|
UaEventFieldLists & |
eventFieldList |
|
) |
| [pure virtual] |
Send new events. This callback function provides the event notification for a subscription.
- Parameters:
-
[in] | clientSubscriptionHandle | Client defined handle of the affected subscription |
[in] | eventFieldList | List of event notifiations sent by the server |
void UaClientSdk::UaSubscriptionCallback::notificationsMissing |
( |
OpcUa_UInt32 |
clientSubscriptionHandle, |
|
|
OpcUa_UInt32 |
previousSequenceNumber, |
|
|
OpcUa_UInt32 |
newSequenceNumber |
|
) |
| [virtual] |
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:
-
[in] | clientSubscriptionHandle | Client defined handle of the affected subscription |
[in] | previousSequenceNumber | Sequence number of the previously received notification |
[in] | newSequenceNumber | Sequence number of the new notification |
void UaClientSdk::UaSubscriptionCallback::setMonitoringModeComplete |
( |
OpcUa_UInt32 |
transactionId, |
|
|
const UaStatus & |
result, |
|
|
const UaStatusCodeArray & |
setModeResults, |
|
|
const UaDiagnosticInfos & |
diagnosticInfos |
|
) |
| [virtual] |
Send setMonitoringMode results.
- Parameters:
-
[in] | transactionId | Client defined transction id for the setMonitoringMode |
[in] | result | Overall setMonitoringMode result |
[in] | setModeResults | List of setMonitoringMode results |
[in] | diagnosticInfos | List of diagnostic information |
virtual void UaClientSdk::UaSubscriptionCallback::subscriptionStatusChanged |
( |
OpcUa_UInt32 |
clientSubscriptionHandle, |
|
|
const UaStatus & |
status |
|
) |
| [pure virtual] |
Send subscription state change. This callback function informs the client if the status of a subscription changes. This can happen after a connection error that was longer than the lifetime of the subscription. The lifetime is calculated from PublishingInterval x MaxKeepAliveCount x LifetimeCount. A client must create a new subscription to continue data or event monitoring if this callback indicates a bad status for the subscripiton. UaSession::deleteSubscription should be called even if the subscription is not longer valid in the server to clear the client side subscription object.
- Parameters:
-
[in] | clientSubscriptionHandle | Client defined handle of the affected subscription |
[in] | status | Changes status for the subscription |
The documentation for this class was generated from the following files:
- /home/buildbot/work/uasdkcpp/src/uaclient/uaclientcpp/uaclientsdk.h
- /home/buildbot/work/uasdkcpp/src/uaclient/uaclientcpp/uaclientsdk.cpp