#include <subscription.hpp>
! An overridden Subscription which handles all data changes and events.
◆ ~Subscription()
| ifw::core::protocol::opcua::Subscription::~Subscription |
( |
| ) |
|
◆ Subscription()
◆ AddMonitoredItem()
| UA_StatusCode ifw::core::protocol::opcua::Subscription::AddMonitoredItem |
( |
UA_Client * | client, |
|
|
MonitoredItemPtr | monitoredItem ) |
Add an new monitoring item.
- Parameters
-
| monitoredItem | Item to be monitored |
- Returns
- Status of the monitoring registration of type EnumStatusCode
This is a user defined method which registers a data change handler to to an existing monitored item.
- Note
- Monitored items added by this method shall be removed by calling RemoveMonitoredItem.
- See also
- RemoveMonitoredItem
◆ AddMonitoredItems()
| UA_StatusCode ifw::core::protocol::opcua::Subscription::AddMonitoredItems |
( |
UA_Client * | client, |
|
|
std::vector< MonitoredItemPtr > & | mon_vector, |
|
|
std::string & | error_msg ) |
Add a vector of monitoring items.
- Parameters
-
| mon_vector | Vector of items to be monitored. |
| error_msg | Error message in case of errors. |
- Returns
- Status of the monitoring registration of type EnumStatusCode
This method registers a set of monitored items.
◆ AddSubscription()
| UA_StatusCode ifw::core::protocol::opcua::Subscription::AddSubscription |
( |
UA_Client * | client, |
|
|
const UA_CreateSubscriptionRequest & | request ) |
◆ Create()
Create a new subscription.
- Parameters
-
- Returns
- Returns a smart pointer to a new Subscription.
This create method ensures that instances are only handled by smart pointer.
◆ DataChangesCallback()
| void ifw::core::protocol::opcua::Subscription::DataChangesCallback |
( |
UA_Client * | client, |
|
|
UA_UInt32 | subId, |
|
|
void * | subContext, |
|
|
UA_UInt32 | monId, |
|
|
void * | context, |
|
|
UA_DataValue * | value ) |
|
static |
◆ DeleteSubscriptionCallback()
| void ifw::core::protocol::opcua::Subscription::DeleteSubscriptionCallback |
( |
UA_Client * | client, |
|
|
UA_UInt32 | subscriptionId, |
|
|
void * | subContext ) |
|
static |
◆ GetSubscriptionId()
| UA_UInt32 ifw::core::protocol::opcua::Subscription::GetSubscriptionId |
( |
| ) |
const |
|
inline |
◆ OnDataChange()
| void ifw::core::protocol::opcua::Subscription::OnDataChange |
( |
const UA_UInt32 | monitor_id, |
|
|
UA_DataValue * | value ) |
|
virtual |
Handler of data changes.
- Parameters
-
| monitor_id | Item generating the change. |
| value | Vector of the data changes. |
This method overrides the onDataChange method of the base class.
◆ onError()
| void ifw::core::protocol::opcua::Subscription::onError |
( |
| ) |
|
|
virtual |
Handler for session communication errors.
- Parameters
-
◆ onStatusChange()
| void ifw::core::protocol::opcua::Subscription::onStatusChange |
( |
bool | status | ) |
|
|
virtual |
Handler for session status change.
- Parameters
-
◆ RemoveMonitoredItems()
| UA_StatusCode ifw::core::protocol::opcua::Subscription::RemoveMonitoredItems |
( |
UA_Client * | client, |
|
|
bool | connection_active = true ) |
RemoveMonitoredItem.
- Returns
- Status of the removal of type UA_StatusCode
◆ SetSubscriptionId()
| void ifw::core::protocol::opcua::Subscription::SetSubscriptionId |
( |
const UA_UInt32 | id | ) |
|
|
inline |
◆ m_dataChangeHandler
◆ m_monitored_items
| std::map<UA_Int32, std::shared_ptr<MonitoredItem> > ifw::core::protocol::opcua::Subscription::m_monitored_items |
The documentation for this class was generated from the following files: