From 50c62c35463b62a3a7acebf9ebe22d44f1c6dca2 Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Thu, 19 Feb 2026 12:29:05 +0100 Subject: 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. --- src/BobinkNode.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/BobinkNode.h') 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; -- cgit v1.2.3