QOpcUaReadResult Class

Diese Klasse speichert das Ergebnis einer Leseoperation. Mehr...

Kopfzeile: #include <QOpcUaReadResult>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua

Öffentliche Funktionen

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)

Detaillierte Beschreibung

Ein Lesevorgang auf einem OPC UA Server gibt den Wert und Zeitstempel zurück, die beschreiben, wann ein Wert von der Quelle erzeugt wurde und wann der Server ihn erhalten hat. Außerdem wird ein Statuscode zurückgegeben, der beschreibt, ob der Wert gelesen werden konnte und wenn nicht, aus welchem Grund der Lesevorgang fehlgeschlagen ist.

Zusätzlich zu den vom Server zurückgegebenen Daten enthält diese Klasse auch die Knoten-ID, das Attribut und den Indexbereich aus der Anfrage, damit ein Client das Ergebnis mit einer Anfrage abgleichen kann.

Objekte dieser Klasse werden im Signal QOpcUaClient::readNodeAttributesFinished() zurückgegeben und enthalten das Ergebnis einer Leseoperation, die Teil einer QOpcUaClient::readNodeAttributes()-Anfrage war.

Siehe auch QOpcUaClient::readNodeAttributes(), QOpcUaClient::readNodeAttributesFinished(), und QOpcUaReadItem.

Dokumentation der Mitgliedsfunktionen

QOpcUaReadResult::QOpcUaReadResult()

Standard konstruiert ein Leseergebnis ohne Parameter.

QOpcUaReadResult::QOpcUaReadResult(const QOpcUaReadResult &other)

Konstruiert ein Leseergebnis aus other.

QOpcUa::NodeAttribute QOpcUaReadResult::attribute() const

Gibt das Attribut id zurück.

Siehe auch setAttribute().

QString QOpcUaReadResult::indexRange() const

Gibt den Indexbereich zurück.

Siehe auch setIndexRange().

QString QOpcUaReadResult::nodeId() const

Gibt die Knoten-ID zurück.

Siehe auch setNodeId().

QDateTime QOpcUaReadResult::serverTimestamp() const

Gibt den Zeitstempel des Servers für value() zurück.

Siehe auch setServerTimestamp().

void QOpcUaReadResult::setAttribute(QOpcUa::NodeAttribute attribute)

Setzt das Attribut id auf attribute.

Siehe auch attribute().

void QOpcUaReadResult::setIndexRange(const QString &indexRange)

Setzt den Indexbereich auf indexRange.

Siehe auch indexRange().

void QOpcUaReadResult::setNodeId(const QString &nodeId)

Setzt die Knoten-ID auf nodeId.

Siehe auch nodeId().

void QOpcUaReadResult::setServerTimestamp(const QDateTime &serverTimestamp)

Setzt den Zeitstempel des Servers auf serverTimestamp.

Siehe auch serverTimestamp().

void QOpcUaReadResult::setSourceTimestamp(const QDateTime &sourceTimestamp)

Setzt den Quell-Zeitstempel auf sourceTimestamp.

Siehe auch sourceTimestamp().

void QOpcUaReadResult::setStatusCode(QOpcUa::UaStatusCode statusCode)

Setzt den Statuscode auf statusCode.

Siehe auch statusCode().

void QOpcUaReadResult::setValue(const QVariant &value)

Setzt den Wert auf value.

Siehe auch value().

QDateTime QOpcUaReadResult::sourceTimestamp() const

Gibt den Quell-Zeitstempel für value() zurück.

Siehe auch setSourceTimestamp().

QOpcUa::UaStatusCode QOpcUaReadResult::statusCode() const

Gibt den Statuscode für dieses Element zurück. Wenn der Statuscode nicht Good ist, sind der Wert und die Zeitstempel ungültig.

Siehe auch setStatusCode().

QVariant QOpcUaReadResult::value() const

Gibt den Wert zurück.

Siehe auch setValue().

QOpcUaReadResult &QOpcUaReadResult::operator=(const QOpcUaReadResult &rhs)

Setzt die Werte von rhs in dieses Leseergebnis.

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