QOpcUaReadResult Class
Questa classe memorizza il risultato di un'operazione di lettura. Per saperne di più...
| Intestazione: | #include <QOpcUaReadResult> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
| qmake: | QT += opcua |
Funzioni pubbliche
| QOpcUaReadResult() | |
| QOpcUaReadResult(const QOpcUaReadResult &other) | |
| 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 |
| QOpcUaReadResult & | operator=(const QOpcUaReadResult &rhs) |
Descrizione dettagliata
Un'operazione di lettura su un server OPC UA restituisce il valore e i timestamp che descrivono quando un valore è stato generato dalla sorgente e quando il server lo ha ottenuto. Restituisce inoltre un codice di stato che indica se il valore è stato letto e, in caso contrario, il motivo per cui la lettura non è andata a buon fine.
Oltre ai dati restituiti dal server, questa classe contiene anche l’ID del nodo, l’attributo e l’intervallo di indici della richiesta, per consentire al client di associare il risultato a una richiesta specifica.
Gli oggetti di questa classe vengono restituiti nel segnale ` QOpcUaClient::readNodeAttributesFinished()` e contengono il risultato di un'operazione di lettura che faceva parte di una richiesta ` QOpcUaClient::readNodeAttributes()`.
Vedi anche QOpcUaClient::readNodeAttributes(), QOpcUaClient::readNodeAttributesFinished() e QOpcUaReadItem.
Documentazione sulle funzioni membro
QOpcUaReadResult::QOpcUaReadResult()
Il valore predefinito genera un risultato di lettura senza parametri specificati.
QOpcUaReadResult::QOpcUaReadResult(const QOpcUaReadResult &other)
Crea un risultato di lettura da other.
QOpcUa::NodeAttribute QOpcUaReadResult::attribute() const
Restituisce l’ID dell’attributo.
Vedi anche setAttribute().
QString QOpcUaReadResult::indexRange() const
Restituisce l'intervallo di indici.
Vedi anche ` setIndexRange()`.
QString QOpcUaReadResult::nodeId() const
Restituisce l'ID del nodo.
Vedi anche setNodeId().
QDateTime QOpcUaReadResult::serverTimestamp() const
Restituisce il timestamp del server per value().
Vedi anche setServerTimestamp().
void QOpcUaReadResult::setAttribute(QOpcUa::NodeAttribute attribute)
Imposta l'attributo id su attribute.
Vedi anche attribute().
void QOpcUaReadResult::setIndexRange(const QString &indexRange)
Imposta l'intervallo dell'indice su indexRange.
Vedi anche indexRange().
void QOpcUaReadResult::setNodeId(const QString &nodeId)
Imposta l'ID del nodo su nodeId.
Vedi anche nodeId().
void QOpcUaReadResult::setServerTimestamp(const QDateTime &serverTimestamp)
Imposta il timestamp del server su serverTimestamp.
Vedi anche serverTimestamp().
void QOpcUaReadResult::setSourceTimestamp(const QDateTime &sourceTimestamp)
Imposta il timestamp di origine su sourceTimestamp.
Vedi anche sourceTimestamp().
void QOpcUaReadResult::setStatusCode(QOpcUa::UaStatusCode statusCode)
Imposta il codice di stato su " statusCode".
Vedi anche statusCode().
void QOpcUaReadResult::setValue(const QVariant &value)
Imposta il valore su value.
Vedi anche value().
QDateTime QOpcUaReadResult::sourceTimestamp() const
Restituisce il timestamp di origine per value().
Vedi anche setSourceTimestamp().
QOpcUa::UaStatusCode QOpcUaReadResult::statusCode() const
Restituisce il codice di stato relativo a questo elemento. Se il codice di stato non è Good, il valore e i timestamp non sono validi.
Vedi anche setStatusCode().
QVariant QOpcUaReadResult::value() const
Restituisce il valore.
Vedi anche setValue().
QOpcUaReadResult &QOpcUaReadResult::operator=(const QOpcUaReadResult &rhs)
Imposta i valori provenienti da rhs in questo risultato di lettura.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.