1// Copyright (C) 2021 basysKom GmbH, opensource@basyskom.com
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QOPCUAHISTORYREADRESPONSE_H
5#define QOPCUAHISTORYREADRESPONSE_H
6
7#include <QtOpcUa/qopcuahistorydata.h>
8#include <QtOpcUa/qopcuaglobal.h>
9
10#include <QtOpcUa/qopcuahistoryreadrawrequest.h>
11
12#include <QtCore/qpointer.h>
13
14QT_BEGIN_NAMESPACE
15
16class QOpcUaHistoryReadResponseImpl;
17
18class QOpcUaHistoryReadResponsePrivate;
19
20class Q_OPCUA_EXPORT QOpcUaHistoryReadResponse : public QObject {
21 Q_OBJECT
22 Q_DECLARE_PRIVATE(QOpcUaHistoryReadResponse)
23public:
24 explicit QOpcUaHistoryReadResponse(QOpcUaHistoryReadResponseImpl *impl);
25 ~QOpcUaHistoryReadResponse();
26
27 enum class State : quint32 {
28 Unknown,
29 Reading,
30 Finished,
31 MoreDataAvailable,
32 Error
33 };
34 Q_ENUM(State)
35
36 bool hasMoreData() const;
37 bool readMoreData();
38 State state() const;
39
40 bool releaseContinuationPoints();
41
42 QList<QOpcUaHistoryData> data() const;
43 QOpcUa::UaStatusCode serviceResult() const;
44
45Q_SIGNALS:
46 void readHistoryDataFinished(const QList<QOpcUaHistoryData> &results, QOpcUa::UaStatusCode serviceResult);
47 void stateChanged(State state);
48};
49
50QT_END_NAMESPACE
51
52#endif // QOPCUAHISTORYREADRESPONSE_H
53

source code of qtopcua/src/opcua/client/qopcuahistoryreadresponse.h