QOpcUaHistoryData Class
Esta clase almacena los valores históricos de un nodo. Más información...
| Encabezado: | #include <QOpcUaHistoryData> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
| qmake: | QT += opcua |
| Desde: | Qt 6.3 |
Funciones públicas
| QOpcUaHistoryData() | |
| QOpcUaHistoryData(const QString &nodeId) | |
| QOpcUaHistoryData(const QOpcUaHistoryData &other) | |
| ~QOpcUaHistoryData() | |
| void | addValue(const QOpcUaDataValue &value) |
| int | count() const |
| QString | nodeId() const |
| QList<QOpcUaDataValue> | result() const |
| void | setNodeId(const QString &nodeId) |
| void | setStatusCode(QOpcUa::UaStatusCode statusCode) |
| QOpcUa::UaStatusCode | statusCode() const |
| void | swap(QOpcUaHistoryData &other) |
| QOpcUaHistoryData & | operator=(const QOpcUaHistoryData &other) |
Descripción detallada
Cuando se gestiona una solicitud de lectura de datos del historial, se utilizan instancias de esta clase para almacenar información sobre qué nodo se ha leído, sus valores y el código de estado. La señal «finished» de una solicitud de lectura del historial devolverá una lista de objetos QOpcUaHistoryData que se pueden analizar para revisar los resultados de la solicitud.
Documentación de las funciones miembro
QOpcUaHistoryData::QOpcUaHistoryData()
Crea un elemento de datos de historial no válido.
[explicit] QOpcUaHistoryData::QOpcUaHistoryData(const QString &nodeId)
Crea un elemento de datos del historial y almacena a qué nodo corresponde.
QOpcUaHistoryData::QOpcUaHistoryData(const QOpcUaHistoryData &other)
Crea un elemento de datos histórico a partir de other.
[noexcept] QOpcUaHistoryData::~QOpcUaHistoryData()
Elimina el elemento de datos del historial.
void QOpcUaHistoryData::addValue(const QOpcUaDataValue &value)
Añade un objeto de valor de datos proporcionado por value.
int QOpcUaHistoryData::count() const
Devuelve el número de objetos de valores de datos disponibles.
QString QOpcUaHistoryData::nodeId() const
Devuelve el nodeId del nodo cuyos datos se han almacenado.
Véase también setNodeId().
QList<QOpcUaDataValue> QOpcUaHistoryData::result() const
Devuelve la lista de objetos de valores de datos que contienen los resultados de la solicitud de lectura del historial.
void QOpcUaHistoryData::setNodeId(const QString &nodeId)
Establece el valor de « nodeId » en « nodeId ».
Véase también nodeId().
void QOpcUaHistoryData::setStatusCode(QOpcUa::UaStatusCode statusCode)
Establece el código de estado en « statusCode ».
Véase también statusCode().
QOpcUa::UaStatusCode QOpcUaHistoryData::statusCode() const
Devuelve el código de estado que indica si se ha producido un error al recuperar los datos del historial.
Véase también setStatusCode().
[noexcept] void QOpcUaHistoryData::swap(QOpcUaHistoryData &other)
Intercambia esta instancia de valor de datos con other. Esta función es muy rápida y nunca falla.
QOpcUaHistoryData &QOpcUaHistoryData::operator=(const QOpcUaHistoryData &other)
Establece los valores de other en este elemento de datos históricos.
© 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.