QOpcUaHistoryEvent Class

This class stores historical events from a node. More...

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

Public Functions

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)

Detailed Description

When a request to read history events is being handled, instances of this class are used to store information about which node has been read, its events and the status code. The finished signal of a history read response will return a list of QOpcUaHistoryEvent objects which can be parsed to review the results of the request.

Member Function Documentation

QOpcUaHistoryEvent::QOpcUaHistoryEvent()

Constructs an invalid history event item.

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

Constructs a history event item and stores which node it corresponds to.

QOpcUaHistoryEvent::QOpcUaHistoryEvent(const QOpcUaHistoryEvent &other)

Constructs a history event item from other.

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

Move-constructs a new history event object from other.

Note: The moved-from object other is placed in a partially-formed state, in which the only valid operations are destruction and assignment of a new value.

[noexcept] QOpcUaHistoryEvent::~QOpcUaHistoryEvent()

Destroys the history event item.

void QOpcUaHistoryEvent::addEvent(const QVariantList &value)

Adds an event field list given by value.

int QOpcUaHistoryEvent::count() const

Returns the number of available events.

QList<QVariantList> QOpcUaHistoryEvent::events() const

Returns the list of QVariantList objects which contain the results of the history read request.

QString QOpcUaHistoryEvent::nodeId() const

Returns the nodeId of the node whose events have been stored.

See also setNodeId().

void QOpcUaHistoryEvent::setNodeId(const QString &nodeId)

Sets the nodeId to nodeId.

See also nodeId().

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

Sets the status code to statusCode.

See also statusCode().

QOpcUa::UaStatusCode QOpcUaHistoryEvent::statusCode() const

Returns the status code which indicates if an error occurred while fetching the history events.

See also setStatusCode().

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

Swaps history event object other with this history event object. This operation is very fast and never fails.

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

Move-assigns other to this QOpcUaHistoryEvent instance.

Note: The moved-from object other is placed in a partially-formed state, in which the only valid operations are destruction and assignment of a new value.

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

Sets the values from other in this history event item.

Related Non-Members

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

Returns true if lhs is not equal to rhs.

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

Returns true if rhs and lhs contain the same values.

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