En esta página

QOpcUaHistoryEvent Class

Esta clase almacena los eventos históricos de un nodo. Más...

Cabecera: #include <QOpcUaHistoryEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua
Desde: Qt 6.7

Funciones Públicas

QOpcUaHistoryEvent()
QOpcUaHistoryEvent(const QString &nodeId)
QOpcUaHistoryEvent(const QOpcUaHistoryEvent &other)
QOpcUaHistoryEvent(QOpcUaHistoryEvent &&other)
~QOpcUaHistoryEvent()
void addEvent(const QVariantList &value)
int count() const
QList<QVariantList> events() const
QString nodeId() const
void setNodeId(const QString &nodeId)
void setStatusCode(QOpcUa::UaStatusCode statusCode)
QOpcUa::UaStatusCode statusCode() const
void swap(QOpcUaHistoryEvent &other)
QOpcUaHistoryEvent &operator=(QOpcUaHistoryEvent &&other)
QOpcUaHistoryEvent &operator=(const QOpcUaHistoryEvent &other)
bool operator!=(const QOpcUaHistoryEvent &lhs, const QOpcUaHistoryEvent &rhs)
bool operator==(const QOpcUaHistoryEvent &lhs, const QOpcUaHistoryEvent &rhs)

Descripción detallada

Cuando se gestiona una petición de lectura de eventos históricos, se utilizan instancias de esta clase para almacenar información sobre qué nodo se ha leído, sus eventos y el código de estado. La señal de finalización de una respuesta de lectura de histórico devolverá una lista de objetos QOpcUaHistoryEvent que pueden ser analizados para revisar los resultados de la petición.

Documentación de las funciones miembro

QOpcUaHistoryEvent::QOpcUaHistoryEvent()

Construye un ítem de evento histórico inválido.

[explicit] QOpcUaHistoryEvent::QOpcUaHistoryEvent(const QString &nodeId)

Construye un elemento de evento histórico y almacena a qué nodo corresponde.

QOpcUaHistoryEvent::QOpcUaHistoryEvent(const QOpcUaHistoryEvent &other)

Construye un elemento de evento histórico a partir de other.

[constexpr noexcept] QOpcUaHistoryEvent::QOpcUaHistoryEvent(QOpcUaHistoryEvent &&other)

Mover-construye un nuevo objeto de evento histórico a partir de other.

Nota: El objeto movido-desde other se coloca en un estado parcialmente formado, en el que las únicas operaciones válidas son la destrucción y la asignación de un nuevo valor.

[noexcept] QOpcUaHistoryEvent::~QOpcUaHistoryEvent()

Destruye el elemento de evento histórico.

void QOpcUaHistoryEvent::addEvent(const QVariantList &value)

Añade una lista de campos de eventos dada por value.

int QOpcUaHistoryEvent::count() const

Devuelve el número de eventos disponibles.

QList<QVariantList> QOpcUaHistoryEvent::events() const

Devuelve la lista de objetos QVariantList que contienen los resultados de la solicitud de lectura del historial.

QString QOpcUaHistoryEvent::nodeId() const

Devuelve el nodeId del nodo cuyos eventos han sido almacenados.

Véase también setNodeId().

void QOpcUaHistoryEvent::setNodeId(const QString &nodeId)

Establece nodeId en nodeId.

Véase también nodeId().

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

Establece el código de estado en statusCode.

Véase también statusCode().

QOpcUa::UaStatusCode QOpcUaHistoryEvent::statusCode() const

Devuelve el código de estado que indica si se ha producido un error al obtener los eventos del historial.

Véase también setStatusCode().

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

Intercambia el objeto de evento histórico other con este objeto de evento histórico. Esta operación es muy rápida y nunca falla.

[noexcept] QOpcUaHistoryEvent &QOpcUaHistoryEvent::operator=(QOpcUaHistoryEvent &&other)

Mover-asigna other a esta instancia QOpcUaHistoryEvent.

Nota: El objeto movido-desde other se coloca en un estado parcialmente formado, en el que las únicas operaciones válidas son la destrucción y la asignación de un nuevo valor.

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

Establece los valores de other en este elemento de evento histórico.

Relacionados No miembros

[noexcept] bool operator!=(const QOpcUaHistoryEvent &lhs, const QOpcUaHistoryEvent &rhs)

Devuelve true si lhs no es igual a rhs.

[noexcept] bool operator==(const QOpcUaHistoryEvent &lhs, const QOpcUaHistoryEvent &rhs)

Devuelve true si rhs y lhs contienen los mismos valores.

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