Auf dieser Seite

QOpcUaReadResult Class

Diese Klasse speichert das Ergebnis eines Lesevorgangs. Mehr...

Header: #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 sowie Zeitstempel zurück, die beschreiben, wann ein Wert von der Quelle generiert wurde und wann der Server ihn erhalten hat. Außerdem wird ein Statuscode zurückgegeben, der angibt, ob der Wert gelesen werden konnte und, falls 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 einer Anfrage zuordnen kann.

Objekte dieser Klasse werden im Signal „ QOpcUaClient::readNodeAttributesFinished()“ zurückgegeben und enthalten das Ergebnis eines Lesevorgangs, der Teil einer Anfrage vom Typ „ QOpcUaClient::readNodeAttributes()“ war.

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

Dokumentation zu den Member-Funktionen

QOpcUaReadResult::QOpcUaReadResult()

„default“ erstellt ein Leseergebnis, ohne dass Parameter festgelegt wurden.

QOpcUaReadResult::QOpcUaReadResult(const QOpcUaReadResult &other)

Erstellt ein Leseergebnis aus „ other “.

QOpcUa::NodeAttribute QOpcUaReadResult::attribute() const

Gibt die 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 Server-Zeitstempel 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)

Legt den Indexbereich auf „ indexRange “ fest.

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 Quellzeitstempel 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 Quellzeitstempel 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 “ lautet, 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)

Legt die Werte aus „ rhs “ in diesem Leseergebnis fest.

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