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.
Constructs an invalid history event item.
[explicit]
QOpcUaHistoryEvent::
QOpcUaHistoryEvent
(const
QString
&
nodeId
)
Constructs a history event item and stores which node it corresponds to.
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.
Adds an event field list given by value .
Returns the number of available events.
Returns the list of QVariantList objects which contain the results of the history read request.
Returns the nodeId of the node whose events have been stored.
另请参阅 setNodeId ().
设置 nodeId to nodeId .
另请参阅 nodeId ().
Sets the status code to statusCode .
另请参阅 statusCode ().
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.
设置值从 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.