C++ Based OPC UA Client/Server SDK
1.6.1.391
|
Callback interface for the handling of durable subscriptions storage. More...
#include <uacoreserverapplication.h>
Public Member Functions | |
UaDurableSubscriptionCallback () | |
Construction. | |
virtual | ~UaDurableSubscriptionCallback () |
Destruction. | |
virtual OpcUa_UInt32 | registerDurableDataItem (const UaNodeId nodeId, OpcUa_UInt32 subscriptionId, OpcUa_Double &samplingInterval, OpcUa_UInt32 &queueSize)=0 |
This registration method informs the storage component about the creation of a data monitored item in a durable subscription. More... | |
virtual OpcUa_UInt32 | registerDurableEventItem (const UaNodeId nodeId, OpcUa_UInt32 subscriptionId)=0 |
This registration method informs the storage component about the creation of an event monitored item in a durable subscription. More... | |
virtual void | unregisterDurableItem (OpcUa_UInt32 durableItemHandle)=0 |
Unregisters the item from the storage component after the deletion of the monitored item from the durable subscription. More... | |
virtual void | activateDurableItem (OpcUa_UInt32 durableItemHandle)=0 |
Activates the item in the storage component before storeValue is called. More... | |
virtual void | deactivateDurableItem (OpcUa_UInt32 durableItemHandle)=0 |
Deactivates the item in the storage component. More... | |
virtual void | storeValue (OpcUa_UInt32 durableItemHandle, const UaDataValue &dataValue)=0 |
Stores the value at the end of the buffer. More... | |
virtual bool | getStoredValues (OpcUa_UInt32 durableItemHandle, OpcUa_UInt32 requestCount, UaDataValueArray &dataValues)=0 |
Returns the stored values for the item from the beginning of the buffer. More... | |
virtual void | clearStoredValues (OpcUa_UInt32 durableItemHandle, OpcUa_UInt32 clearCount)=0 |
Confirms delivery of stored values to the client. More... | |
virtual void | storeEvent (OpcUa_UInt32 durableItemHandle, const UaVariantArray &eventFields)=0 |
Stores the event at the end of the buffer. More... | |
virtual OpcUa_UInt32 | getEventCount (OpcUa_UInt32 durableItemHandle, OpcUa_UInt32 maxNumber)=0 |
Get the current event count in the buffer. More... | |
virtual void | getEvents (OpcUa_UInt32 durableItemHandle, OpcUa_UInt32 &eventCount, EventFieldsArray &events, bool &bMoreAvailable)=0 |
Get Events from the buffer. More... | |
Callback interface for the handling of durable subscriptions storage.
This callback interface needs to be implemented if the application wants to implement durable subscriptions.
The storage works like list of buffers where each buffer represents a monitored item in a durable subscription. The buffer is only active if the delivery of data changes is not possible to the client.
If a buffer is active, it has a read pointer at the begin of the buffer and a writer pointer at the end of the buffer.
|
pure virtual |
Activates the item in the storage component before storeValue is called.
The activation happens if the durable subscription is no longer able to deliver values or events to the client.
[in] | durableItemHandle | The handle of the durable monitored item in the storage component. |
|
pure virtual |
Confirms delivery of stored values to the client.
The method is only used if stored values have be partially delivered to the client and delivery has stopped again.
If the method is called, the indicated number of previously fetched stored values can be deleted or can be marked as delivered to the client. The rest of the values returned in getStoredValues must be returned again in the next call to getStoredValues.
[in] | durableItemHandle | The handle of the durable monitored item in the storage component. |
[in] | clearCount | The number of values delivered to the client. |
|
pure virtual |
Deactivates the item in the storage component.
The deactivation happens if the durable subscription has delivered all stored values and events to the client and all new values and events are delivered to the client directly. This allows the storage component to clean-up all previously stored values.
[in] | durableItemHandle | The handle of the durable monitored item in the storage component. |
|
pure virtual |
Get the current event count in the buffer.
If the number is unknown, the maxNumber passed in is returned if events are available and 0 is returned if no events are available
[in] | durableItemHandle | The handle of the durable monitored item in the storage component. |
[in] | maxNumber | The maximum number that can be handled by the caller. |
|
pure virtual |
Get Events from the buffer.
Returns the events from the buffer up to the number defined by eventCount. Returned events can be deleted or can be marked as delivered to the client.
[in] | durableItemHandle | The handle of the durable monitored item in the storage component. |
[in,out] | eventCount | The requested and returned count. If the number equals or exeeds the available events, the complete list is returned |
[out] | events | The list of events in the monitored item |
[out] | bMoreAvailable | Flag indicating if there are more events in the buffer |
|
pure virtual |
Returns the stored values for the item from the beginning of the buffer.
The method returns the requested number of stored values or the remaining ones if the number of stored values is less than requested.
If the method is called, all previously fetched stored values can be deleted or can be marked as delivered to the client.
[in] | durableItemHandle | The handle of the durable monitored item in the storage component. |
[in] | requestCount | The number of values requested from storage. |
[out] | dataValues | The stored values in the order they have been received through storeValue. |
|
pure virtual |
This registration method informs the storage component about the creation of a data monitored item in a durable subscription.
The storage stays inactive until the delivery of values to the client is interrupted.
[in] | nodeId | NodeId of the monitored node |
[in] | subscriptionId | ID of the durable subscription the monitored item was added to |
[in,out] | samplingInterval | SamplingInterval configured for the monitoring. The sampling interval can be adjusted to a lower rate if the rate is not supported by the storage. |
[in,out] | queueSize | Queue size configured for the monitored item. The queue size can be adjusted to a lower number if the size is not supported by the storage. |
|
pure virtual |
This registration method informs the storage component about the creation of an event monitored item in a durable subscription.
The storage stays inactive until the delivery of events to the client is interrupted.
[in] | nodeId | NodeId of the monitored node |
[in] | subscriptionId | ID of the durable subscription the monitored item was added to |
|
pure virtual |
Stores the event at the end of the buffer.
[in] | durableItemHandle | The handle of the durable monitored item in the storage component. |
[in] | eventFields | The Event (fields of the event) to store. |
|
pure virtual |
Stores the value at the end of the buffer.
[in] | durableItemHandle | The handle of the durable monitored item in the storage component. |
[in] | dataValue | The DataValue to store. |
|
pure virtual |
Unregisters the item from the storage component after the deletion of the monitored item from the durable subscription.
[in] | durableItemHandle | The handle of the durable monitored item in the storage component. |