diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-02-20 16:11:45 +0100 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-02-20 16:11:45 +0100 |
| commit | c3ea69c02a5c877fa86ccbeee5c4efa11ae2ee5c (patch) | |
| tree | a60f1ca72a72848fb0ee2431944f36533aac1d5b /src/OpcUaMonitoredNode.cpp | |
| parent | 6c142a234673e442561b2c050b727aa4400177d8 (diff) | |
| download | BobinkQtOpcUa-c3ea69c02a5c877fa86ccbeee5c4efa11ae2ee5c.tar.gz BobinkQtOpcUa-c3ea69c02a5c877fa86ccbeee5c4efa11ae2ee5c.zip | |
Add custom log handler and expand demo node coverage
Replace default Qt message pattern with a custom handler that matches
open62541 server log format: timestamps with UTC offset, colored
type/category tags padded to 20 chars, and shortened category names.
Add sbyte, byte, datetime, guid, and bytestring node types to all
three demo pages. Add Guid type coercion to writeValue.
Diffstat (limited to 'src/OpcUaMonitoredNode.cpp')
| -rw-r--r-- | src/OpcUaMonitoredNode.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/OpcUaMonitoredNode.cpp b/src/OpcUaMonitoredNode.cpp index 1a2da86..cd93730 100644 --- a/src/OpcUaMonitoredNode.cpp +++ b/src/OpcUaMonitoredNode.cpp @@ -9,6 +9,7 @@ #include <QOpcUaLocalizedText> #include <QOpcUaMonitoringParameters> #include <QStringList> +#include <QUuid> OpcUaMonitoredNode::OpcUaMonitoredNode (QObject *parent) : QObject (parent) {} @@ -451,6 +452,11 @@ OpcUaMonitoredNode::coerceValue (const QVariant &input) const } case QOpcUa::ByteString: return QVariant::fromValue (input.toByteArray ()); + case QOpcUa::Guid: + { + QUuid uuid (input.toString ()); + return !uuid.isNull () ? QVariant::fromValue (uuid) : QVariant{}; + } default: return input; } |
