1// Copyright (C) 2015 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 QOPCUAATTRIBUTEOPERAND_H
5#define QOPCUAATTRIBUTEOPERAND_H
6
7#include <QtOpcUa/qopcuaglobal.h>
8#include <QtOpcUa/qopcuatype.h>
9
10#include <QtCore/qshareddata.h>
11
12QT_BEGIN_NAMESPACE
13
14class QOpcUaRelativePathElement;
15
16class QVariant;
17class QOpcUaRelativePathElement;
18
19// OPC UA 1.05 part 4, 7.7.4.4
20class QOpcUaAttributeOperandData;
21class Q_OPCUA_EXPORT QOpcUaAttributeOperand
22{
23public:
24 QOpcUaAttributeOperand();
25 QOpcUaAttributeOperand(const QOpcUaAttributeOperand &);
26 QOpcUaAttributeOperand &operator=(const QOpcUaAttributeOperand &);
27 operator QVariant() const;
28 ~QOpcUaAttributeOperand();
29
30 QString nodeId() const;
31 void setNodeId(const QString &nodeId);
32
33 QString alias() const;
34 void setAlias(const QString &alias);
35
36 QList<QOpcUaRelativePathElement> browsePath() const;
37 QList<QOpcUaRelativePathElement> &browsePathRef();
38 void setBrowsePath(const QList<QOpcUaRelativePathElement> &browsePath);
39
40 QOpcUa::NodeAttribute attributeId() const;
41 void setAttributeId(QOpcUa::NodeAttribute attributeId);
42
43 QString indexRange() const;
44 void setIndexRange(const QString &indexRange);
45
46private:
47 friend Q_OPCUA_EXPORT bool comparesEqual(const QOpcUaAttributeOperand &lhs,
48 const QOpcUaAttributeOperand &rhs) noexcept;
49 friend bool operator==(const QOpcUaAttributeOperand &lhs,
50 const QOpcUaAttributeOperand &rhs) noexcept
51 { return comparesEqual(lhs, rhs); }
52 friend bool operator!=(const QOpcUaAttributeOperand &lhs,
53 const QOpcUaAttributeOperand &rhs) noexcept
54 {
55 return !(lhs == rhs);
56 }
57
58 QSharedDataPointer<QOpcUaAttributeOperandData> data;
59};
60
61QT_END_NAMESPACE
62
63Q_DECLARE_METATYPE(QOpcUaAttributeOperand)
64
65#endif // QOPCUAATTRIBUTEOPERAND_H
66

Provided by KDAB

Privacy Policy
Learn Advanced QML with KDAB
Find out more

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