This class stores the result of a read operation. 更多...
头: | #include <QOpcUaReadResult> |
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.
另请参阅 QOpcUaClient::readNodeAttributes (), QOpcUaClient::readNodeAttributesFinished (),和 QOpcUaReadItem .
Constructs a read result from other .
设置值从 rhs in this read result.
Returns the attribute id.
另请参阅 setAttribute ().
Returns the index range.
另请参阅 setIndexRange ().
Returns the node id.
另请参阅 setNodeId ().
Returns the server timestamp for value ().
另请参阅 setServerTimestamp ().
Sets the attribute id to attribute .
另请参阅 attribute ().
Sets the index range to indexRange .
另请参阅 indexRange ().
Sets the node id to nodeId .
另请参阅 nodeId ().
Sets the server timestamp to serverTimestamp .
另请参阅 serverTimestamp ().
Sets the source timestamp to sourceTimestamp .
另请参阅 sourceTimestamp ().
Sets the status code to statusCode .
另请参阅 statusCode ().
Sets the value to value .
另请参阅 value ().
Returns the source timestamp for value ().
另请参阅 setSourceTimestamp ().
Returns the status code for this element. If the status code is not Good , the value and the timestamps are invalid.
另请参阅 setStatusCode ().
Returns the value.
另请参阅 setValue ().