This class stores the result of a read operation. More...
Header: | #include <QOpcUaReadResult> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
qmake: | QT += opcua |
QOpcUaReadResult(const QOpcUaReadResult &other) | |
QOpcUaReadResult & | operator=(const QOpcUaReadResult &rhs) |
QOpcUa::NodeAttribute | attribute() const |
QString | indexRange() const |
QString | nodeId() const |
QDateTime | serverTimestamp() const |
void | setAttribute(QOpcUa::NodeAttribute attribute) |
void | setIndexRange(const QString &indexRange) |
void | setNodeId(const QString &nodeId) |
void | setServerTimestamp(const QDateTime &serverTimestamp) |
void | setSourceTimestamp(const QDateTime &sourceTimestamp) |
void | setStatusCode(QOpcUa::UaStatusCode statusCode) |
void | setValue(const QVariant &value) |
QDateTime | sourceTimestamp() const |
QOpcUa::UaStatusCode | statusCode() const |
QVariant | value() const |
A read operation on an OPC UA server returns the value and timestamps which describe when a value was generated by the source and when the server obtained it. It also returns a status code which describes if the value could be read and if not, for what reason the read has failed.
In addition to the data returned by the server, this class also contains the node id, the attribute and the index range from the request to enable a client to match the result with a request.
Objects of this class are returned in the QOpcUaClient::readNodeAttributesFinished() signal and contain the result of a read operation that was part of a QOpcUaClient::readNodeAttributes() request.
See also QOpcUaClient::readNodeAttributes(), QOpcUaClient::readNodeAttributesFinished(), and QOpcUaReadItem.
Constructs a read result from other.
Sets the values from rhs in this read result.
Returns the attribute id.
See also setAttribute().
Returns the index range.
See also setIndexRange().
Returns the node id.
See also setNodeId().
Returns the server timestamp for value().
See also setServerTimestamp().
Sets the attribute id to attribute.
See also attribute().
Sets the index range to indexRange.
See also indexRange().
Sets the node id to nodeId.
See also nodeId().
Sets the server timestamp to serverTimestamp.
See also serverTimestamp().
Sets the source timestamp to sourceTimestamp.
See also sourceTimestamp().
Sets the status code to statusCode.
See also statusCode().
Sets the value to value.
See also value().
Returns the source timestamp for value().
See also setSourceTimestamp().
Returns the status code for this element. If the status code is not Good, the value and the timestamps are invalid.
See also setStatusCode().
Returns the value.
See also setValue().