QOpcUaDataValue Class

Diese Klasse speichert OPC UA Wertdaten und zugehörige Metadaten. Mehr...

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

Öffentliche Funktionen

QOpcUaDataValue()
QOpcUaDataValue(const QOpcUaDataValue &other)
~QOpcUaDataValue()
(since 6.7) quint16 serverPicoseconds() const
QDateTime serverTimestamp() const
(since 6.7) void setServerPicoseconds(quint16 serverPicoseconds)
void setServerTimestamp(const QDateTime &serverTimestamp)
(since 6.7) void setSourcePicoseconds(quint16 sourcePicoseconds)
void setSourceTimestamp(const QDateTime &sourceTimestamp)
void setStatusCode(QOpcUa::UaStatusCode statusCode)
void setValue(const QVariant &value)
(since 6.7) quint16 sourcePicoseconds() const
QDateTime sourceTimestamp() const
QOpcUa::UaStatusCode statusCode() const
void swap(QOpcUaDataValue &other)
QVariant value() const
(since 6.7) QVariant operator QVariant() const
QOpcUaDataValue &operator=(const QOpcUaDataValue &other)
(since 6.7) bool operator!=(const QOpcUaDataValue &lhs, const QOpcUaDataValue &rhs)
(since 6.7) bool operator==(const QOpcUaDataValue &lhs, const QOpcUaDataValue &rhs)

Detaillierte Beschreibung

Diese Klasse entspricht dem OPC UA DataValue Typ.

Dokumentation der Mitgliedsfunktionen

QOpcUaDataValue::QOpcUaDataValue()

Konstruiert einen ungültigen Datenwert.

QOpcUaDataValue::QOpcUaDataValue(const QOpcUaDataValue &other)

Konstruiert einen Datenwert aus other.

[noexcept] QOpcUaDataValue::~QOpcUaDataValue()

Zerstört den Datenwert.

[since 6.7] quint16 QOpcUaDataValue::serverPicoseconds() const

Gibt die Anzahl der 10-Pikosekunden-Intervalle für den Server-Zeitstempel zurück.

Diese Funktion wurde in Qt 6.7 eingeführt.

Siehe auch setServerPicoseconds().

QDateTime QOpcUaDataValue::serverTimestamp() const

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

Siehe auch setServerTimestamp().

[since 6.7] void QOpcUaDataValue::setServerPicoseconds(quint16 serverPicoseconds)

Setzt die Anzahl der 10 Pikosekunden-Intervalle für den Server-Zeitstempel auf serverPicoseconds.

Diese Funktion wurde in Qt 6.7 eingeführt.

Siehe auch serverPicoseconds().

void QOpcUaDataValue::setServerTimestamp(const QDateTime &serverTimestamp)

Setzt den Zeitstempel des Servers auf serverTimestamp.

Siehe auch serverTimestamp().

[since 6.7] void QOpcUaDataValue::setSourcePicoseconds(quint16 sourcePicoseconds)

Setzt die Anzahl der 10 Pikosekunden-Intervalle für den Quell-Zeitstempel auf sourcePicoseconds.

Diese Funktion wurde in Qt 6.7 eingeführt.

Siehe auch sourcePicoseconds().

void QOpcUaDataValue::setSourceTimestamp(const QDateTime &sourceTimestamp)

Setzt den Quell-Zeitstempel auf sourceTimestamp.

Siehe auch sourceTimestamp().

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

Setzt den Statuscode auf statusCode.

Siehe auch statusCode().

void QOpcUaDataValue::setValue(const QVariant &value)

Setzt den Wert auf value.

Wenn dieser Datenwert mit QOpcUaBinaryDataEncoding oder QOpcUaGenericStructHandler verwendet werden soll, muss der Typ des Wertes QOpcUaVariant sein.

Siehe auch value().

[since 6.7] quint16 QOpcUaDataValue::sourcePicoseconds() const

Gibt die Anzahl der 10-Pikosekunden-Intervalle für den Quell-Zeitstempel zurück.

Diese Funktion wurde in Qt 6.7 eingeführt.

Siehe auch setSourcePicoseconds().

QDateTime QOpcUaDataValue::sourceTimestamp() const

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

Siehe auch setSourceTimestamp().

QOpcUa::UaStatusCode QOpcUaDataValue::statusCode() const

Gibt den Statuscode für diesen Datenwert zurück. Wenn der Statuscode nicht Good lautet, sind der Wert und die Zeitstempel ungültig.

Siehe auch setStatusCode().

[noexcept] void QOpcUaDataValue::swap(QOpcUaDataValue &other)

Tauscht diese Datenwertinstanz mit other aus. Diese Funktion ist sehr schnell und schlägt nie fehl.

QVariant QOpcUaDataValue::value() const

Gibt den Wert zurück.

Siehe auch setValue().

[since 6.7] QVariant QOpcUaDataValue::operator QVariant() const

Gibt eine QVariant zurück, die diesen Datenwert enthält.

Diese Funktion wurde in Qt 6.7 eingeführt.

QOpcUaDataValue &QOpcUaDataValue::operator=(const QOpcUaDataValue &other)

Legt die Werte von other in diesem Datenwert fest.

Verwandte Nicht-Mitglieder

[noexcept, since 6.7] bool operator!=(const QOpcUaDataValue &lhs, const QOpcUaDataValue &rhs)

Gibt true zurück, wenn lhs nicht gleich rhs ist.

Diese Funktion wurde in Qt 6.7 eingeführt.

[noexcept, since 6.7] bool operator==(const QOpcUaDataValue &lhs, const QOpcUaDataValue &rhs)

Gibt true zurück, wenn lhs gleich rhs ist.

Diese Funktion wurde in Qt 6.7 eingeführt.

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