Implements the UA subscription manager. Derived from UaThread. It is not possible to create plane copies of this class. It is not possible to use the default constructor.
More...
#include <uasubscriptionmanager.h>
List of all members.
Public Member Functions |
| UaSubscriptionManager (ServerManager *pServerManager) |
virtual | ~UaSubscriptionManager () |
UaStatus | startUp () |
UaStatus | shutDown () |
UaStatus | createSubscription (UaSession *pSession, OpcUa_Double &publishingInterval, OpcUa_UInt32 &lifetimeCount, OpcUa_UInt32 &maxKeepAliveCount, OpcUa_UInt32 maxNotificationPerPublish, OpcUa_Boolean publishingEnabled, OpcUa_Byte priority, OpcUa_UInt32 &subscriptionId) |
UaStatus | modifySubscription (UaSession *pSession, OpcUa_UInt32 subscriptionId, OpcUa_Double &publishingInterval, OpcUa_UInt32 &lifetimeCount, OpcUa_UInt32 &maxKeepAliveCount, OpcUa_UInt32 maxNotificationPerPublish, OpcUa_Byte priority) |
UaStatus | setPublishingMode (UaSession *pSession, OpcUa_UInt32 subscriptionId, OpcUa_Boolean publishingMode) |
UaStatus | deleteSubscription (UaSession *pSession, OpcUa_UInt32 subscriptionId) |
UaStatus | transferSubscription (UaSession *pSession, OpcUa_UInt32 subscriptionId, OpcUa_Boolean sendInitialValues, UaUInt32Array &availableSequenceNumbers) |
UaStatus | beginPublish (UaPublishContext *pUaPublishContext) |
UaStatus | beginRepublish (UaRepublishContext *pUaRepublishContext) |
UaStatus | beginCreateMonitoredItems (UaCreateMonitoredItemsContext *pUaCreateMonitoredItemsContext) |
UaStatus | beginModifyMonitoredItems (UaModifyMonitoredItemsContext *pUaModifyMonitoredItemsContext) |
UaStatus | beginSetMonitoringMode (UaSetMonitoringModeContext *pUaSetMonitoringModeContext) |
UaStatus | setTriggering (UaSession *pSession, OpcUa_UInt32 subscriptionId, OpcUa_UInt32 triggeringItemId, const UaUInt32Array &linksToAdd, const UaUInt32Array &linksToRemove, UaStatusCodeArray &addResults, UaStatusCodeArray &removeResults) |
UaStatus | beginDeleteMonitoredItems (UaDeleteMonitoredItemsContext *pUaDeleteMonitoredItemsContext) |
UaStatus | beginConditionRefresh (const ServiceContext &serviceContext, OpcUa_UInt32 SubscriptionId) |
void | run () |
virtual void | dynamicEventManagerRegistered (EventManager *pEventManager) |
virtual void | executeDynamicEventManagerRegistered (EventManager *pEventManager) |
Protected Member Functions |
virtual UaSubscription * | createUaSubscription (UaSession *pSession, ServerManager *pServerManager, OpcUa_Double publishingInterval, OpcUa_UInt32 &lifetimeCount, OpcUa_UInt32 maxKeepAliveCount, OpcUa_UInt32 maxRetransmitionQueueSize, OpcUa_UInt32 maxNotificationPerPublish, OpcUa_Boolean publishingEnabled, OpcUa_Byte priority) |
virtual OpcUa_Int32 | getNewSubscriptionId () |
virtual void | subscriptionCreated (UaSubscription *) |
virtual void | subscriptionModified (UaSubscription *) |
virtual void | subscriptionChangedPublishMode (UaSubscription *) |
virtual void | subscriptionDeleted (UaSubscription *) |
void | incrementCurrentSubscriptionCount () |
void | decrementCurrentSubscriptionCount () |
void | incrementCumulatedSubscriptionCount () |
void | clearSubscriptions () |
UaSubscription * | findSubscription (OpcUa_UInt32 integerId) |
OpcUa_UInt32 | addSubscription (UaSubscription *pSubscription) |
void | addSubscription (OpcUa_UInt32 subscriptionId, UaSubscription *pSubscription) |
void | removeSubscription (OpcUa_UInt32 integerId) |
OpcUa_UInt32 | subscriptionCount () |
UaSubscription * | getFirstSubscription () |
UaSubscription * | getNextSubscription () |
Protected Attributes |
OpcUa_UInt32 | m_lastIntegerId |
Detailed Description
Implements the UA subscription manager. Derived from UaThread. It is not possible to create plane copies of this class. It is not possible to use the default constructor.
UaSubscriptionManager
Constructor & Destructor Documentation
UaSubscriptionManager::UaSubscriptionManager |
( |
ServerManager * |
pServerManager ) |
|
UaSubscriptionManager::~UaSubscriptionManager |
( |
) |
[virtual] |
Member Function Documentation
OpcUa_UInt32 UaSubscriptionManager::addSubscription |
( |
UaSubscription * |
pSubscription ) |
[protected] |
Adds Subscriptions and returns the assigned integerId.
- Parameters:
-
pSubscription | The subscription to add. |
- Returns:
- The assigned integer id for the added subscription.
void UaSubscriptionManager::addSubscription |
( |
OpcUa_UInt32 |
subscriptionId, |
|
|
UaSubscription * |
pSubscription |
|
) |
| [protected] |
Adds Subscriptions with a specified integerId.
- Parameters:
-
subscriptionId | The subscription id for the subscription to add. |
pSubscription | The subscription to add. |
UaStatus UaSubscriptionManager::beginConditionRefresh |
( |
const ServiceContext & |
serviceContext, |
|
|
OpcUa_UInt32 |
subscriptionId |
|
) |
| |
Refresh condition state for the passed subscription.
- Parameters:
-
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. |
subscriptionId | |
Create new monitored items.
- Parameters:
-
pUaCreateMonitoredItemsContext | the context of the items to create. |
- Returns:
- Error code
Delete monitored items.
- Parameters:
-
pUaDeleteMonitoredItemsContext | the context to delete. |
- Returns:
- Error code
Modify monitored items.
- Parameters:
-
pUaModifyMonitoredItemsContext | the context for the monitored items to modify. |
- Returns:
- Error code
Begin a Publish transaction.
- Parameters:
-
pUaPublishContext | the context of the needed publish transaction. |
- Returns:
- Error code
Begin a Republish transaction.
- Parameters:
-
pUaRepublishContext | the context of the Republish transaction. |
- Returns:
- Error code
Set monitoring mode of monitored items.
- Parameters:
-
pUaSetMonitoringModeContext | the context to be set. |
- Returns:
- Error code
void UaSubscriptionManager::clearSubscriptions |
( |
) |
[protected] |
Clears the management and releases references to the Subscriptions.
UaStatus UaSubscriptionManager::createSubscription |
( |
UaSession * |
pSession, |
|
|
OpcUa_Double & |
publishingInterval, |
|
|
OpcUa_UInt32 & |
lifetimeCount, |
|
|
OpcUa_UInt32 & |
maxKeepAliveCount, |
|
|
OpcUa_UInt32 |
maxNotificationPerPublish, |
|
|
OpcUa_Boolean |
publishingEnabled, |
|
|
OpcUa_Byte |
priority, |
|
|
OpcUa_UInt32 & |
subscriptionId |
|
) |
| |
Create a new Subscription.
- Parameters:
-
pSession | Interface to the Session context for the method call |
publishingInterval | publishing interval in milliseconds the server allows |
lifetimeCount | a count for the the actual lifetime. |
maxKeepAliveCount | the maximum of Time to keep the Session alive. |
maxNotificationPerPublish | the maximum of notification per Publish. |
publishingEnabled | indicates if publishing is enabled or not. |
priority | the priority of the operation. |
subscriptionId | the Id of the Subscription. |
- Returns:
- Error code
UaSubscription * UaSubscriptionManager::createUaSubscription |
( |
UaSession * |
pSession, |
|
|
ServerManager * |
pServerManager, |
|
|
OpcUa_Double |
publishingInterval, |
|
|
OpcUa_UInt32 & |
lifetimeCount, |
|
|
OpcUa_UInt32 |
maxKeepAliveCount, |
|
|
OpcUa_UInt32 |
maxRetransmitionQueueSize, |
|
|
OpcUa_UInt32 |
maxNotificationPerPublish, |
|
|
OpcUa_Boolean |
publishingEnabled, |
|
|
OpcUa_Byte |
priority |
|
) |
| [protected, virtual] |
Creates a new subscription object. This method can be overwritten by a derived class to create a implementation specific derived class of UaSubscription.
- Parameters:
-
pSession | Interface to the Session context for the method call |
pServerManager | Interface to the central ServerManager object. |
maxRetransmitionQueueSize | Maximum number of messages in the republish queue the server allows per Subscription |
publishingInterval | publishing interval in milliseconds the server allows |
lifetimeCount | a count for the the actual lifetime. |
maxKeepAliveCount | the maximum of Time to keep the Session alive. |
publishingEnabled | |
maxNotificationPerPublish | the maximum of notification per Publish. |
priority | the priority of the operation. |
void UaSubscriptionManager::decrementCurrentSubscriptionCount |
( |
) |
[protected] |
Decrements the current subscription count.
UaStatus UaSubscriptionManager::deleteSubscription |
( |
UaSession * |
pSession, |
|
|
OpcUa_UInt32 |
subscriptionId |
|
) |
| |
Delete a Subscription.
- Parameters:
-
pSession | Interface to the Session context for the method call |
subscriptionId | the Id of the Subscription. |
- Returns:
- Error code
void UaSubscriptionManager::dynamicEventManagerRegistered |
( |
EventManager * |
pEventManager ) |
[virtual] |
Callback for new EventManager added to the server.
- Parameters:
-
void UaSubscriptionManager::executeDynamicEventManagerRegistered |
( |
EventManager * |
pEventManager ) |
[virtual] |
Executes the registration of a new EventManager added to the server.
- Parameters:
-
UaSubscription * UaSubscriptionManager::findSubscription |
( |
OpcUa_UInt32 |
integerId ) |
[protected] |
Find Subscriptions with a specified SubscriptionId.
- Parameters:
-
integerId | the specified SubscriptionId to find. |
- Returns:
- the found Subscriptions.
UaSubscription * UaSubscriptionManager::getFirstSubscription |
( |
) |
[protected] |
Get the first available Subscription.
- Returns:
- the first available Subscription.
OpcUa_Int32 UaSubscriptionManager::getNewSubscriptionId |
( |
) |
[protected, virtual] |
Returns a new unique subscription id The method can be overwritten by a derived class
UaSubscription * UaSubscriptionManager::getNextSubscription |
( |
) |
[protected] |
Get the next available Subscription.
- Returns:
- the next available Subscription.
void UaSubscriptionManager::incrementCumulatedSubscriptionCount |
( |
) |
[protected] |
Increments the cumulated subscription count.
void UaSubscriptionManager::incrementCurrentSubscriptionCount |
( |
) |
[protected] |
Increments the current subscription count.
UaStatus UaSubscriptionManager::modifySubscription |
( |
UaSession * |
pSession, |
|
|
OpcUa_UInt32 |
subscriptionId, |
|
|
OpcUa_Double & |
publishingInterval, |
|
|
OpcUa_UInt32 & |
lifetimeCount, |
|
|
OpcUa_UInt32 & |
maxKeepAliveCount, |
|
|
OpcUa_UInt32 |
maxNotificationPerPublish, |
|
|
OpcUa_Byte |
priority |
|
) |
| |
Modify an existing Subscription.
- Parameters:
-
pSession | Interface to the Session context for the method call |
subscriptionId | the Id of the Subscription. |
publishingInterval | publishing interval in milliseconds the server allows |
lifetimeCount | a count for the the actual lifetime. |
maxKeepAliveCount | the maximum of Time to keep the Session alive. |
maxNotificationPerPublish | the maximum of notification per Publish. |
priority | the priority of the operation. |
- Returns:
- Error code
void UaSubscriptionManager::removeSubscription |
( |
OpcUa_UInt32 |
integerId ) |
[protected] |
Removes Subscriptions with a specified integerId.
- Parameters:
-
integerId | the area where of the Subscription to remove. |
void UaSubscriptionManager::run |
( |
) |
[virtual] |
Main thread method.
Implements UaThread.
UaStatus UaSubscriptionManager::setPublishingMode |
( |
UaSession * |
pSession, |
|
|
OpcUa_UInt32 |
subscriptionId, |
|
|
OpcUa_Boolean |
publishingMode |
|
) |
| |
Set PublishingMode of a Subscription.
- Parameters:
-
pSession | Interface to the Session context for the method call |
subscriptionId | the Id of the Subscription. |
publishingMode | true if publishing mode false if not. |
- Returns:
- Error code
UaStatus UaSubscriptionManager::setTriggering |
( |
UaSession * |
pSession, |
|
|
OpcUa_UInt32 |
subscriptionId, |
|
|
OpcUa_UInt32 |
triggeringItemId, |
|
|
const UaUInt32Array & |
linksToAdd, |
|
|
const UaUInt32Array & |
linksToRemove, |
|
|
UaStatusCodeArray & |
addResults, |
|
|
UaStatusCodeArray & |
removeResults |
|
) |
| |
Set triggering of monitored items.
- Parameters:
-
pSession | Interface to the Session context for the method call |
subscriptionId | the Id of the Subscription. |
triggeringItemId | the Id of the items to set triggering to. |
linksToAdd | the number of links to add to the monitored item. |
linksToRemove | the number of links toremove from the monitored item. |
addResults | the results of this operation. |
removeResults | the results to remove from this operation. |
- Returns:
- Error code
UaStatus UaSubscriptionManager::shutDown |
( |
) |
|
Start up subscription manager.
- Returns:
- Error code
UaStatus UaSubscriptionManager::startUp |
( |
) |
|
Start up subscription manager.
- Returns:
- Error code
virtual void UaSubscriptionManager::subscriptionChangedPublishMode |
( |
UaSubscription * |
) |
[inline, protected, virtual] |
Event for derived classes indicating that the publish mode of a subscription was changed.
- Parameters:
-
pUaSubscription | Interface pointer of the changed subscription. |
OpcUa_UInt32 UaSubscriptionManager::subscriptionCount |
( |
) |
[protected] |
Counts all available Subscriptions.
- Returns:
- the counted number of all Subscriptions.
virtual void UaSubscriptionManager::subscriptionCreated |
( |
UaSubscription * |
) |
[inline, protected, virtual] |
Event for derived classes indicating that a new subscription was created.
- Parameters:
-
pUaSubscription | Interface pointer of the new subscription. |
virtual void UaSubscriptionManager::subscriptionDeleted |
( |
UaSubscription * |
) |
[inline, protected, virtual] |
Event for derived classes indicating that a subscription was deleted.
- Parameters:
-
pUaSubscription | Interface pointer of the deleted subscription. |
virtual void UaSubscriptionManager::subscriptionModified |
( |
UaSubscription * |
) |
[inline, protected, virtual] |
Event for derived classes indicating that a subscription was modified.
- Parameters:
-
pUaSubscription | Interface pointer of the modified subscription. |
UaStatus UaSubscriptionManager::transferSubscription |
( |
UaSession * |
pSession, |
|
|
OpcUa_UInt32 |
subscriptionId, |
|
|
OpcUa_Boolean |
sendInitialValues, |
|
|
UaUInt32Array & |
availableSequenceNumbers |
|
) |
| |
Member Data Documentation
Last used integer ID for subscriptions
The documentation for this class was generated from the following files:
- /home/buildbot/work/uasdkcpp/src/uaserver/uaservercpp/uamodule/uasubscriptionmanager.h
- /home/buildbot/work/uasdkcpp/src/uaserver/uaservercpp/uamodule/uasubscriptionmanager.cpp