Auf dieser Seite

QOpcUaHistoryReadResponse Class

Diese Klasse dient dazu, historische Daten abzufragen und die Ergebnisse zu speichern. Mehr...

Header: #include <QOpcUaHistoryReadResponse>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua
Seit: Qt 6.3
Erbt von: 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 Abfrage von historischen Daten an einen OPC-UA-Server kann über „ QOpcUaHistoryReadRawRequest “ oder „ QOpcUaHistoryReadEventRequest “ spezifiziert werden.

Objekte dieser Klasse und der Statuscode der Anfrage werden je nach Anfragetyp im Signal „ QOpcUaHistoryReadResponse::readHistoryDataFinished “ (const QList<QOpcUaHistoryData> &results, QOpcUa::UaStatusCode serviceResult) oder im Signal „ QOpcUaHistoryReadResponse::readHistoryEventsFinished “ (const QList<QOpcUaHistoryEvent> &results, QOpcUa::UaStatusCode serviceResult) zurück und enthalten das Ergebnis einer Anfrage.

Dokumentation zum Mitgliedstyp

enum class QOpcUaHistoryReadResponse::State

Diese Enumeration gibt den Status der Antwort an.

KonstanteWert
QOpcUaHistoryReadResponse::State::Unknown0
QOpcUaHistoryReadResponse::State::Reading1
QOpcUaHistoryReadResponse::State::Finished2
QOpcUaHistoryReadResponse::State::MoreDataAvailable3
QOpcUaHistoryReadResponse::State::Error4

Dokumentation der Mitgliedsfunktionen

[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 für jeden in der Anfrage zu lesenden Knoten eine Liste von Ereignissen enthält.

Diese Funktion wurde in Qt 6.7 eingeführt.

bool QOpcUaHistoryReadResponse::hasMoreData() const

Gibt „ true “ zurück, wenn weitere Werte aus der Abfrage der historischen Daten verfügbar sind.

[signal] void QOpcUaHistoryReadResponse::readHistoryDataFinished(const QList<QOpcUaHistoryData> &results, QOpcUa::UaStatusCode serviceResult)

Dieses Signal wird ausgelöst, wenn eine Abfrage von historischen Daten abgeschlossen ist. Es schreibt an „ results “ und setzt „ serviceResult “, um den Status 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 ausgelöst, wenn eine Abfrage historischer Ereignisse abgeschlossen ist. Die neuen Verlaufsdaten sowie etwaige vorherige Daten werden in ` results ` zurückgegeben, und ` serviceResult ` gibt den Status 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 Leseanfrage für weitere historische Werte erfolgreich versendet wurde.

bool QOpcUaHistoryReadResponse::releaseContinuationPoints()

Gibt die Fortsetzungspunkte frei und markiert die Anfrage als abgeschlossen. Gibt „ true “ zurück, wenn die ausstehende Anfrage erfolgreich abgeschlossen wurde; andernfalls wird „false“ zurückgegeben.

QOpcUa::UaStatusCode QOpcUaHistoryReadResponse::serviceResult() const

Gibt das Servicergebnis der Abfrage der historischen Daten zurück.

QOpcUaHistoryReadResponse::State QOpcUaHistoryReadResponse::state() const

Gibt den aktuellen Status der Abfrage historischer Daten zurück.

[signal] void QOpcUaHistoryReadResponse::stateChanged(QOpcUaHistoryReadResponse::State state)

Dieses Signal wird ausgelöst, wenn sich der Status einer Anfrage nach historischen Daten ändert. Es setzt die Variable „ state “, um den Status der Änderung anzuzeigen.

© 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.