QOpcUaHistoryReadResponse Class
Esta clase se utiliza para solicitar datos históricos y almacenar los resultados. Más...
| Cabecera: | #include <QOpcUaHistoryReadResponse> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa)target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
| qmake: | QT += opcua |
| Desde: | Qt 6.3 |
| Hereda: | QObject |
Tipos Públicos
| enum class | State { Unknown, Reading, Finished, MoreDataAvailable, Error } |
Funciones Públicas
| virtual | ~QOpcUaHistoryReadResponse() |
| QList<QOpcUaHistoryData> | data() const |
(since 6.7) QList<QOpcUaHistoryEvent> | events() const |
| bool | hasMoreData() const |
| bool | readMoreData() |
| bool | releaseContinuationPoints() |
| QOpcUa::UaStatusCode | serviceResult() const |
| QOpcUaHistoryReadResponse::State | state() const |
Señales
| void | readHistoryDataFinished(const QList<QOpcUaHistoryData> &results, QOpcUa::UaStatusCode serviceResult) |
(since 6.7) void | readHistoryEventsFinished(const QList<QOpcUaHistoryEvent> &results, QOpcUa::UaStatusCode serviceResult) |
| void | stateChanged(QOpcUaHistoryReadResponse::State state) |
Descripción detallada
Una petición de datos históricos a un servidor OPC UA puede ser especificada por un QOpcUaHistoryReadRawRequest o QOpcUaHistoryReadEventRequest.
Los objetos de esta clase y el código de estado de la petición se devuelven en la señal QOpcUaHistoryReadResponse::readHistoryDataFinished(const QList<QOpcUaHistoryData> &results, QOpcUa::UaStatusCode serviceResult) o QOpcUaHistoryReadResponse::readHistoryEventsFinished(const QList<QOpcUaHistoryEvent> &results, QOpcUa::UaStatusCode serviceResult) dependiendo del tipo de petición y contienen el resultado de una petición.
Documentación de tipos de miembros
enum class QOpcUaHistoryReadResponse::State
Este enum especifica el estado en el que se encuentra la respuesta.
| Constante | Valor |
|---|---|
QOpcUaHistoryReadResponse::State::Unknown | 0 |
QOpcUaHistoryReadResponse::State::Reading | 1 |
QOpcUaHistoryReadResponse::State::Finished | 2 |
QOpcUaHistoryReadResponse::State::MoreDataAvailable | 3 |
QOpcUaHistoryReadResponse::State::Error | 4 |
Documentación de la función miembro
[virtual noexcept] QOpcUaHistoryReadResponse::~QOpcUaHistoryReadResponse()
El destructor de QOpcUaHistoryReadResponse
QList<QOpcUaHistoryData> QOpcUaHistoryReadResponse::data() const
Devuelve una lista que contiene los datos históricos solicitados.
[since 6.7] QList<QOpcUaHistoryEvent> QOpcUaHistoryReadResponse::events() const
Devuelve una lista de QOpcUaHistoryEvent que contiene una lista de eventos para cada nodo a leer en la petición.
Esta función se introdujo en Qt 6.7.
bool QOpcUaHistoryReadResponse::hasMoreData() const
Devuelve true si hay más valores disponibles en la solicitud de datos históricos.
[signal] void QOpcUaHistoryReadResponse::readHistoryDataFinished(const QList<QOpcUaHistoryData> &results, QOpcUa::UaStatusCode serviceResult)
Esta señal se emite cuando finaliza una solicitud de datos históricos. Se suma a results y establece serviceResult para indicar el estado del resultado.
Véase también data() y serviceResult().
[signal, since 6.7] void QOpcUaHistoryReadResponse::readHistoryEventsFinished(const QList<QOpcUaHistoryEvent> &results, QOpcUa::UaStatusCode serviceResult)
Esta señal se emite cuando finaliza una solicitud de histórico. Los nuevos datos históricos y cualquier dato anterior se devuelven en results y serviceResult indica el estado del resultado.
Esta función se introdujo en Qt 6.7.
Véase también events() y serviceResult().
bool QOpcUaHistoryReadResponse::readMoreData()
Devuelve true si se ha enviado con éxito una solicitud de lectura de más valores históricos.
bool QOpcUaHistoryReadResponse::releaseContinuationPoints()
Libera los puntos de continuación y establece la solicitud como finalizada. Devuelve true si la solicitud pendiente ha finalizado con éxito; en caso contrario devuelve false.
QOpcUa::UaStatusCode QOpcUaHistoryReadResponse::serviceResult() const
Devuelve el serviceresultado de la solicitud de datos históricos.
QOpcUaHistoryReadResponse::State QOpcUaHistoryReadResponse::state() const
Devuelve el estado actual de la solicitud de datos históricos.
[signal] void QOpcUaHistoryReadResponse::stateChanged(QOpcUaHistoryReadResponse::State state)
Esta señal se emite cuando se cambia el de una solicitud de datos históricos. Establece state para indicar el estado del cambio.
© 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.