blob: 7e8e72b3e49e00425b25e66422de7c81f6768a43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
// Copyright (C) 2015 basysKom GmbH, opensource@basyskom.com
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QOPCUASIMPLEATTRIBUTEOPERAND_H
#define QOPCUASIMPLEATTRIBUTEOPERAND_H
#include <QtOpcUa/qopcuatype.h>
#include <QtCore/qshareddata.h>
#include <QtCore/qlist.h>
QT_BEGIN_NAMESPACE
class QOpcUaQualifiedName;
// OPC UA 1.05 part 4, 7.7.4.5
class QOpcUaSimpleAttributeOperandData;
class Q_OPCUA_EXPORT QOpcUaSimpleAttributeOperand
{
public:
QOpcUaSimpleAttributeOperand();
QOpcUaSimpleAttributeOperand(const QOpcUaSimpleAttributeOperand &);
QOpcUaSimpleAttributeOperand(const QString &name, quint16 namespaceIndex = 0,
const QString &typeId = QStringLiteral("ns=0;i=2041"), // BaseEventType
QOpcUa::NodeAttribute attributeId = QOpcUa::NodeAttribute::Value);
QOpcUaSimpleAttributeOperand(QOpcUa::NodeAttribute attributeId,
const QString &typeId = QStringLiteral("ns=0;i=2041")); // BaseEventType
QOpcUaSimpleAttributeOperand &operator=(const QOpcUaSimpleAttributeOperand &);
#if QT_OPCUA_REMOVED_SINCE(6, 7)
bool operator==(const QOpcUaSimpleAttributeOperand &rhs) const;
#endif
operator QVariant() const;
~QOpcUaSimpleAttributeOperand();
QString typeId() const;
void setTypeId(const QString &typeId);
QList<QOpcUaQualifiedName> browsePath() const;
QList<QOpcUaQualifiedName> &browsePathRef();
void setBrowsePath(const QList<QOpcUaQualifiedName> &browsePath);
QOpcUa::NodeAttribute attributeId() const;
void setAttributeId(QOpcUa::NodeAttribute attributeId);
QString indexRange() const;
void setIndexRange(const QString &indexRange);
private:
QSharedDataPointer<QOpcUaSimpleAttributeOperandData> data;
friend Q_OPCUA_EXPORT bool comparesEqual(const QOpcUaSimpleAttributeOperand &lhs,
const QOpcUaSimpleAttributeOperand &rhs) noexcept;
friend bool operator==(const QOpcUaSimpleAttributeOperand &lhs,
const QOpcUaSimpleAttributeOperand &rhs) noexcept
{ return comparesEqual(lhs, rhs); }
friend bool operator!=(const QOpcUaSimpleAttributeOperand &lhs,
const QOpcUaSimpleAttributeOperand &rhs) noexcept
{ return !comparesEqual(lhs, rhs); }
};
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QOpcUaSimpleAttributeOperand)
#endif // QOPCUASIMPLEATTRIBUTEOPERAND_H
|