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 QHISTORYREADRAWREQUEST_H |
5 | #define QHISTORYREADRAWREQUEST_H |
6 | |
7 | #include <QtCore/qobject.h> |
8 | #include <QtCore/qdatetime.h> |
9 | #include <QtCore/qshareddata.h> |
10 | |
11 | #include <QtOpcUa/qopcuareaditem.h> |
12 | #include <QtOpcUa/qopcuahistorydata.h> |
13 | |
14 | #include <QtOpcUa/qopcuaglobal.h> |
15 | |
16 | QT_BEGIN_NAMESPACE |
17 | |
18 | class QOpcUaHistoryReadRawRequestData; |
19 | class Q_OPCUA_EXPORT QOpcUaHistoryReadRawRequest |
20 | { |
21 | public: |
22 | QOpcUaHistoryReadRawRequest(); |
23 | explicit QOpcUaHistoryReadRawRequest(const QList<QOpcUaReadItem> &nodesToRead, |
24 | const QDateTime &startTimestamp, |
25 | const QDateTime &endTimestamp, |
26 | quint32 numValuesPerNode = 0, |
27 | bool returnBounds = false); |
28 | |
29 | QOpcUaHistoryReadRawRequest(const QOpcUaHistoryReadRawRequest &other); |
30 | ~QOpcUaHistoryReadRawRequest(); |
31 | |
32 | void swap(QOpcUaHistoryReadRawRequest &other) noexcept |
33 | { data.swap(other&: other.data); } |
34 | |
35 | QDateTime startTimestamp() const; |
36 | void setStartTimestamp(const QDateTime &startTimestamp); |
37 | |
38 | QDateTime endTimestamp() const; |
39 | void setEndTimestamp(const QDateTime &endTimestamp); |
40 | |
41 | quint32 numValuesPerNode() const; |
42 | void setNumValuesPerNode(quint32 numValuesPerNode); |
43 | |
44 | bool returnBounds() const; |
45 | void setReturnBounds(bool returnBounds); |
46 | |
47 | QList<QOpcUaReadItem> nodesToRead() const; |
48 | void setNodesToRead(const QList<QOpcUaReadItem> &nodesToRead); |
49 | |
50 | void addNodeToRead(const QOpcUaReadItem &nodeToRead); |
51 | |
52 | QOpcUaHistoryReadRawRequest &operator=(const QOpcUaHistoryReadRawRequest &other); |
53 | |
54 | private: |
55 | QSharedDataPointer<QOpcUaHistoryReadRawRequestData> data; |
56 | |
57 | friend Q_OPCUA_EXPORT bool operator==(const QOpcUaHistoryReadRawRequest &lhs, |
58 | const QOpcUaHistoryReadRawRequest &rhs) noexcept; |
59 | friend inline bool operator!=(const QOpcUaHistoryReadRawRequest &lhs, |
60 | const QOpcUaHistoryReadRawRequest &rhs) noexcept |
61 | { |
62 | return !(lhs == rhs); |
63 | } |
64 | }; |
65 | |
66 | Q_DECLARE_SHARED(QOpcUaHistoryReadRawRequest) |
67 | |
68 | QT_END_NAMESPACE |
69 | |
70 | Q_DECLARE_METATYPE(QOpcUaHistoryReadRawRequest) |
71 | |
72 | #endif // QHISTORYREADRAWREQUEST_H |
73 |