QOpcUaSimpleAttributeOperand Class

OPC UA SimpleAttributeOperand 类型。 更多...

头: #include <QOpcUaSimpleAttributeOperand>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua

公共函数

QOpcUaSimpleAttributeOperand ()
QOpcUaSimpleAttributeOperand (const QString & name , quint16 namespaceIndex = 0, const QString & typeId = QStringLiteral("ns=0;i=2041"), QOpcUa::NodeAttribute attributeId = QOpcUa::NodeAttribute::Value)
QOpcUaSimpleAttributeOperand (QOpcUa::NodeAttribute attributeId , const QString & typeId = QStringLiteral("ns=0;i=2041"))
QOpcUaSimpleAttributeOperand (const QOpcUaSimpleAttributeOperand & rhs )
QOpcUa::NodeAttribute attributeId () const
QList<QOpcUaQualifiedName> browsePath () const
QList<QOpcUaQualifiedName> & browsePathRef ()
QString indexRange () const
void setAttributeId (QOpcUa::NodeAttribute attributeId )
void setBrowsePath (const QList<QOpcUaQualifiedName> & browsePath )
void setIndexRange (const QString & indexRange )
void setTypeId (const QString & typeId )
QString typeId () const
QVariant operator QVariant () const
QOpcUaSimpleAttributeOperand & operator= (const QOpcUaSimpleAttributeOperand & rhs )
(从 6.7 起) bool operator!= (const QOpcUaSimpleAttributeOperand & lhs , const QOpcUaSimpleAttributeOperand & rhs )
bool operator== (const QOpcUaSimpleAttributeOperand & lhs , const QOpcUaSimpleAttributeOperand & rhs )

详细描述

The SimpleAttributeOperand is specified in OPC UA 1.05 part 4, 7.7.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:

QOpcUaSimpleAttributeOperand("Severity");
					

成员函数文档编制

QOpcUaSimpleAttributeOperand:: QOpcUaSimpleAttributeOperand ()

Default constructs a simple attribute operand with no parameters set.

QOpcUaSimpleAttributeOperand:: QOpcUaSimpleAttributeOperand (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.

QOpcUaSimpleAttributeOperand:: QOpcUaSimpleAttributeOperand ( 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 1.05 part 9, 5.5.2.

QOpcUaSimpleAttributeOperand:: QOpcUaSimpleAttributeOperand (const QOpcUaSimpleAttributeOperand & rhs )

Constructs a simple attribute operand from rhs .

QOpcUa::NodeAttribute QOpcUaSimpleAttributeOperand:: attributeId () const

Returns the attribute of the node browsePath is pointing to.

另请参阅 setAttributeId ().

QList < QOpcUaQualifiedName > QOpcUaSimpleAttributeOperand:: browsePath () const

Returns the relative path to a node starting from typeId .

另请参阅 setBrowsePath ().

QList < QOpcUaQualifiedName > &QOpcUaSimpleAttributeOperand:: browsePathRef ()

Returns a reference to the browse path.

另请参阅 browsePath ().

QString QOpcUaSimpleAttributeOperand:: indexRange () const

Returns the index range string.

另请参阅 setIndexRange ().

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

Sets the attribute id to attributeId .

另请参阅 attributeId ().

void QOpcUaSimpleAttributeOperand:: setBrowsePath (const QList < QOpcUaQualifiedName > & browsePath )

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

另请参阅 browsePath ().

void QOpcUaSimpleAttributeOperand:: setIndexRange (const QString & indexRange )

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

另请参阅 indexRange ().

void QOpcUaSimpleAttributeOperand:: 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.

另请参阅 typeId ().

QString QOpcUaSimpleAttributeOperand:: typeId () const

Returns the node id of a type definition node.

另请参阅 setTypeId ().

QVariant QOpcUaSimpleAttributeOperand:: operator QVariant () const

Converts this simple attribute operand to QVariant .

QOpcUaSimpleAttributeOperand &QOpcUaSimpleAttributeOperand:: operator= (const QOpcUaSimpleAttributeOperand & rhs )

设置值从 rhs in this simple attribute operand.

相关非成员

[noexcept, since 6.7] bool operator!= (const QOpcUaSimpleAttributeOperand & lhs , const QOpcUaSimpleAttributeOperand & rhs )

返回 true if lhs has a different value than rhs .

该函数在 Qt 6.7 引入。

[noexcept] bool operator== (const QOpcUaSimpleAttributeOperand & lhs , const QOpcUaSimpleAttributeOperand & rhs )

返回 true if lhs has the same value as rhs .