QOpcUaHistoryEvent Class
Esta clase almacena los eventos históricos de un nodo. Más información...
| Encabezado: | #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) |
Elementos no miembros relacionados
| bool | operator!=(const QOpcUaHistoryEvent &lhs, const QOpcUaHistoryEvent &rhs) |
| bool | operator==(const QOpcUaHistoryEvent &lhs, const QOpcUaHistoryEvent &rhs) |
Descripción detallada
Cuando se gestiona una solicitud para leer eventos del historial, 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 «finished» de una respuesta de lectura del historial devolverá una lista de objetos QOpcUaHistoryEvent que se pueden analizar para revisar los resultados de la solicitud.
Documentación de las funciones de miembro
QOpcUaHistoryEvent::QOpcUaHistoryEvent()
Crea un elemento de historial no válido.
[explicit] QOpcUaHistoryEvent::QOpcUaHistoryEvent(const QString &nodeId)
Crea una entrada de evento del historial y almacena a qué nodo corresponde.
QOpcUaHistoryEvent::QOpcUaHistoryEvent(const QOpcUaHistoryEvent &other)
Crea una entrada de evento histórico a partir de other.
[constexpr noexcept default] QOpcUaHistoryEvent::QOpcUaHistoryEvent(QOpcUaHistoryEvent &&other)
La función «Move» crea un nuevo objeto de evento histórico a partir de other.
Nota: El objeto del que se ha extraído, other, queda 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()
Elimina el elemento de evento del historial.
void QOpcUaHistoryEvent::addEvent(const QVariantList &value)
Añade una lista de campos de eventos proporcionada 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 se han almacenado.
Véase también setNodeId().
void QOpcUaHistoryEvent::setNodeId(const QString &nodeId)
Establece el valor de « 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 recuperar los eventos del historial.
Véase también setStatusCode().
[noexcept] void QOpcUaHistoryEvent::swap(QOpcUaHistoryEvent &other)
Intercambia el objeto de evento de historial other por este objeto de evento de historial. Esta operación es muy rápida y nunca falla.
[noexcept] QOpcUaHistoryEvent &QOpcUaHistoryEvent::operator=(QOpcUaHistoryEvent &&other)
La operación «Move-assigns» asigna other a esta instancia de QOpcUaHistoryEvent.
Nota: El objeto del que se ha realizado el traslado, other, pasa a 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 del historial.
No miembros relacionados
[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.