How do I read the QOpcUaNode data type attribute correctly?
I would like to do this but am finding this does not work against our server.
opcUaNode->writeValueAttribute(variant);
I have found this to work but some of my variables are UInt16 and others are UInt32 and I'd like to get the node variable type from the node instance but am not sure how.
opcUaNode->writeValueAttribute(variant, QOpcUa::Types::UInt16);
I have found this is not the way to get the node data type.
QVariant dataType = opcUaNode->attribute(QOpcUa::NodeAttribute::DataType);
I believe the QOpcUaNode object should know what data type it is so I should not need to track it separately.
Our runtime is Qt 5.15.2 / 5.15.3
This is a workaround IMO but usable for now. Would love to hear of a cleaner approach.
Derived from: Reading Datatype from Node Attribute