7#include "open62541pp/config.hpp"
11#ifdef UA_ENABLE_SUBSCRIPTIONS
28template <
typename Connection>
37 subscriptionId_(std::is_same_v<Connection, Server> ? 0U :
subscriptionId),
52 return subscriptionId_;
57 return monitoredItemId_;
93 Connection* connection_;
94 uint32_t subscriptionId_{0U};
95 uint32_t monitoredItemId_{0U};
102 return (lhs.connection() == rhs.connection()) &&
103 (lhs.subscriptionId() == rhs.subscriptionId()) &&
104 (lhs.monitoredItemId() == rhs.monitoredItemId());
109 return !(lhs == rhs);
const StatusCode & getStatusCode() const noexcept
High-level monitored item class.
const Connection & connection() const noexcept
Get the server/client instance.
void deleteMonitoredItem()
Delete this monitored item.
void setMonitoringMode(MonitoringMode monitoringMode)
Set the monitoring mode of this monitored item.
uint32_t subscriptionId() const noexcept
Get the server-assigned identifier of the underlying subscription.
Connection & connection() noexcept
Get the server/client instance.
uint32_t monitoredItemId() const noexcept
Get the server-assigned identifier of this monitored item.
const NodeId & getNodeId()
Get the monitored NodeId.
void setMonitoringParameters(const MonitoringParametersEx ¶meters)
Modify this monitored item.
MonitoredItem(Connection &connection, uint32_t subscriptionId, uint32_t monitoredItemId) noexcept
Wrap an existing monitored item.
AttributeId getAttributeId()
Get the monitored AttributeId.
constexpr void throwIfBad() const
Throw a BadStatus exception if the status code is bad.
StatusCode deleteMonitoredItem(T &connection, uint32_t subscriptionId, uint32_t monitoredItemId)
Delete a monitored item from a subscription.
MonitoredItemModifyResult modifyMonitoredItem(Client &connection, uint32_t subscriptionId, uint32_t monitoredItemId, const MonitoringParametersEx ¶meters) noexcept
Modify a monitored item of a subscription.
SetMonitoringModeResponse setMonitoringMode(Client &connection, const SetMonitoringModeRequest &request) noexcept
Set the monitoring mode of monitored items.
MonitoringMode
Monitoring mode.
bool operator!=(const Client &lhs, const Client &rhs) noexcept
AttributeId
Attribute identifiers.
bool operator==(const Client &lhs, const Client &rhs) noexcept
Extended monitoring parameters with default values from open62541.