QOpcUaDataValue Class
Esta clase almacena datos de valores OPC UA y los metadatos asociados. Más información...
| Encabezado: | #include <QOpcUaDataValue> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
| qmake: | QT += opcua |
| Desde: | Qt 6.3 |
Funciones públicas
| 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) |
Elementos no miembros relacionados
(since 6.7) bool | operator!=(const QOpcUaDataValue &lhs, const QOpcUaDataValue &rhs) |
(since 6.7) bool | operator==(const QOpcUaDataValue &lhs, const QOpcUaDataValue &rhs) |
Documentación de las funciones de miembro
QOpcUaDataValue::QOpcUaDataValue()
Crea un valor de datos no válido.
QOpcUaDataValue::QOpcUaDataValue(const QOpcUaDataValue &other)
Crea un valor de datos a partir de other.
[noexcept] QOpcUaDataValue::~QOpcUaDataValue()
Elimina el valor de los datos.
[since 6.7] quint16 QOpcUaDataValue::serverPicoseconds() const
Devuelve el número de intervalos de 10 picosegundos correspondientes a la marca de tiempo del servidor.
Esta función se introdujo en Qt 6.7.
Véase también setServerPicoseconds().
QDateTime QOpcUaDataValue::serverTimestamp() const
Devuelve la marca de tiempo del servidor para value().
Véase también setServerTimestamp().
[since 6.7] void QOpcUaDataValue::setServerPicoseconds(quint16 serverPicoseconds)
Establece el número de intervalos de 10 picosegundos para la marca de tiempo del servidor en serverPicoseconds.
Esta función se introdujo en Qt 6.7.
Véase también serverPicoseconds().
void QOpcUaDataValue::setServerTimestamp(const QDateTime &serverTimestamp)
Establece la marca de tiempo del servidor en serverTimestamp.
Véase también serverTimestamp().
[since 6.7] void QOpcUaDataValue::setSourcePicoseconds(quint16 sourcePicoseconds)
Establece el número de intervalos de 10 picosegundos para la marca de tiempo de origen en sourcePicoseconds.
Esta función se introdujo en Qt 6.7.
Véase también sourcePicoseconds().
void QOpcUaDataValue::setSourceTimestamp(const QDateTime &sourceTimestamp)
Establece la marca de tiempo de origen en sourceTimestamp.
Véase también sourceTimestamp().
void QOpcUaDataValue::setStatusCode(QOpcUa::UaStatusCode statusCode)
Establece el código de estado en « statusCode ».
Véase también statusCode().
void QOpcUaDataValue::setValue(const QVariant &value)
Establece el valor en value.
Si este valor de datos se va a utilizar con ` QOpcUaBinaryDataEncoding ` o ` QOpcUaGenericStructHandler`, el tipo del valor debe ser ` QOpcUaVariant`.
Véase también ` value()`.
[since 6.7] quint16 QOpcUaDataValue::sourcePicoseconds() const
Devuelve el número de intervalos de 10 picosegundos correspondientes a la marca de tiempo de origen.
Esta función se introdujo en Qt 6.7.
Véase también setSourcePicoseconds().
QDateTime QOpcUaDataValue::sourceTimestamp() const
Devuelve la marca de tiempo de origen de value().
Véase también setSourceTimestamp().
QOpcUa::UaStatusCode QOpcUaDataValue::statusCode() const
Devuelve el código de estado correspondiente a este valor de datos. Si el código de estado no es « Good », el valor y las marcas de tiempo no son válidos.
Véase también setStatusCode().
[noexcept] void QOpcUaDataValue::swap(QOpcUaDataValue &other)
Intercambia esta instancia de valor de datos con other. Esta función es muy rápida y nunca falla.
QVariant QOpcUaDataValue::value() const
Devuelve el valor.
Véase también setValue().
[since 6.7] QOpcUaDataValue::operator QVariant() const
Devuelve un objeto ` QVariant ` que contiene este valor de datos.
Esta función se introdujo en Qt 6.7.
QOpcUaDataValue &QOpcUaDataValue::operator=(const QOpcUaDataValue &other)
Establece los valores de other en este valor de datos.
Elementos no miembros relacionados
[noexcept, since 6.7] bool operator!=(const QOpcUaDataValue &lhs, const QOpcUaDataValue &rhs)
Devuelve « true » si « lhs » no es igual a « rhs ».
Esta función se introdujo en Qt 6.7.
[noexcept, since 6.7] bool operator==(const QOpcUaDataValue &lhs, const QOpcUaDataValue &rhs)
Devuelve ` true ` si ` lhs ` es igual a ` rhs`.
Esta función se introdujo en 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.