Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.8.2
-
-
1f9859956 (dev), 251cec4ed (6.9), e1b263ea3 (6.8)
Description
Qt OPC UA client doesn't handle ByteString NodeId correctly.
Could be an issue with how Qt is serializing or sending the ByteString in the method call request.
When calling a method on an alarm condition with a ByteString type NodeId, results in BadNodeIdUnknown error from the server. The same code works with a numeric NodeId type.
Details:
Trying to acknowledge an alarm condition using the following code:
mConditionNode.reset(mOpcUaClient->node("ns=3;b=AAABAAIADoo=")); if(mConditionNode) { connect(mConditionNode.get(), &QOpcUaNode::methodCallFinished, [this](QString methodNodeId, QVariant result, QOpcUa::UaStatusCode status) { qDebug() << " methodCallFinished: " << methodNodeId << status << result; }); } bool success = mConditionNode->callMethod("i=9111", args); assert(success == true);
The problem arises when the NodeId is of ByteString type ("ns=3;b=AAABAAIADoo="). When checking the request packets being sent by Qt with Wireshark, the NodeId value is empty (screenshot attached).
With another test server, one is able to acknowledge alarms successfully using the same Qt code, but the NodeId is of type Numeric. In that case, the correct NodeId values appear in the Wireshark capture.