QOpcUaHistoryReadResponse Class
Diese Klasse dient der Abfrage von historischen Daten und der Speicherung der Ergebnisse. Mehr...
Kopfzeile: | #include <QOpcUaHistoryReadResponse> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
qmake: | QT += opcua |
Since: | Qt 6.3 |
Vererbt: | QObject |
Öffentliche Typen
enum class | State { Unknown, Reading, Finished, MoreDataAvailable, Error } |
Öffentliche Funktionen
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 |
Signale
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) |
Detaillierte Beschreibung
Eine historische Datenanfrage an einen OPC UA Server kann durch eine QOpcUaHistoryReadRawRequest oder QOpcUaHistoryReadEventRequest spezifiziert werden.
Objekte dieser Klasse und der Statuscode der Anfrage werden im Signal QOpcUaHistoryReadResponse::readHistoryDataFinished(const QList<QOpcUaHistoryData> &results, QOpcUa::UaStatusCode serviceResult) oder QOpcUaHistoryReadResponse::readHistoryEventsFinished(const QList<QOpcUaHistoryEvent> &results, QOpcUa::UaStatusCode serviceResult) je nach Anfragetyp zurückgegeben und enthalten das Ergebnis einer Anfrage.
Dokumentation der Mitgliedstypen
enum class QOpcUaHistoryReadResponse::State
Diese Aufzählung gibt den Zustand an, in dem sich die Antwort befindet.
Konstante | Wert |
---|---|
QOpcUaHistoryReadResponse::State::Unknown | 0 |
QOpcUaHistoryReadResponse::State::Reading | 1 |
QOpcUaHistoryReadResponse::State::Finished | 2 |
QOpcUaHistoryReadResponse::State::MoreDataAvailable | 3 |
QOpcUaHistoryReadResponse::State::Error | 4 |
Mitgliederfunktion Dokumentation
[virtual noexcept]
QOpcUaHistoryReadResponse::~QOpcUaHistoryReadResponse()
Der Destruktor für QOpcUaHistoryReadResponse
QList<QOpcUaHistoryData> QOpcUaHistoryReadResponse::data() const
Gibt eine Liste zurück, die die angeforderten historischen Daten enthält.
[since 6.7]
QList<QOpcUaHistoryEvent> QOpcUaHistoryReadResponse::events() const
Gibt eine Liste von QOpcUaHistoryEvent zurück, die eine Liste von Ereignissen für jeden zu lesenden Knoten in der Anfrage enthält.
Diese Funktion wurde in Qt 6.7 eingeführt.
bool QOpcUaHistoryReadResponse::hasMoreData() const
Gibt true
zurück, wenn weitere Werte aus der historischen Datenabfrage verfügbar sind.
[signal]
void QOpcUaHistoryReadResponse::readHistoryDataFinished(const QList<QOpcUaHistoryData> &results, QOpcUa::UaStatusCode serviceResult)
Dieses Signal wird ausgegeben, wenn eine Anfrage nach historischen Daten abgeschlossen ist. Es addiert zu results und setzt serviceResult, um den Zustand des Ergebnisses anzuzeigen.
Siehe auch data() und serviceResult().
[signal, since 6.7]
void QOpcUaHistoryReadResponse::readHistoryEventsFinished(const QList<QOpcUaHistoryEvent> &results, QOpcUa::UaStatusCode serviceResult)
Dieses Signal wird ausgegeben, wenn eine Anfrage zu einem historischen Ereignis abgeschlossen ist. Die neuen Verlaufsdaten und alle vorherigen Daten werden in results zurückgegeben und serviceResult zeigt den Zustand des Ergebnisses an.
Diese Funktion wurde in Qt 6.7 eingeführt.
Siehe auch events() und serviceResult().
bool QOpcUaHistoryReadResponse::readMoreData()
Gibt true
zurück, wenn eine Leseanforderung für weitere historische Werte erfolgreich abgeschickt wurde.
bool QOpcUaHistoryReadResponse::releaseContinuationPoints()
Gibt die Fortsetzungspunkte frei und setzt die Anfrage als beendet. Gibt true
zurück, wenn die anhängige Anfrage erfolgreich beendet wurde; andernfalls wird false zurückgegeben.
QOpcUa::UaStatusCode QOpcUaHistoryReadResponse::serviceResult() const
Gibt das Serviceergebnis der historischen Datenabfrage zurück.
QOpcUaHistoryReadResponse::State QOpcUaHistoryReadResponse::state() const
Gibt den aktuellen Status der historischen Datenabfrage zurück.
[signal]
void QOpcUaHistoryReadResponse::stateChanged(QOpcUaHistoryReadResponse::State state)
Dieses Signal wird ausgegeben, wenn sich die Anforderung historischer Daten ändert. Es setzt state, um den Status der Änderung anzuzeigen.
© 2025 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.