summaryrefslogtreecommitdiffstats
path: root/src/plugins/opcua/freeopcua/qfreeopcuanode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/opcua/freeopcua/qfreeopcuanode.cpp')
-rw-r--r--src/plugins/opcua/freeopcua/qfreeopcuanode.cpp30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/plugins/opcua/freeopcua/qfreeopcuanode.cpp b/src/plugins/opcua/freeopcua/qfreeopcuanode.cpp
index 82046fc..f4a07cf 100644
--- a/src/plugins/opcua/freeopcua/qfreeopcuanode.cpp
+++ b/src/plugins/opcua/freeopcua/qfreeopcuanode.cpp
@@ -39,8 +39,6 @@
#include "qfreeopcuasubscription.h"
#include "qfreeopcuavalueconverter.h"
#include "qfreeopcuaworker.h"
-#include <QtOpcUa/qopcuamonitoredevent.h>
-#include <QtOpcUa/qopcuamonitoredvalue.h>
#include <QtCore/qdatetime.h>
#include <QtCore/qloggingcategory.h>
@@ -73,6 +71,34 @@ bool QFreeOpcUaNode::readAttributes(QOpcUaNode::NodeAttributes attr)
Q_ARG(QOpcUaNode::NodeAttributes, attr));
}
+bool QFreeOpcUaNode::enableMonitoring(QOpcUaNode::NodeAttributes attr, const QOpcUaMonitoringParameters &settings)
+{
+ return QMetaObject::invokeMethod(m_client->m_opcuaWorker, "enableMonitoring",
+ Qt::QueuedConnection,
+ Q_ARG(uintptr_t, reinterpret_cast<uintptr_t>(this)),
+ Q_ARG(OpcUa::Node, m_node),
+ Q_ARG(QOpcUaNode::NodeAttributes, attr),
+ Q_ARG(QOpcUaMonitoringParameters, settings));
+}
+
+bool QFreeOpcUaNode::disableMonitoring(QOpcUaNode::NodeAttributes attr)
+{
+ return QMetaObject::invokeMethod(m_client->m_opcuaWorker, "disableMonitoring",
+ Qt::QueuedConnection,
+ Q_ARG(uintptr_t, reinterpret_cast<uintptr_t>(this)),
+ Q_ARG(QOpcUaNode::NodeAttributes, attr));
+}
+
+bool QFreeOpcUaNode::modifyMonitoring(QOpcUaNode::NodeAttribute attr, QOpcUaMonitoringParameters::Parameter item, const QVariant &value)
+{
+ return QMetaObject::invokeMethod(m_client->m_opcuaWorker, "modifyMonitoring",
+ Qt::QueuedConnection,
+ Q_ARG(uintptr_t, reinterpret_cast<uintptr_t>(this)),
+ Q_ARG(QOpcUaNode::NodeAttribute, attr),
+ Q_ARG(QOpcUaMonitoringParameters::Parameter, item),
+ Q_ARG(QVariant, value));
+}
+
QStringList QFreeOpcUaNode::childrenIds() const
{
QStringList result;