open62541pp 0.16.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
CreateMonitoredItems service
Collaboration diagram for CreateMonitoredItems service:

Detailed Description

Create and add a monitored item to a subscription.

See also
https://reference.opcfoundation.org/Core/Part4/v105/docs/5.12.2

Namespaces

namespace  opcua::services::detail
 

Typedefs

using opcua::services::DeleteMonitoredItemCallback = std::function<void(uint32_t subId, uint32_t monId)>
 
using opcua::services::DataChangeNotificationCallback
 
using opcua::services::EventNotificationCallback
 

Functions

CreateMonitoredItemsResponse opcua::services::createMonitoredItemsDataChange (Client &connection, const CreateMonitoredItemsRequest &request, DataChangeNotificationCallback dataChangeCallback, DeleteMonitoredItemCallback deleteCallback)
 
template<typename CompletionToken >
auto opcua::services::createMonitoredItemsDataChangeAsync (Client &connection, const CreateMonitoredItemsRequest &request, DataChangeNotificationCallback dataChangeCallback, DeleteMonitoredItemCallback deleteCallback, CompletionToken &&token)
 
template<typename T >
MonitoredItemCreateResult opcua::services::createMonitoredItemDataChange (T &connection, uint32_t subscriptionId, const ReadValueId &itemToMonitor, MonitoringMode monitoringMode, const MonitoringParametersEx &parameters, DataChangeNotificationCallback dataChangeCallback, DeleteMonitoredItemCallback deleteCallback)
 
template<typename CompletionToken >
auto opcua::services::createMonitoredItemDataChangeAsync (Client &connection, uint32_t subscriptionId, const ReadValueId &itemToMonitor, MonitoringMode monitoringMode, const MonitoringParametersEx &parameters, DataChangeNotificationCallback dataChangeCallback, DeleteMonitoredItemCallback deleteCallback, CompletionToken &&token)
 
CreateMonitoredItemsResponse opcua::services::createMonitoredItemsEvent (Client &connection, const CreateMonitoredItemsRequest &request, EventNotificationCallback eventCallback, DeleteMonitoredItemCallback deleteCallback)
 
template<typename CompletionToken >
auto opcua::services::createMonitoredItemsEventAsync (Client &connection, const CreateMonitoredItemsRequest &request, EventNotificationCallback eventCallback, DeleteMonitoredItemCallback deleteCallback, CompletionToken &&token)
 
MonitoredItemCreateResult opcua::services::createMonitoredItemEvent (Client &connection, uint32_t subscriptionId, const ReadValueId &itemToMonitor, MonitoringMode monitoringMode, const MonitoringParametersEx &parameters, EventNotificationCallback eventCallback, DeleteMonitoredItemCallback deleteCallback={})
 
template<typename CompletionToken >
auto opcua::services::createMonitoredItemEventAsync (Client &connection, uint32_t subscriptionId, const ReadValueId &itemToMonitor, MonitoringMode monitoringMode, const MonitoringParametersEx &parameters, EventNotificationCallback eventCallback, DeleteMonitoredItemCallback deleteCallback, CompletionToken &&token)
 

Typedef Documentation

◆ DeleteMonitoredItemCallback

using opcua::services::DeleteMonitoredItemCallback = std::function<void(uint32_t subId, uint32_t monId)>

MonitoredItem deletion callback.

Parameters
subIdSubscription identifier
monIdMonitoredItem identifier

Definition at line 91 of file monitoreditem.hpp.

◆ DataChangeNotificationCallback

Initial value:
std::function<void(uint32_t subId, uint32_t monId, const DataValue& value)>

Data change notification callback.

Parameters
subIdSubscription identifier (0U for local (server-side) monitored item)
monIdMonitoredItem identifier
valueChanged value

Definition at line 99 of file monitoreditem.hpp.

◆ EventNotificationCallback

Initial value:
std::function<void(uint32_t subId, uint32_t monId, Span<const Variant> eventFields)>

Event notification callback.

Parameters
subIdSubscription identifier (0U for local (server-side) monitored item)
monIdMonitoredItem identifier
eventFieldsEvent fields

Definition at line 108 of file monitoreditem.hpp.

Function Documentation

◆ createMonitoredItemsDataChange()

CreateMonitoredItemsResponse opcua::services::createMonitoredItemsDataChange ( Client & connection,
const CreateMonitoredItemsRequest & request,
DataChangeNotificationCallback dataChangeCallback,
DeleteMonitoredItemCallback deleteCallback )
nodiscard

Create and add monitored items to a subscription for data change notifications.

Don't use this function to monitor the EventNotifier attribute. Create monitored items with createMonitoredItemsEvent instead.

Parameters
connectionInstance of type Client
requestCreate monitored items request
dataChangeCallbackInvoked when the monitored item is changed
deleteCallbackInvoked when the monitored item is deleted

◆ createMonitoredItemsDataChangeAsync()

template<typename CompletionToken >
auto opcua::services::createMonitoredItemsDataChangeAsync ( Client & connection,
const CreateMonitoredItemsRequest & request,
DataChangeNotificationCallback dataChangeCallback,
DeleteMonitoredItemCallback deleteCallback,
CompletionToken && token )

Create and add monitored items to a subscription for data change notifications.

Don't use this function to monitor the EventNotifier attribute. Create monitored items with createMonitoredItemsEvent instead.

Parameters
connectionInstance of type Client
requestCreate monitored items request
dataChangeCallbackInvoked when the monitored item is changed
deleteCallbackInvoked when the monitored item is deleted
tokenThe completion token that will be used to produce a completion handler, which will be called when the operation completes. Potential completion tokens include useFuture, useDeferred, useDetached, or a function (object) with the correct completion signature. The function signature of the completion handler must be:
UA_CreateMonitoredItemsResponse wrapper class.
Returns

