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 | |
14 | QT_BEGIN_NAMESPACE |
15 | |
16 | class QOpcUaHistoryReadResponseImpl; |
17 | |
18 | class QOpcUaHistoryReadResponsePrivate; |
19 | |
20 | class Q_OPCUA_EXPORT QOpcUaHistoryReadResponse : public QObject { |
21 | Q_OBJECT |
22 | Q_DECLARE_PRIVATE(QOpcUaHistoryReadResponse) |
23 | public: |
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 | |
45 | Q_SIGNALS: |
46 | void readHistoryDataFinished(const QList<QOpcUaHistoryData> &results, QOpcUa::UaStatusCode serviceResult); |
47 | void stateChanged(State state); |
48 | }; |
49 | |
50 | QT_END_NAMESPACE |
51 | |
52 | #endif // QOPCUAHISTORYREADRESPONSE_H |
53 | |