#include <uasubscription.h>
Public Types | |
enum | State { CLOSED, CREATING, NORMAL, LATE, KEEPALIVE } |
Subscription state enumeration. More... | |
Public Member Functions | |
UaSubscription (Session *pSession, ServerManager *pServerManager, OpcUa_Double publishingInterval, OpcUa_UInt32 &lifetimeCount, OpcUa_UInt32 maxKeepAliveCount, OpcUa_UInt32 maxNotificationPerPublish, OpcUa_Boolean publishingEnabled, OpcUa_Byte priority) | |
UaStatus | close (OpcUa_Boolean calledFromSessionClose=OpcUa_False) |
UaStatus | finishRead (OpcUa_UInt32, OpcUa_UInt32, UaDataValue &, OpcUa_Boolean, OpcUa_Boolean, UaDiagnosticInfo *) |
UaStatus | finishWrite (OpcUa_UInt32, OpcUa_UInt32, const UaStatus &, OpcUa_Boolean) |
UaStatus | finishStartMonitoring (OpcUa_UInt32 hTransaction, OpcUa_UInt32 callbackHandle, OpcUa_UInt32 hIOVariable, OpcUa_Double revisedSamplingInterval, OpcUa_Boolean initialDataValueAvailable, const UaDataValue &initialDataValue, const UaStatus &statusCode) |
UaStatus | finishModifyMonitoring (OpcUa_UInt32 hTransaction, OpcUa_UInt32 callbackHandle, OpcUa_Double revisedSamplingInterval, const UaStatus &statusCode) |
UaStatus | finishStopMonitoring (OpcUa_UInt32 hTransaction, OpcUa_UInt32 callbackHandle, const UaStatus &statusCode) |
UaStatus | finishStartMonitoring (OpcUa_UInt32 hTransaction, OpcUa_UInt32 callbackHandle, OpcUa_UInt32 eventManagerIndex, OpcUa_UInt32 hEventItem, OpcUa_Double revisedSamplingInterval, const UaStatus &statusCode) |
UaStatus | finishModifyMonitoring (OpcUa_UInt32 hTransaction, OpcUa_UInt32 callbackHandle, OpcUa_UInt32 eventManagerIndex, OpcUa_Double revisedSamplingInterval, const UaStatus &statusCode) |
UaStatus | finishStopMonitoring (OpcUa_UInt32 hTransaction, OpcUa_UInt32 callbackHandle, OpcUa_UInt32 eventManagerIndex, const UaStatus &statusCode) |
UaStatus | beginCreateMonitoredItems (UaCreateMonitoredItemsContext *pUaCreateMonitoredItemsContext) |
UaStatus | beginModifyMonitoredItems (UaModifyMonitoredItemsContext *pUaModifyMonitoredItemsContext) |
UaStatus | beginSetMonitoringMode (UaSetMonitoringModeContext *pUaSetMonitoringModeContext) |
UaStatus | beginDeleteMonitoredItems (UaDeleteMonitoredItemsContext *pUaDeleteMonitoredItemsContext) |
OpcUa_UInt32 | checkPublishTimer (OpcUa_Boolean &doCheckAvailableNotifications) |
void | checkAvailableNotifications () |
UaStatus | publish (UaPublishContext *pUaPublishContext) |
void | setPublishingMode (OpcUa_Boolean publishingEnabled) |
void | modifySubscription (OpcUa_Double publishingInterval, OpcUa_UInt32 &lifetimeCount, OpcUa_UInt32 maxKeepAliveCount, OpcUa_UInt32 maxNotificationPerPublish, OpcUa_Byte priority) |
Protected Member Functions | |
virtual | ~UaSubscription () |
UaSubscription::~UaSubscription | ( | ) | [protected, virtual] |
destruction
UaSubscription::UaSubscription | ( | Session * | pSession, | |
ServerManager * | pServerManager, | |||
OpcUa_Double | publishingInterval, | |||
OpcUa_UInt32 & | lifetimeCount, | |||
OpcUa_UInt32 | maxKeepAliveCount, | |||
OpcUa_UInt32 | maxNotificationPerPublish, | |||
OpcUa_Boolean | publishingEnabled, | |||
OpcUa_Byte | priority | |||
) |
construction
pSession | Interface to the Session context for the method call | |
pNodeManagerRoot | a pointer to the root NodeManager. | |
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. |
UaStatus UaSubscription::close | ( | OpcUa_Boolean | calledFromSessionClose = OpcUa_False |
) |
Close subscription.
calledFromSessionClose | true if session closed false if not. |
List of objects to store a subset of the data for a IOManager
UaStatus UaSubscription::finishRead | ( | OpcUa_UInt32 | hTransaction, | |
OpcUa_UInt32 | callbackHandle, | |||
UaDataValue & | dataValue, | |||
OpcUa_Boolean | detachValue, | |||
OpcUa_Boolean | allowThreadUse, | |||
UaDiagnosticInfo * | pDiagnosticInfo | |||
) | [inline, virtual] |
Finished reading of an attribute value of a node. The method is called to finish a read call for an attribute value of a node. The read is started with the beginRead method of the interface IOManager.
hTransaction | Handle for the transaction used by the SDK to identify the transaction in the callbacks. This handle was passed in to the IOManager with the beginTransaction method. | |
callbackHandle | Handle for the node in the callback. This handle was passed in to the IOManager with the beginRead method. | |
dataValue | Contains the value, timestamps and result code for the Read operation. | |
detachValue | Indicates if the method can detach the value from the wrapper class. | |
allowThreadUse | Indicates if the calling thread can be used to send the response if this is the callback for the last node in the transaction. | |
pDiagnosticInfo | Optional diagnostig information requested by the client in the parameter ServiceContext::returnDiagnostics of IOManager::beginTransaction |
Implements IOManagerCallback.
UaStatus UaSubscription::finishWrite | ( | OpcUa_UInt32 | hTransaction, | |
OpcUa_UInt32 | callbackHandle, | |||
const UaStatus & | statusCode, | |||
OpcUa_Boolean | allowThreadUse | |||
) | [inline, virtual] |
Finished writing of an attribute value of a node. The method is called to finish a write call for an attribute value of a node. The write is started with the beginWrite method of the interface IOManager.
hTransaction | Handle for the transaction used by the SDK to identify the transaction in the callbacks. This handle was passed in to the IOManager with the beginTransaction method. | |
callbackHandle | Handle for the node in the callback. This handle was passed in to the IOManager with the beginWrite method. | |
statusCode | Result of the Write operation. | |
allowThreadUse | Indicates if the calling thread can be used to send the response if this is the callback for the last node in the transaction. |
Implements IOManagerCallback.
UaStatus UaSubscription::finishStartMonitoring | ( | OpcUa_UInt32 | hTransaction, | |
OpcUa_UInt32 | callbackHandle, | |||
OpcUa_UInt32 | hIOVariable, | |||
OpcUa_Double | revisedSamplingInterval, | |||
OpcUa_Boolean | initialDataValueAvailable, | |||
const UaDataValue & | initialDataValue, | |||
const UaStatus & | statusCode | |||
) | [virtual] |
Finished transaction to start monitoring a data item.
hTransaction | Handle for the transaction used by the SDK to identify the transaction in the callbacks. This handle was passed in to the IOManager with the beginTransaction method. | |
callbackHandle | Handle for the node in the callback. This handle was passed in to the IOManager with the beginStartMonitoring method. | |
hIOVariable | The handle of the variable in the IOManager created with beginStartMonitoring. The handle was passed to the SDK in the callback finishStartMonitoring. | |
revisedSamplingInterval | The corresponding revised sampling interval for the requested sampling interval in beginStartMonitoring. | |
initialDataValueAvailable | the available initial data value. | |
initialDataValue | the actual data value. | |
statusCode | Result of the finishStartMonitoring operation. |
Implements IOManagerCallback.
UaStatus UaSubscription::finishModifyMonitoring | ( | OpcUa_UInt32 | hTransaction, | |
OpcUa_UInt32 | callbackHandle, | |||
OpcUa_Double | revisedSamplingInterval, | |||
const UaStatus & | statusCode | |||
) | [virtual] |
Finished modifying monitoring of a data item.
hTransaction | Handle for the transaction used by the SDK to identify the transaction in the callbacks. This handle was passed in to the IOManager with the beginTransaction method. | |
callbackHandle | Handle for the node in the callback. This handle was passed in to the IOManager with the beginModifyMonitoring method. | |
revisedSamplingInterval | The corresponding revised sampling interval for the requested sampling interval in beginStartMonitoring. | |
statusCode | Result of the finishModifyMonitoring operation. |
Implements IOManagerCallback.
UaStatus UaSubscription::finishStopMonitoring | ( | OpcUa_UInt32 | hTransaction, | |
OpcUa_UInt32 | callbackHandle, | |||
const UaStatus & | statusCode | |||
) | [virtual] |
Finished stopping monitoring of an data item.
hTransaction | Handle for the transaction used by the SDK to identify the transaction in the callbacks. This handle was passed in to the IOManager with the beginTransaction method. | |
callbackHandle | Handle for the node in the callback. This handle was passed in to the IOManager with the beginModifyMonitoring method. | |
statusCode | Result of the finishStopMonitoring operation. |
Implements IOManagerCallback.
UaStatus UaSubscription::finishStartMonitoring | ( | OpcUa_UInt32 | hTransaction, | |
OpcUa_UInt32 | callbackHandle, | |||
OpcUa_UInt32 | eventManagerIndex, | |||
OpcUa_UInt32 | hEventItem, | |||
OpcUa_Double | revisedSamplingInterval, | |||
const UaStatus & | statusCode | |||
) | [virtual] |
Finished transaction to start monitoring an event item.
hTransaction | Handle for the transaction used by the SDK to identify the transaction in the callbacks. This handle was passed in to the IOManager with the beginTransaction method. | |
callbackHandle | Handle for the node in the callback. This handle was passed in to the IOManager with the beginModifyMonitoring method. | |
eventManagerIndex | an Index of different EventManagers. | |
hEventItem | an EventItem used to fire an Event. | |
revisedSamplingInterval | The corresponding revised sampling interval for the requested sampling interval in beginStartMonitoring. | |
statusCode | Result of the finishStartMonitoring operation. |
Implements EventManagerCallback.
UaStatus UaSubscription::finishModifyMonitoring | ( | OpcUa_UInt32 | hTransaction, | |
OpcUa_UInt32 | callbackHandle, | |||
OpcUa_UInt32 | eventManagerIndex, | |||
OpcUa_Double | revisedSamplingInterval, | |||
const UaStatus & | statusCode | |||
) | [virtual] |
Finished modifying monitoring of an event item.
hTransaction | Handle for the transaction used by the SDK to identify the transaction in the callbacks. This handle was passed in to the IOManager with the beginTransaction method. | |
callbackHandle | Handle for the node in the callback. This handle was passed in to the IOManager with the beginModifyMonitoring method. | |
eventManagerIndex | an Index of different EventManagers. | |
revisedSamplingInterval | The corresponding revised sampling interval for the requested sampling interval in beginStartMonitoring. | |
statusCode | Result of the finishModifyMonitoring operation. |
Implements EventManagerCallback.
UaStatus UaSubscription::finishStopMonitoring | ( | OpcUa_UInt32 | hTransaction, | |
OpcUa_UInt32 | callbackHandle, | |||
OpcUa_UInt32 | eventManagerIndex, | |||
const UaStatus & | statusCode | |||
) | [virtual] |
Finished stopping monitoring of an event item.
hTransaction | Handle for the transaction used by the SDK to identify the transaction in the callbacks. This handle was passed in to the IOManager with the beginTransaction method. | |
callbackHandle | Handle for the node in the callback. This handle was passed in to the IOManager with the beginModifyMonitoring method. | |
eventManagerIndex | an Index of different EventManagers. | |
statusCode | Result of the finishStopMonitoring operation. |
Implements EventManagerCallback.
UaStatus UaSubscription::beginCreateMonitoredItems | ( | UaCreateMonitoredItemsContext * | pUaCreateMonitoredItemsContext | ) |
Create new monitored items.
pUaCreateMonitoredItemsContext | the context of the items to create. |
List of objects to store a subset of the data for a IOManager
UaStatus UaSubscription::beginModifyMonitoredItems | ( | UaModifyMonitoredItemsContext * | pUaModifyMonitoredItemsContext | ) |
Modify monitored items.
pUaModifyMonitoredItemsContext | the context for the monitored items to modify. |
List of objects to store a subset of the data for a IOManager
UaStatus UaSubscription::beginSetMonitoringMode | ( | UaSetMonitoringModeContext * | pUaSetMonitoringModeContext | ) |
Set monitoring mode of monitored items.
pUaSetMonitoringModeContext | the monitored context of the item to modify. |
List of objects to store a subset of the data for a IOManager
UaStatus UaSubscription::beginDeleteMonitoredItems | ( | UaDeleteMonitoredItemsContext * | pUaDeleteMonitoredItemsContext | ) |
Delete monitored items.
pUaDeleteMonitoredItemsContext | the context of the monitored items to delete. |
List of objects to store a subset of the data for a IOManager
OpcUa_UInt32 UaSubscription::checkPublishTimer | ( | OpcUa_Boolean & | doCheckAvailableNotifications | ) |
Check if the publish timer expired and returns the remaining time in milliseconds to the next event.
void UaSubscription::checkAvailableNotifications | ( | ) |
Check if notifications are available.
UaStatus UaSubscription::publish | ( | UaPublishContext * | pUaPublishContext | ) |
Publish the notification message.
pUaPublishContext | the context of the published notification. |
void UaSubscription::setPublishingMode | ( | OpcUa_Boolean | publishingEnabled | ) |
Set publishing mode.
publishingEnabled | indicates if publishing is enabled or not. |
void UaSubscription::modifySubscription | ( | OpcUa_Double | publishingInterval, | |
OpcUa_UInt32 & | lifetimeCount, | |||
OpcUa_UInt32 | maxKeepAliveCount, | |||
OpcUa_UInt32 | maxNotificationPerPublish, | |||
OpcUa_Byte | priority | |||
) |
Modify the subscription settings.
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. |