QOpcUaDataValue Class
Cette classe stocke les données de valeur OPC UA et les métadonnées associées. En savoir plus…
| En-tête : | #include <QOpcUaDataValue> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
| qmake : | QT += opcua |
| Depuis : | Qt 6.3 |
Fonctions publiques
| 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) | operator QVariant() const |
| QOpcUaDataValue & | operator=(const QOpcUaDataValue &other) |
Éléments non membres associés
(since 6.7) bool | operator!=(const QOpcUaDataValue &lhs, const QOpcUaDataValue &rhs) |
(since 6.7) bool | operator==(const QOpcUaDataValue &lhs, const QOpcUaDataValue &rhs) |
Documentation des fonctions membres
QOpcUaDataValue::QOpcUaDataValue()
Crée une valeur de données non valide.
QOpcUaDataValue::QOpcUaDataValue(const QOpcUaDataValue &other)
Crée une valeur de données à partir de other.
[noexcept] QOpcUaDataValue::~QOpcUaDataValue()
Supprime la valeur de la donnée.
[since 6.7] quint16 QOpcUaDataValue::serverPicoseconds() const
Renvoie le nombre d'intervalles de 10 picosecondes correspondant à l'horodatage du serveur.
Cette fonction a été introduite dans Qt 6.7.
Voir également setServerPicoseconds().
QDateTime QOpcUaDataValue::serverTimestamp() const
Renvoie l'horodatage du serveur pour la fonction value().
Voir aussi setServerTimestamp().
[since 6.7] void QOpcUaDataValue::setServerPicoseconds(quint16 serverPicoseconds)
Définit le nombre d'intervalles de 10 picosecondes pour l'horodatage du serveur à serverPicoseconds.
Cette fonction a été introduite dans Qt 6.7.
Voir également serverPicoseconds().
void QOpcUaDataValue::setServerTimestamp(const QDateTime &serverTimestamp)
Définit l'horodatage du serveur sur serverTimestamp.
Voir également serverTimestamp().
[since 6.7] void QOpcUaDataValue::setSourcePicoseconds(quint16 sourcePicoseconds)
Définit le nombre d'intervalles de 10 picosecondes pour l'horodatage de la source à sourcePicoseconds.
Cette fonction a été introduite dans Qt 6.7.
Voir également sourcePicoseconds().
void QOpcUaDataValue::setSourceTimestamp(const QDateTime &sourceTimestamp)
Définit l'horodatage source sur sourceTimestamp.
Voir également sourceTimestamp().
void QOpcUaDataValue::setStatusCode(QOpcUa::UaStatusCode statusCode)
Définit le code d'état sur « statusCode ».
Voir également statusCode().
void QOpcUaDataValue::setValue(const QVariant &value)
Définit la valeur sur value.
Si cette valeur doit être utilisée avec ` QOpcUaBinaryDataEncoding ` ou ` QOpcUaGenericStructHandler`, son type doit être ` QOpcUaVariant`.
Voir également value().
[since 6.7] quint16 QOpcUaDataValue::sourcePicoseconds() const
Renvoie le nombre d'intervalles de 10 picosecondes pour l'horodatage source.
Cette fonction a été introduite dans Qt 6.7.
Voir également setSourcePicoseconds().
QDateTime QOpcUaDataValue::sourceTimestamp() const
Renvoie l'horodatage source de la fonction value().
Voir aussi setSourceTimestamp().
QOpcUa::UaStatusCode QOpcUaDataValue::statusCode() const
Renvoie le code d'état associé à cette valeur. Si le code d'état n'est pas « Good », la valeur et les horodatages ne sont pas valides.
Voir également setStatusCode().
[noexcept] void QOpcUaDataValue::swap(QOpcUaDataValue &other)
Permute cette instance de valeur de données avec other. Cette fonction est très rapide et ne rencontre jamais d'échec.
QVariant QOpcUaDataValue::value() const
Renvoie la valeur.
Voir aussi setValue().
[since 6.7] QOpcUaDataValue::operator QVariant() const
Renvoie un objet ` QVariant ` contenant cette valeur.
Cette fonction a été introduite dans Qt 6.7.
QOpcUaDataValue &QOpcUaDataValue::operator=(const QOpcUaDataValue &other)
Définit les valeurs provenant de other dans cette valeur de données.
Éléments non membres associés
[noexcept, since 6.7] bool operator!=(const QOpcUaDataValue &lhs, const QOpcUaDataValue &rhs)
Renvoie « true » si « lhs » n'est pas égal à « rhs ».
Cette fonction a été introduite dans Qt 6.7.
[noexcept, since 6.7] bool operator==(const QOpcUaDataValue &lhs, const QOpcUaDataValue &rhs)
Renvoie « true » si « lhs » est égal à « rhs ».
Cette fonction a été introduite dans Qt 6.7.
© 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.