QSimpleAttributeOperand Class

(QOpcUa::QSimpleAttributeOperand)

The OPC UA SimpleAttributeOperand type. More...

Header: #include <QtOpcUa/qopcuatype.h>
qmake: QT += opcua

Public Functions

QSimpleAttributeOperand()
QSimpleAttributeOperand(const QOpcUa::QSimpleAttributeOperand &rhs)
QSimpleAttributeOperand(const QString &name, quint16 namespaceIndex = 0, const QString &typeId = QStringLiteral("ns=0;i=2041"), QOpcUa::NodeAttribute attributeId = QOpcUa::NodeAttribute::Value)
QSimpleAttributeOperand(QOpcUa::NodeAttribute attributeId, const QString &typeId = QStringLiteral("ns=0;i=2041"))
~QSimpleAttributeOperand()
QOpcUa::NodeAttribute attributeId() const
QVector<QOpcUa::QQualifiedName> browsePath() const
QVector<QOpcUa::QQualifiedName> &browsePathRef()
QString indexRange() const
void setAttributeId(QOpcUa::NodeAttribute attributeId)
void setBrowsePath(const QVector<QOpcUa::QQualifiedName> &browsePath)
void setIndexRange(const QString &indexRange)
void setTypeId(const QString &typeId)
QString typeId() const
QVariant operator QVariant() const
QOpcUa::QSimpleAttributeOperand &operator=(const QOpcUa::QSimpleAttributeOperand &rhs)
bool operator==(const QOpcUa::QSimpleAttributeOperand &rhs) const

Detailed Description

The OPC UA SimpleAttributeOperand type.

The SimpleAttributeOperand is specified in OPC-UA part 4, 7.4.4.5. It is used when a node attribute is required as operand.

For example, the following simple attribute operand represents the value of the "Severity" field of the base event type:

QOpcUa::QSimpleAttributeOperand("Severity");

Member Function Documentation

QSimpleAttributeOperand::QSimpleAttributeOperand()

Default constructs an instance of QSimpleAttributeOperand.

QSimpleAttributeOperand::QSimpleAttributeOperand(const QOpcUa::QSimpleAttributeOperand &rhs)

Constructs a simple attribute operand from rhs.

QSimpleAttributeOperand::QSimpleAttributeOperand(const QString &name, quint16 namespaceIndex = 0, const QString &typeId = QStringLiteral("ns=0;i=2041"), QOpcUa::NodeAttribute attributeId = QOpcUa::NodeAttribute::Value)

Constructs a simple attribute operand for attribute attributeId of the direct child with the browse name name in namespace namespaceIndex. typeId is the node id of a type definition node. The operand will be restricted to instances of type typeId or a subtype.

QSimpleAttributeOperand::QSimpleAttributeOperand(QOpcUa::NodeAttribute attributeId, const QString &typeId = QStringLiteral("ns=0;i=2041"))

Constructs a simple attribute operand for the attribute attributeId of an object or variable of type typeId. This can be used for requesting the ConditionId in an event filter as described in OPC-UA part 9, Table 8.

QSimpleAttributeOperand::~QSimpleAttributeOperand()

Destroys the instance of QSimpleAttributeOperand.

QOpcUa::NodeAttribute QSimpleAttributeOperand::attributeId() const

Returns the attribute of the node browsePath is pointing to.

See also setAttributeId().

QVector<QOpcUa::QQualifiedName> QSimpleAttributeOperand::browsePath() const

Returns the relative path to a node starting from typeId.

See also setBrowsePath().

QVector<QOpcUa::QQualifiedName> &QSimpleAttributeOperand::browsePathRef()

Returns a reference to the browse path.

See also browsePath().

QString QSimpleAttributeOperand::indexRange() const

Returns the index range string.

See also setIndexRange().

void QSimpleAttributeOperand::setAttributeId(QOpcUa::NodeAttribute attributeId)

Sets the attribute id to attributeId.

See also attributeId().

void QSimpleAttributeOperand::setBrowsePath(const QVector<QOpcUa::QQualifiedName> &browsePath)

Sets the browse path to the node holding the attribute to browsePath.

See also browsePath().

void QSimpleAttributeOperand::setIndexRange(const QString &indexRange)

Sets the index range string used to identify a single value or subset of the attribute's value to indexRange.

See also indexRange().

void QSimpleAttributeOperand::setTypeId(const QString &typeId)

Sets the node id of the type definition node to typeId. The operand will be of the type or one of its subtypes.

See also typeId().

QString QSimpleAttributeOperand::typeId() const

Returns the node id of a type definition node.

See also setTypeId().

QVariant QSimpleAttributeOperand::operator QVariant() const

Converts this simple attribute operand to QVariant.

QOpcUa::QSimpleAttributeOperand &QSimpleAttributeOperand::operator=(const QOpcUa::QSimpleAttributeOperand &rhs)

Sets the values from rhs in this simple attribute operand.

bool QSimpleAttributeOperand::operator==(const QOpcUa::QSimpleAttributeOperand &rhs) const

Returns true if this simple attribute operand has the same value as rhs.

© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.