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 | |
11 | QT_BEGIN_NAMESPACE |
12 | |
13 | class QOpcUaWriteItemData; |
14 | class Q_OPCUA_EXPORT QOpcUaWriteItem |
15 | { |
16 | public: |
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 | |
50 | private: |
51 | QSharedDataPointer<QOpcUaWriteItemData> data; |
52 | }; |
53 | |
54 | QT_END_NAMESPACE |
55 | |
56 | Q_DECLARE_METATYPE(QOpcUaWriteItem) |
57 | |
58 | #endif // QOPCUAWRITEITEM_H |
59 |