1 | // Copyright (C) 2019 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 QOPCUAHISTORYDATA_H |
5 | #define QOPCUAHISTORYDATA_H |
6 | |
7 | #include <QtOpcUa/qopcuatype.h> |
8 | #include <QtOpcUa/qopcuadatavalue.h> |
9 | |
10 | #include <QtOpcUa/qopcuaglobal.h> |
11 | #include <QtCore/qlist.h> |
12 | |
13 | QT_BEGIN_NAMESPACE |
14 | |
15 | class QOpcUaHistoryDataData; |
16 | class Q_OPCUA_EXPORT QOpcUaHistoryData |
17 | { |
18 | public: |
19 | QOpcUaHistoryData(); |
20 | explicit QOpcUaHistoryData(const QString &nodeId); |
21 | QOpcUaHistoryData(const QOpcUaHistoryData &other); |
22 | ~QOpcUaHistoryData(); |
23 | |
24 | void swap(QOpcUaHistoryData &other) noexcept |
25 | { data.swap(other&: other.data); } |
26 | |
27 | QOpcUa::UaStatusCode statusCode() const; |
28 | void setStatusCode(QOpcUa::UaStatusCode statusCode); |
29 | QList<QOpcUaDataValue> result() const; |
30 | int count() const; |
31 | void addValue(const QOpcUaDataValue &value); |
32 | QString nodeId() const; |
33 | void setNodeId(const QString &nodeId); |
34 | |
35 | QOpcUaHistoryData &operator=(const QOpcUaHistoryData &other); |
36 | private: |
37 | QExplicitlySharedDataPointer<QOpcUaHistoryDataData> data; |
38 | }; |
39 | |
40 | Q_DECLARE_SHARED(QOpcUaHistoryData) |
41 | |
42 | QT_END_NAMESPACE |
43 | |
44 | #endif // QOPCUAHISTORYDATA_H |
45 |