QOpcUaHistoryEvent Class

This class stores historical events from a node. 更多...

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

公共函数

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= (const QOpcUaHistoryEvent & other )
QOpcUaHistoryEvent & operator= (QOpcUaHistoryEvent && other )
bool operator!= (const QOpcUaHistoryEvent & lhs , const QOpcUaHistoryEvent & rhs )
bool operator== (const QOpcUaHistoryEvent & lhs , const QOpcUaHistoryEvent & rhs )

详细描述

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.

成员函数文档编制

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 .

注意: 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.

另请参阅 setNodeId ().

void QOpcUaHistoryEvent:: setNodeId (const QString & nodeId )

设置 nodeId to nodeId .

另请参阅 nodeId ().

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

Sets the status code to statusCode .

另请参阅 statusCode ().

QOpcUa::UaStatusCode QOpcUaHistoryEvent:: statusCode () const

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

另请参阅 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.

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

设置值从 other in this history event item.

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

移动赋值 other 到此 QOpcUaHistoryEvent 实例。

注意: 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] bool operator!= (const QOpcUaHistoryEvent & lhs , const QOpcUaHistoryEvent & rhs )

返回 true if lhs 不等于 rhs .

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

返回 true if rhs and lhs contain the same values.