ANSI C UA Server SDK  1.6.0.341
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
UaClient_Subscription Struct Reference

The UaSubscription structure manges a UA Client created subscription. More...

#include <uaclient_subscription.h>

Data Fields

OpcUa_Double PublishingInterval
 The PublishingInterval defines the cyclic rate in milliseconds at which the subscription is being requested to return notifications to the client. More...
 
OpcUa_UInt32 LifetimeCount
 The subscription has a lifetime that is defined by multiples of the PublishingInterval. More...
 
OpcUa_UInt32 MaxKeepAliveCount
 If the server has no notifications pending for the period of time defined by (MaxKeepAliveCount * PublishingInterval), the server will send a KeepAlive message to the client. More...
 
OpcUa_UInt32 MaxNotificationsPerPublish
 The maximum number of notifications that the client wishes to receive in a single publish response. More...
 
OpcUa_Boolean PublishingEnabled
 Flag indicating whether publishing is enabled or disabled. More...
 
OpcUa_Byte Priority
 Defines the relative priority of this subscription within the session. More...
 
OpcUa_Void * pUserData
 User defined data which can be set freely by the application. More...
 
OpcUa_Double RevisedPublishingInterval
 The revised PublishingInterval as returned by the server. More...
 
OpcUa_UInt32 RevisedLifetimeCount
 The revised LifetimeCount as returned by the server. More...
 
OpcUa_UInt32 RevisedMaxKeepAliveCount
 The revised MaxKeepAliveCount as returned by the server. More...
 
OpcUa_Boolean IsValid
 Flag indicating if the subscription is representing a subscription in the server. More...
 
OpcUa_UInt32 SubscriptionId
 The server assigned ID of the subscription. More...
 

Detailed Description

The UaSubscription structure manges a UA Client created subscription.

The callback interface UaClient_Subscription_Callback needs to be implemented by the user of the UaClient_Subscription structure to receive data change, event and subscription status change callbacks from the Client SDK. 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 stored by the client application anyway. Duplicating this information in the SDK would consume too much memory.

Field Documentation

OpcUa_Boolean UaClient_Subscription::IsValid

Flag indicating if the subscription is representing a subscription in the server.

OpcUa_UInt32 UaClient_Subscription::LifetimeCount

The subscription has a lifetime that is defined by multiples of the PublishingInterval.

If the client can't communicate with the server for a period of time shorter than (LifetimeCount * PublishingInterval), then the subscription is still available in the server. After that, the server will delete the subscription. With a PublishingInterval of 1000 ms, the default is 20 minutes like the default lifetime of the session. Please make sure to adjust the LifetimeCount if you change the PublishingInterval.

OpcUa_UInt32 UaClient_Subscription::MaxKeepAliveCount

If the server has no notifications pending for the period of time defined by (MaxKeepAliveCount * PublishingInterval), the server will send a KeepAlive message to the client.

Thus, client and server know that the other side is still alive even if no data has been exchanged for some time.

OpcUa_UInt32 UaClient_Subscription::MaxNotificationsPerPublish

The maximum number of notifications that the client wishes to receive in a single publish response.

This is one way for the client to limit memory consumption.

OpcUa_Byte UaClient_Subscription::Priority

Defines the relative priority of this subscription within the session.

If multiple subscriptions need to send notifications to the client, the server will send notifications to the subscription with the highest priority first.

OpcUa_Boolean UaClient_Subscription::PublishingEnabled

Flag indicating whether publishing is enabled or disabled.

OpcUa_Double UaClient_Subscription::PublishingInterval

The PublishingInterval defines the cyclic rate in milliseconds at which the subscription is being requested to return notifications to the client.

OpcUa_Void* UaClient_Subscription::pUserData

User defined data which can be set freely by the application.

OpcUa_UInt32 UaClient_Subscription::RevisedLifetimeCount

The revised LifetimeCount as returned by the server.

OpcUa_UInt32 UaClient_Subscription::RevisedMaxKeepAliveCount

The revised MaxKeepAliveCount as returned by the server.

OpcUa_Double UaClient_Subscription::RevisedPublishingInterval

The revised PublishingInterval as returned by the server.

OpcUa_UInt32 UaClient_Subscription::SubscriptionId

The server assigned ID of the subscription.


The documentation for this struct was generated from the following file: