QOpcUaHistoryReadResponse Class
Questa classe viene utilizzata per richiedere dati storici e memorizzare i risultati. Per saperne di più...
| Intestazione: | #include <QOpcUaHistoryReadResponse> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
| qmake: | QT += opcua |
| A partire da: | Qt 6.3 |
| Eredita da: | QObject |
Tipi pubblici
| enum class | State { Unknown, Reading, Finished, MoreDataAvailable, Error } |
Funzioni pubbliche
| 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 |
Segnali
| 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) |
Descrizione dettagliata
Una richiesta di dati storici a un server OPC UA può essere specificata tramite un oggetto ` QOpcUaHistoryReadRawRequest ` o ` QOpcUaHistoryReadEventRequest`.
Gli oggetti di questa classe e il codice di stato della richiesta vengono restituiti nel segnale QOpcUaHistoryReadResponse::readHistoryDataFinished(const QList<QOpcUaHistoryData> &results, QOpcUa::UaStatusCode serviceResult) o nel segnale QOpcUaHistoryReadResponse::readHistoryEventsFinished(const QList<QOpcUaHistoryEvent> &results, QOpcUa::UaStatusCode serviceResult) a seconda del tipo di richiesta e contengono il risultato di una richiesta.
Documentazione sui tipi dei membri
enum class QOpcUaHistoryReadResponse::State
Questa enumerazione specifica lo stato della risposta.
| Costante | Valore |
|---|---|
QOpcUaHistoryReadResponse::State::Unknown | 0 |
QOpcUaHistoryReadResponse::State::Reading | 1 |
QOpcUaHistoryReadResponse::State::Finished | 2 |
QOpcUaHistoryReadResponse::State::MoreDataAvailable | 3 |
QOpcUaHistoryReadResponse::State::Error | 4 |
Documentazione delle funzioni membro
[virtual noexcept] QOpcUaHistoryReadResponse::~QOpcUaHistoryReadResponse()
Il distruttore per QOpcUaHistoryReadResponse
QList<QOpcUaHistoryData> QOpcUaHistoryReadResponse::data() const
Restituisce un elenco contenente i dati storici richiesti.
[since 6.7] QList<QOpcUaHistoryEvent> QOpcUaHistoryReadResponse::events() const
Restituisce un elenco di oggetti ` QOpcUaHistoryEvent `, ciascuno contenente un elenco di eventi per ogni nodo da leggere nella richiesta.
Questa funzione è stata introdotta in Qt 6.7.
bool QOpcUaHistoryReadResponse::hasMoreData() const
Restituisce " true " se sono disponibili altri valori dalla richiesta dei dati storici.
[signal] void QOpcUaHistoryReadResponse::readHistoryDataFinished(const QList<QOpcUaHistoryData> &results, QOpcUa::UaStatusCode serviceResult)
Questo segnale viene emesso al termine di una richiesta di dati storici. Viene aggiunto a results e imposta serviceResult per indicare lo stato del risultato.
Vedi anche data() e serviceResult().
[signal, since 6.7] void QOpcUaHistoryReadResponse::readHistoryEventsFinished(const QList<QOpcUaHistoryEvent> &results, QOpcUa::UaStatusCode serviceResult)
Questo segnale viene emesso al termine di una richiesta relativa a un evento storico. I nuovi dati storici e quelli precedenti vengono restituiti in ` results `, mentre ` serviceResult ` indica lo stato del risultato.
Questa funzione è stata introdotta in Qt 6.7.
Vedi anche events() e serviceResult().
bool QOpcUaHistoryReadResponse::readMoreData()
Restituisce ` true ` se una richiesta di lettura di ulteriori valori storici viene inviata con successo.
bool QOpcUaHistoryReadResponse::releaseContinuationPoints()
Rilascia i punti di continuazione e contrassegna la richiesta come completata. Restituisce ` true ` se la richiesta in sospeso è stata completata con successo; in caso contrario, restituisce `false`.
QOpcUa::UaStatusCode QOpcUaHistoryReadResponse::serviceResult() const
Restituisce il risultato del servizio relativo alla richiesta dei dati storici.
QOpcUaHistoryReadResponse::State QOpcUaHistoryReadResponse::state() const
Restituisce lo stato corrente della richiesta di dati storici.
[signal] void QOpcUaHistoryReadResponse::stateChanged(QOpcUaHistoryReadResponse::State state)
Questo segnale viene emesso quando viene modificata una richiesta di dati storici. Imposta il parametro ` state ` per indicare lo stato della modifica.
© 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.