open62541pp 0.17.0
C++ wrapper of open62541
|
#include <nodestore.hpp>
Value callback base class for variable nodes.
Value callbacks allow to synchronize a variable value with an external representation. The attached callbacks are executed before every read and after every write operation.
Definition at line 18 of file nodestore.hpp.
Public Member Functions | |
virtual void | onRead (Session &session, const NodeId &id, const NumericRange *range, const DataValue &value)=0 |
virtual void | onWrite (Session &session, const NodeId &id, const NumericRange *range, const DataValue &value)=0 |
UA_ValueCallback | create (bool ownsAdapter) override |
![]() | |
PluginAdapter ()=default | |
PluginAdapter (const PluginAdapter &)=default | |
PluginAdapter (PluginAdapter &&) noexcept=default | |
virtual | ~PluginAdapter ()=default |
PluginAdapter & | operator= (const PluginAdapter &)=default |
PluginAdapter & | operator= (PluginAdapter &&) noexcept=default |
Additional Inherited Members | |
![]() | |
using | PluginType |
|
pure virtual |
Called before the value attribute is read.
It is possible to write into the value attribute during onBeforeRead (using e.g. services::writeValue or Node::writeValue). The node is re-opened afterwards so that changes are considered in the following read operation.
session | Current session |
id | The identifier of the node being read from |
range | Optional numeric range the client wants to read from |
value | Current value before the read operation |
|
pure virtual |
Called after writing the value attribute.
The node is re-opened after writing so that the new value is visible in the callback.
session | Current session |
id | The identifier of the node being written to |
range | Optional numeric range the client wants to write to |
value | New value after the write operation |
|
overridevirtual |
Implements opcua::PluginAdapter< UA_ValueCallback >.