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(QOpcUa::NodeAttribute attributeId, const QString &typeId = QStringLiteral("ns=0;i=2041")) | |
| QOpcUaSimpleAttributeOperand(const QString &name, quint16 namespaceIndex = 0, const QString &typeId = QStringLiteral("ns=0;i=2041"), QOpcUa::NodeAttribute attributeId = QOpcUa::NodeAttribute::Value) | |
| 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 |
| operator QVariant() const | |
| QOpcUaSimpleAttributeOperand & | operator=(const QOpcUaSimpleAttributeOperand &rhs) |
相关的非成员
(since 6.7) bool | operator!=(const QOpcUaSimpleAttributeOperand &lhs, const QOpcUaSimpleAttributeOperand &rhs) |
| bool | operator==(const QOpcUaSimpleAttributeOperand &lhs, const QOpcUaSimpleAttributeOperand &rhs) |
详细说明
SimpleAttributeOperand 在 OPC UA 1.05 第 4 部分的 7.7.4.5 节中进行了规定。当需要将节点属性用作操作数时,应使用该属性。
例如,以下简单属性操作数表示基础事件类型的“严重性”(Severity)字段的值:
QOpcUaSimpleAttributeOperand("Severity");成员函数文档
QOpcUaSimpleAttributeOperand::QOpcUaSimpleAttributeOperand()
Default 会构建一个未设置任何参数的简单属性操作数。
QOpcUaSimpleAttributeOperand::QOpcUaSimpleAttributeOperand(QOpcUa::NodeAttribute attributeId, const QString &typeId = QStringLiteral("ns=0;i=2041"))
为类型为typeId 的对象或变量的属性attributeId 构建一个简单的属性操作数。这可用于在事件过滤器中请求ConditionId,如OPC UA 1.05第9部分5.5.2节所述。
QOpcUaSimpleAttributeOperand::QOpcUaSimpleAttributeOperand(const QString &name, quint16 namespaceIndex = 0, const QString &typeId = QStringLiteral("ns=0;i=2041"), QOpcUa::NodeAttribute attributeId = QOpcUa::NodeAttribute::Value)
为命名空间namespaceIndex 中浏览名为name 的直接子节点的属性attributeId 构建一个简单的属性操作数。typeId 是类型定义节点的节点 ID。该操作数将仅限于类型typeId 或其子类型的实例。
QOpcUaSimpleAttributeOperand::QOpcUaSimpleAttributeOperand(const QOpcUaSimpleAttributeOperand &rhs)
根据rhs 构建一个简单的属性操作数。
QOpcUa::NodeAttribute QOpcUaSimpleAttributeOperand::attributeId() const
返回节点browsePath 所指向的属性。
另请参阅 setAttributeId()。
QList<QOpcUaQualifiedName> QOpcUaSimpleAttributeOperand::browsePath() const
返回从typeId 开始的某个节点的相对路径。
另请参阅 setBrowsePath()。
QList<QOpcUaQualifiedName> &QOpcUaSimpleAttributeOperand::browsePathRef()
返回对浏览路径的引用。
另请参阅 browsePath()。
QString QOpcUaSimpleAttributeOperand::indexRange() const
返回索引范围字符串。
另请参阅 ` setIndexRange()`。
void QOpcUaSimpleAttributeOperand::setAttributeId(QOpcUa::NodeAttribute attributeId)
将属性 id 设置为attributeId 。
另请参阅 attributeId()。
void QOpcUaSimpleAttributeOperand::setBrowsePath(const QList<QOpcUaQualifiedName> &browsePath)
将包含该属性的节点的浏览路径设置为browsePath 。
另请参阅 browsePath()。
void QOpcUaSimpleAttributeOperand::setIndexRange(const QString &indexRange)
将用于标识属性值的单个值或子集的索引范围字符串设置为indexRange 。
另请参阅 indexRange()。
void QOpcUaSimpleAttributeOperand::setTypeId(const QString &typeId)
将类型定义节点的节点 ID 设置为typeId 。操作数的类型将为该类型或其子类型之一。
另请参阅 typeId()。
QString QOpcUaSimpleAttributeOperand::typeId() const
返回类型定义节点的节点 ID。
另请参阅 setTypeId()。
QOpcUaSimpleAttributeOperand::operator QVariant() const
将此简单属性操作数转换为QVariant 。
QOpcUaSimpleAttributeOperand &QOpcUaSimpleAttributeOperand::operator=(const QOpcUaSimpleAttributeOperand &rhs)
将rhs 中的值设置到此简单属性操作数中。
相关的非成员
[noexcept, since 6.7] bool operator!=(const QOpcUaSimpleAttributeOperand &lhs, const QOpcUaSimpleAttributeOperand &rhs)
如果 `lhs ` 的值与 `rhs` 不同,则返回 `true `。
该函数在 Qt 6.7 中引入。
[noexcept] bool operator==(const QOpcUaSimpleAttributeOperand &lhs, const QOpcUaSimpleAttributeOperand &rhs)
如果lhs 与rhs 的值相同,则返回true 。
© 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.