QOpcUaHistoryReadResponse Class

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

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

Public Types

enum class State { Unknown, Reading, Finished, MoreDataAvailable, Error }

Public Functions

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

Signals

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

Detailed Description

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

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

Member Type Documentation

enum class QOpcUaHistoryReadResponse::State

This enum specifies the state the response is in.

ConstantValue
QOpcUaHistoryReadResponse::State::Unknown0
QOpcUaHistoryReadResponse::State::Reading1
QOpcUaHistoryReadResponse::State::Finished2
QOpcUaHistoryReadResponse::State::MoreDataAvailable3
QOpcUaHistoryReadResponse::State::Error4

Member Function Documentation

[virtual noexcept] QOpcUaHistoryReadResponse::~QOpcUaHistoryReadResponse()

The destructor for QOpcUaHistoryReadResponse

QList<QOpcUaHistoryData> QOpcUaHistoryReadResponse::data() const

Returns a list which contains the requested historic data.

bool QOpcUaHistoryReadResponse::hasMoreData() const

Returns 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 and sets serviceResult to indicate the state of the result.

See also data() and serviceResult().

bool QOpcUaHistoryReadResponse::readMoreData()

Returns 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.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.