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
11QT_BEGIN_NAMESPACE
12
13class QOpcUaDataValueData;
14class Q_OPCUA_EXPORT QOpcUaDataValue
15{
16public:
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
37private:
38 QExplicitlySharedDataPointer<QOpcUaDataValueData> data;
39};
40
41Q_DECLARE_SHARED(QOpcUaDataValue)
42
43QT_END_NAMESPACE
44
45Q_DECLARE_METATYPE(QOpcUaDataValue)
46
47#endif // QOPCUADATAVALUE_H
48

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