summaryrefslogtreecommitdiffstats
path: root/src/BobinkNode.h
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-02-19 12:29:05 +0100
committerThomas Vanbesien <tvanbesi@proton.me>2026-02-19 12:29:05 +0100
commit50c62c35463b62a3a7acebf9ebe22d44f1c6dca2 (patch)
treec56ff15619acf72448b93df218bf36286bc774b3 /src/BobinkNode.h
parent0c1df583acba434e2d7f6905a30fdefe288d0f9d (diff)
downloadBobinkQtOpcUa-50c62c35463b62a3a7acebf9ebe22d44f1c6dca2.tar.gz
BobinkQtOpcUa-50c62c35463b62a3a7acebf9ebe22d44f1c6dca2.zip
Log attribute reads to debug console and replace raw C++ types with Qt equivalents
Connect QOpcUaNode::attributeRead signal to new handler that logs read results (value or error code) to the debug console via BobinkClient::statusMessage. Add nameFromAttribute() helper. Replace const char* arrays with QLatin1StringView, bare string literals with QStringLiteral, uint with quint32, int with qint32. Rename statusLog to debugLog in Main.qml for consistency.
Diffstat (limited to 'src/BobinkNode.h')
-rw-r--r--src/BobinkNode.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/BobinkNode.h b/src/BobinkNode.h
index 0fa1678..c37a883 100644
--- a/src/BobinkNode.h
+++ b/src/BobinkNode.h
@@ -85,9 +85,15 @@ private:
void handleAttributeWritten (QOpcUa::NodeAttribute attr,
QOpcUa::UaStatusCode statusCode);
void handleClientConnectedChanged ();
+ void handleAttributeReadFinished (QOpcUa::NodeAttributes attrs);
+ void handleEnableMonitoringFinished (QOpcUa::NodeAttribute attr,
+ QOpcUa::UaStatusCode statusCode);
+ void handleDisableMonitoringFinished (QOpcUa::NodeAttribute attr,
+ QOpcUa::UaStatusCode statusCode);
static NodeStatus statusFromCode (QOpcUa::UaStatusCode code);
static QOpcUa::NodeAttribute attributeFromName (const QString &name);
+ static QLatin1StringView nameFromAttribute (QOpcUa::NodeAttribute attr);
QString m_nodeId;
QVariant m_value;