QOpcUaHistoryReadResponse Class

This class is used for requesting historical data and storing the results. 更多...

頭: #include <QOpcUaHistoryReadResponse>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua
Since: Qt 6.3
繼承: QObject

公共類型

枚舉類 State { Unknown, Reading, Finished, MoreDataAvailable, Error }

公共函數

virtual ~QOpcUaHistoryReadResponse ()
QList<QOpcUaHistoryData> data () const
(從 6.7 起) QList<QOpcUaHistoryEvent> events () const
bool hasMoreData () const
bool readMoreData ()
bool releaseContinuationPoints ()
QOpcUa::UaStatusCode serviceResult () const
QOpcUaHistoryReadResponse::State state () const

信號

void readHistoryDataFinished (const QList<QOpcUaHistoryData> & results , QOpcUa::UaStatusCode serviceResult )
(從 6.7 起) void readHistoryEventsFinished (const QList<QOpcUaHistoryEvent> & results , QOpcUa::UaStatusCode serviceResult )
void stateChanged (QOpcUaHistoryReadResponse::State state )

詳細描述

A historical data request to an OPC UA server can be specified by a QOpcUaHistoryReadRawRequest or QOpcUaHistoryReadEventRequest .

Objects of this class and the statuscode of the request are returned in the QOpcUaHistoryReadResponse::readHistoryDataFinished (const QList<QOpcUaHistoryData> &results, QOpcUa::UaStatusCode serviceResult) or QOpcUaHistoryReadResponse::readHistoryEventsFinished (const QList<QOpcUaHistoryEvent> &results, QOpcUa::UaStatusCode serviceResult) signal depending on the request type and contain the result of a request.

成員類型文檔編製

enum class QOpcUaHistoryReadResponse:: State

This enum specifies the state the response is in.

常量
QOpcUaHistoryReadResponse::State::Unknown 0
QOpcUaHistoryReadResponse::State::Reading 1
QOpcUaHistoryReadResponse::State::Finished 2
QOpcUaHistoryReadResponse::State::MoreDataAvailable 3
QOpcUaHistoryReadResponse::State::Error 4

成員函數文檔編製

[virtual noexcept] QOpcUaHistoryReadResponse:: ~QOpcUaHistoryReadResponse ()

The destructor for QOpcUaHistoryReadResponse

QList < QOpcUaHistoryData > QOpcUaHistoryReadResponse:: data () const

Returns a list which contains the requested historic data.

[since 6.7] QList < QOpcUaHistoryEvent > QOpcUaHistoryReadResponse:: events () const

Returns a list of QOpcUaHistoryEvent containing a list of events for every node to read in the request.

該函數在 Qt 6.7 引入。

bool QOpcUaHistoryReadResponse:: hasMoreData () const

返迴 true if there are more values available from the historic data request.

[signal] void QOpcUaHistoryReadResponse:: readHistoryDataFinished (const QList < QOpcUaHistoryData > & results , QOpcUa::UaStatusCode serviceResult )

This signal is emitted when a historical data request is finished. It adds to results 並設置 serviceResult to indicate the state of the result.

另請參閱 data () 和 serviceResult ().

[signal, since 6.7] void QOpcUaHistoryReadResponse:: readHistoryEventsFinished (const QList < QOpcUaHistoryEvent > & results , QOpcUa::UaStatusCode serviceResult )

This signal is emitted when a historical event request is finished. The new history data and any previous data is returned in results and serviceResult indicates the state of the result.

該函數在 Qt 6.7 引入。

另請參閱 events () 和 serviceResult ().

bool QOpcUaHistoryReadResponse:: readMoreData ()

返迴 true if a read request for more historic values is successfully dispatched.

bool QOpcUaHistoryReadResponse:: releaseContinuationPoints ()

Releases the continuation points and sets the request as finished. Returns true if the pending request has been successfully finished; otherwise returns false.

QOpcUa::UaStatusCode QOpcUaHistoryReadResponse:: serviceResult () const

Returns the serviceresult of the historic data request.

QOpcUaHistoryReadResponse::State QOpcUaHistoryReadResponse:: state () const

Returns the current state of historic data request.

[signal] void QOpcUaHistoryReadResponse:: stateChanged ( QOpcUaHistoryReadResponse::State state )

This signal is emitted when the of a historical data request is changed. It sets state to indicate the state of the change.