open62541pp 0.15.0
C++ wrapper of open62541
|
Create subscriptions.
Subscriptions monitor a set of monitored items for notifications and return them to the client.
Typedefs | |
using | opcua::services::DeleteSubscriptionCallback = std::function<void(uint32_t subId)> |
using | opcua::services::StatusChangeNotificationCallback |
Functions | |
CreateSubscriptionResponse | opcua::services::createSubscription (Client &connection, const CreateSubscriptionRequest &request, StatusChangeNotificationCallback statusChangeCallback={}, DeleteSubscriptionCallback deleteCallback={}) |
Result< uint32_t > | opcua::services::createSubscription (Client &connection, SubscriptionParameters ¶meters, bool publishingEnabled=true, StatusChangeNotificationCallback statusChangeCallback={}, DeleteSubscriptionCallback deleteCallback={}) noexcept |
using opcua::services::DeleteSubscriptionCallback = std::function<void(uint32_t subId)> |
Subscription deletion callback.
subId | Subscription identifier |
Definition at line 63 of file subscription.hpp.
s Subscription status change notification callback.
subId | Subscription identifier |
notification | Status change notification |
Definition at line 70 of file subscription.hpp.
CreateSubscriptionResponse opcua::services::createSubscription | ( | Client & | connection, |
const CreateSubscriptionRequest & | request, | ||
StatusChangeNotificationCallback | statusChangeCallback = {}, | ||
DeleteSubscriptionCallback | deleteCallback = {} ) |
Create a subscription.
connection | Instance of type Client |
request | Create subscription request |
statusChangeCallback | Invoked when the status of a subscription is changed |
deleteCallback | Invoked when the subscription is deleted |
|
nodiscardnoexcept |
Create a subscription.
Parameters are passed by reference because illegal parameters can be revised by the server. The updated parameters reflect the actual values that the server will use.
connection | Instance of type Client |
parameters | Subscription parameters, may be revised by server |
publishingEnabled | Enable/disable publishing of the subscription |
statusChangeCallback | Invoked when the status of a subscription is changed |
deleteCallback | Invoked when the subscription is deleted |