Definition at line 161 of file monitoreditem.hpp.

Referenced by opcua::services::createMonitoredItemDataChangeAsync().

◆ createMonitoredItemDataChange()

template<typename T >
MonitoredItemCreateResult opcua::services::createMonitoredItemDataChange ( T & connection,
uint32_t subscriptionId,
const ReadValueId & itemToMonitor,
MonitoringMode monitoringMode,
const MonitoringParametersEx & parameters,
DataChangeNotificationCallback dataChangeCallback,
DeleteMonitoredItemCallback deleteCallback )
nodiscard

Create and add a monitored item to a subscription for data change notifications.

Don't use this function to monitor the EventNotifier attribute. Create a monitored item with createMonitoredItemEvent instead.

Parameters
connectionInstance of type Server or Client
subscriptionIdIdentifier of the subscription returned by createSubscription. Use 0U for a local server-side monitored item.
itemToMonitorItem to monitor
monitoringModeMonitoring mode
parametersMonitoring parameters
dataChangeCallbackInvoked when the monitored item is changed
deleteCallbackInvoked when the monitored item is deleted

Referenced by opcua::Subscription< Connection >::subscribeDataChange().

◆ createMonitoredItemDataChangeAsync()

template<typename CompletionToken >
auto opcua::services::createMonitoredItemDataChangeAsync ( Client & connection,
uint32_t subscriptionId,
const ReadValueId & itemToMonitor,
MonitoringMode monitoringMode,
const MonitoringParametersEx & parameters,
DataChangeNotificationCallback dataChangeCallback,
DeleteMonitoredItemCallback deleteCallback,
CompletionToken && token )

Parameters
tokenThe completion token that will be used to produce a completion handler, which will be called when the operation completes. Potential completion tokens include useFuture, useDeferred, useDetached, or a function (object) with the correct completion signature. The function signature of the completion handler must be:
UA_MonitoredItemCreateResult wrapper class.
Returns
Examples
client_async.cpp.

Definition at line 237 of file monitoreditem.hpp.

◆ createMonitoredItemsEvent()

CreateMonitoredItemsResponse opcua::services::createMonitoredItemsEvent ( Client & connection,
const CreateMonitoredItemsRequest & request,
EventNotificationCallback eventCallback,
DeleteMonitoredItemCallback deleteCallback )
nodiscard

Create and add monitored items to a subscription for event notifications.

The attributeId of ReadValueId must be set to AttributeId::EventNotifier.

Parameters
connectionInstance of type Client
requestCreate monitored items request
eventCallbackInvoked when an event is published
deleteCallbackInvoked when the monitored item is deleted

◆ createMonitoredItemsEventAsync()

template<typename CompletionToken >
auto opcua::services::createMonitoredItemsEventAsync ( Client & connection,
const CreateMonitoredItemsRequest & request,
EventNotificationCallback eventCallback,
DeleteMonitoredItemCallback deleteCallback,
CompletionToken && token )

Create and add monitored items to a subscription for event notifications.

The attributeId of ReadValueId must be set to AttributeId::EventNotifier.

Parameters
connectionInstance of type Client
requestCreate monitored items request
eventCallbackInvoked when an event is published
deleteCallbackInvoked when the monitored item is deleted
tokenThe completion token that will be used to produce a completion handler, which will be called when the operation completes. Potential completion tokens include useFuture, useDeferred, useDetached, or a function (object) with the correct completion signature. The function signature of the completion handler must be:
Returns

Definition at line 290 of file monitoreditem.hpp.

Referenced by opcua::services::createMonitoredItemEventAsync().

◆ createMonitoredItemEvent()

MonitoredItemCreateResult opcua::services::createMonitoredItemEvent ( Client & connection,
uint32_t subscriptionId,
const ReadValueId & itemToMonitor,
MonitoringMode monitoringMode,
const MonitoringParametersEx & parameters,
EventNotificationCallback eventCallback,
DeleteMonitoredItemCallback deleteCallback = {} )
nodiscard

Create and add a monitored item to a subscription for event notifications.

The attributeId of ReadValueId must be set to AttributeId::EventNotifier.

Parameters
connectionInstance of type Client
subscriptionIdIdentifier of the subscription returned by createSubscription
itemToMonitorItem to monitor
monitoringModeMonitoring mode
parametersMonitoring parameters
eventCallbackInvoked when an event is published
deleteCallbackInvoked when the monitored item is deleted

Referenced by opcua::Subscription< Connection >::subscribeEvent().

◆ createMonitoredItemEventAsync()

template<typename CompletionToken >
auto opcua::services::createMonitoredItemEventAsync ( Client & connection,
uint32_t subscriptionId,
const ReadValueId & itemToMonitor,
MonitoringMode monitoringMode,
const MonitoringParametersEx & parameters,
EventNotificationCallback eventCallback,
DeleteMonitoredItemCallback deleteCallback,
CompletionToken && token )

Create and add a monitored item to a subscription for event notifications.

The attributeId of ReadValueId must be set to AttributeId::EventNotifier.

Parameters
connectionInstance of type Client
subscriptionIdIdentifier of the subscription returned by createSubscription
itemToMonitorItem to monitor
monitoringModeMonitoring mode
parametersMonitoring parameters
eventCallbackInvoked when an event is published
deleteCallbackInvoked when the monitored item is deleted
tokenThe completion token that will be used to produce a completion handler, which will be called when the operation completes. Potential completion tokens include useFuture, useDeferred, useDetached, or a function (object) with the correct completion signature. The function signature of the completion handler must be:
Returns

Definition at line 362 of file monitoreditem.hpp.