mercredi 28 août 2019

Reading Datatype from Node Attribute

I'm trying to write values to some OPC UA nodes with Qt and open62541. For that I have to know the different data types of the nodes. Every time I try to read the data type of a node, I get a Boolean type instead of an int32. It is the correct node in the list and I can read all nodes. Can someone please help me?

First I did:

_nodeList->at(index)->readAttributes(QOpcUa::NodeAttribute::DataType);

Second after read was finished:

qDebug() << _nodeList->at(index)->attribute(QOpcUa::NodeAttribute::DataType).value();

The output of qDebug is QOpcUa::Boolean, but it should be QOpcUa::Int32

Aucun commentaire:

Enregistrer un commentaire