本页内容

QOpcUaAttributeOperand Class

OPC UA 的 AttributeOperand 类型。更多内容...

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

公共函数

QOpcUaAttributeOperand()
QOpcUaAttributeOperand(const QOpcUaAttributeOperand &rhs)
QString alias() const
QOpcUa::NodeAttribute attributeId() const
QList<QOpcUaRelativePathElement> browsePath() const
QList<QOpcUaRelativePathElement> &browsePathRef()
QString indexRange() const
QString nodeId() const
void setAlias(const QString &alias)
void setAttributeId(QOpcUa::NodeAttribute attributeId)
void setBrowsePath(const QList<QOpcUaRelativePathElement> &browsePath)
void setIndexRange(const QString &indexRange)
void setNodeId(const QString &nodeId)
operator QVariant() const
QOpcUaAttributeOperand &operator=(const QOpcUaAttributeOperand &rhs)
(since 6.7) bool operator!=(const QOpcUaAttributeOperand &lhs, const QOpcUaAttributeOperand &rhs)
(since 6.7) bool operator==(const QOpcUaAttributeOperand &lhs, const QOpcUaAttributeOperand &rhs)

详细描述

AttributeOperand 在 OPC UA 1.05 第 4 部分 7.7.4.4 中进行了定义。其用途与QOpcUaSimpleAttributeOperand 相同,但具有更多可配置选项。

成员函数文档

QOpcUaAttributeOperand::QOpcUaAttributeOperand()

默认值会构建一个未设置任何参数的属性操作数。

QOpcUaAttributeOperand::QOpcUaAttributeOperand(const QOpcUaAttributeOperand &rhs)

根据rhs 构建一个属性操作数。

QString QOpcUaAttributeOperand::alias() const

返回此 QAttributeOperand 的别名。

另请参阅 setAlias()。

QOpcUa::NodeAttribute QOpcUaAttributeOperand::attributeId() const

返回节点browsePath 所指向的该节点的某个属性的id。

另请参阅 setAttributeId()。

QList<QOpcUaRelativePathElement> QOpcUaAttributeOperand::browsePath() const

返回浏览路径。

另请参阅 ` setBrowsePath()`。

QList<QOpcUaRelativePathElement> &QOpcUaAttributeOperand::browsePathRef()

返回对浏览路径的引用。

另请参阅 browsePath()。

QString QOpcUaAttributeOperand::indexRange() const

返回索引范围字符串。

另请参阅 setIndexRange()。

QString QOpcUaAttributeOperand::nodeId() const

返回类型定义节点的节点 ID。

另请参阅 setNodeId()。

void QOpcUaAttributeOperand::setAlias(const QString &alias)

将别名设置为alias 。这允许将该实例用作过滤器中其他操作的操作数。

另请参阅 alias()。

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

将属性 id 设置为attributeId 。

另请参阅 attributeId()。

void QOpcUaAttributeOperand::setBrowsePath(const QList<QOpcUaRelativePathElement> &browsePath)

将节点的相对路径从nodeId() 设置为browsePath 。

另请参阅 browsePath()。

void QOpcUaAttributeOperand::setIndexRange(const QString &indexRange)

将用于标识属性值的单个值或子集的索引范围字符串设置为indexRange 。

另请参阅 indexRange()。

void QOpcUaAttributeOperand::setNodeId(const QString &nodeId)

将类型定义节点的节点 ID 设置为nodeId 。

另请参阅 nodeId()。

QOpcUaAttributeOperand::operator QVariant() const

将此属性操作数转换为QVariant 。

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

将rhs 中的值设置到此属性操作数中。

相关非成员

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

如果 `lhs ` 的值与 `rhs` 不同,则返回 `true `。

该函数在 Qt 6.7 中引入。

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

如果 `lhs ` 与 `rhs` 的值相同,则返回 `true `。

该函数在 Qt 6.7 中引入。

© 2026 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.