QOpcUaHistoryData Class

This class stores historical data values from a node. 更多...

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

公共函数

QOpcUaHistoryData ()
QOpcUaHistoryData (const QString & nodeId )
QOpcUaHistoryData (const QOpcUaHistoryData & other )
~QOpcUaHistoryData ()
void addValue (const QOpcUaDataValue & value )
int count () const
QString nodeId () const
QList<QOpcUaDataValue> result () const
void setNodeId (const QString & nodeId )
void setStatusCode (QOpcUa::UaStatusCode statusCode )
QOpcUa::UaStatusCode statusCode () const
void swap (QOpcUaHistoryData & other )
QOpcUaHistoryData & operator= (const QOpcUaHistoryData & other )

详细描述

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

成员函数文档编制

QOpcUaHistoryData:: QOpcUaHistoryData ()

Constructs an invalid history data item.

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

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

QOpcUaHistoryData:: QOpcUaHistoryData (const QOpcUaHistoryData & other )

Constructs a history data item from other .

[noexcept] QOpcUaHistoryData:: ~QOpcUaHistoryData ()

Destroys the history data item.

void QOpcUaHistoryData:: addValue (const QOpcUaDataValue & value )

Adds a data value object given by value .

int QOpcUaHistoryData:: count () const

Returns the number of available data value objects.

QString QOpcUaHistoryData:: nodeId () const

Returns the nodeId of the node whose data has been stored.

另请参阅 setNodeId ().

QList < QOpcUaDataValue > QOpcUaHistoryData:: result () const

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

void QOpcUaHistoryData:: setNodeId (const QString & nodeId )

设置 nodeId to nodeId .

另请参阅 nodeId ().

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

Sets the status code to statusCode .

另请参阅 statusCode ().

QOpcUa::UaStatusCode QOpcUaHistoryData:: statusCode () const

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

另请参阅 setStatusCode ().

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

Swaps this data value instance with other 。此函数非常快且从不失败。

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

设置值从 other in this history data item.