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.
Constructs an invalid history data item.
[explicit]
QOpcUaHistoryData::
QOpcUaHistoryData
(const
QString
&
nodeId
)
Constructs a history data item and stores which node it corresponds to.
Constructs a history data item from other .
[noexcept]
QOpcUaHistoryData::
~QOpcUaHistoryData
()
Destroys the history data item.
Adds a data value object given by value .
Returns the number of available data value objects.
Returns the nodeId of the node whose data has been stored.
另请参阅 setNodeId ().
Returns the list of data value objects which contain the results of the history read request.
设置 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 data.
另请参阅 setStatusCode ().
[noexcept]
void
QOpcUaHistoryData::
swap
(
QOpcUaHistoryData
&
other
)
Swaps this data value instance with other 。此函数非常快且从不失败。
设置值从 other in this history data item.