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/qopcuahistoryevent.h>
9#include <QtOpcUa/qopcuaglobal.h>
10
11#include <QtOpcUa/qopcuahistoryreadrawrequest.h>
12
13#include <QtCore/qpointer.h>
14
15QT_BEGIN_NAMESPACE
16
17class QOpcUaHistoryReadResponseImpl;
18
19class QOpcUaHistoryReadResponsePrivate;
20
21class Q_OPCUA_EXPORT QOpcUaHistoryReadResponse : public QObject {
22 Q_OBJECT
23 Q_DECLARE_PRIVATE(QOpcUaHistoryReadResponse)
24public:
25 explicit QOpcUaHistoryReadResponse(QOpcUaHistoryReadResponseImpl *impl);
26 ~QOpcUaHistoryReadResponse();
27
28 enum class State : quint32 {
29 Unknown,
30 Reading,
31 Finished,
32 MoreDataAvailable,
33 Error,
34 };
35 Q_ENUM(State)
36
37 bool hasMoreData() const;
38 bool readMoreData();
39 State state() const;
40
41 bool releaseContinuationPoints();
42
43 QList<QOpcUaHistoryData> data() const;
44 QList<QOpcUaHistoryEvent> events() const;
45 QOpcUa::UaStatusCode serviceResult() const;
46
47Q_SIGNALS:
48 void readHistoryDataFinished(const QList<QOpcUaHistoryData> &results, QOpcUa::UaStatusCode serviceResult);
49 void readHistoryEventsFinished(const QList<QOpcUaHistoryEvent> &results, QOpcUa::UaStatusCode serviceResult);
50 void stateChanged(State state);
51};
52
53QT_END_NAMESPACE
54
55#endif // QOPCUAHISTORYREADRESPONSE_H
56

Provided by KDAB

Privacy Policy
Start learning QML with our Intro Training
Find out more

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