1// Copyright (C) 2018 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 QOPCUAWRITEITEM_H
5#define QOPCUAWRITEITEM_H
6
7#include <QtOpcUa/qopcuatype.h>
8
9#include <QtCore/qdatetime.h>
10
11QT_BEGIN_NAMESPACE
12
13class QOpcUaWriteItemData;
14class Q_OPCUA_EXPORT QOpcUaWriteItem
15{
16public:
17 QOpcUaWriteItem();
18 QOpcUaWriteItem(const QOpcUaWriteItem &other);
19 QOpcUaWriteItem(const QString &nodeId, QOpcUa::NodeAttribute attribute, const QVariant &value,
20 QOpcUa::Types type = QOpcUa::Types::Undefined, const QString &indexRange = QString());
21 QOpcUaWriteItem &operator=(const QOpcUaWriteItem &rhs);
22 ~QOpcUaWriteItem();
23
24 QString nodeId() const;
25 void setNodeId(const QString &nodeId);
26
27 QOpcUa::NodeAttribute attribute() const;
28 void setAttribute(QOpcUa::NodeAttribute attribute);
29
30 QString indexRange() const;
31 void setIndexRange(const QString &indexRange);
32
33 QVariant value() const;
34 void setValue(const QVariant &value);
35 void setValue(const QVariant &value, QOpcUa::Types type);
36
37 QOpcUa::Types type() const;
38 void setType(QOpcUa::Types type);
39
40 QDateTime sourceTimestamp() const;
41 void setSourceTimestamp(const QDateTime &sourceTimestamp);
42
43 QDateTime serverTimestamp() const;
44 void setServerTimestamp(const QDateTime &serverTimestamp);
45
46 QOpcUa::UaStatusCode statusCode() const;
47 bool hasStatusCode() const;
48 void setStatusCode(QOpcUa::UaStatusCode statusCode);
49
50private:
51 QSharedDataPointer<QOpcUaWriteItemData> data;
52};
53
54QT_END_NAMESPACE
55
56Q_DECLARE_METATYPE(QOpcUaWriteItem)
57
58#endif // QOPCUAWRITEITEM_H
59

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