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 QOPCUADATAVALUE_H |
5 | #define QOPCUADATAVALUE_H |
6 | |
7 | #include <QtOpcUa/qopcuatype.h> |
8 | |
9 | #include <QtCore/qdatetime.h> |
10 | |
11 | QT_BEGIN_NAMESPACE |
12 | |
13 | class QOpcUaDataValueData; |
14 | class Q_OPCUA_EXPORT QOpcUaDataValue |
15 | { |
16 | public: |
17 | QOpcUaDataValue(); |
18 | QOpcUaDataValue(const QOpcUaDataValue &other); |
19 | QOpcUaDataValue &operator=(const QOpcUaDataValue &other); |
20 | ~QOpcUaDataValue(); |
21 | |
22 | void swap(QOpcUaDataValue &other) noexcept |
23 | { data.swap(other&: other.data); } |
24 | |
25 | QDateTime serverTimestamp() const; |
26 | void setServerTimestamp(const QDateTime &serverTimestamp); |
27 | |
28 | QDateTime sourceTimestamp() const; |
29 | void setSourceTimestamp(const QDateTime &sourceTimestamp); |
30 | |
31 | QOpcUa::UaStatusCode statusCode() const; |
32 | void setStatusCode(QOpcUa::UaStatusCode statusCode); |
33 | |
34 | QVariant value() const; |
35 | void setValue(const QVariant &value); |
36 | |
37 | private: |
38 | QExplicitlySharedDataPointer<QOpcUaDataValueData> data; |
39 | }; |
40 | |
41 | Q_DECLARE_SHARED(QOpcUaDataValue) |
42 | |
43 | QT_END_NAMESPACE |
44 | |
45 | Q_DECLARE_METATYPE(QOpcUaDataValue) |
46 | |
47 | #endif // QOPCUADATAVALUE_H |
48 |