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 |
QVariant | 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 中被指定。当节点属性需要作为操作数时使用。
例如,以下简单属性操作数表示基本事件类型的 "严重性 "字段的值:
QOpcUaSimpleAttributeOperand("Severity");
成员函数文档
QOpcUaSimpleAttributeOperand::QOpcUaSimpleAttributeOperand()
Default 构造了一个简单的属性操作数,没有设置任何参数。
QOpcUaSimpleAttributeOperand::QOpcUaSimpleAttributeOperand(QOpcUa::NodeAttribute attributeId, const QString &typeId = QStringLiteral("ns=0;i=2041"))
为typeId 类型的对象或变量的属性attributeId 构造一个简单的属性操作数。如 OPC UA 1.05 第 9 部分 5.5.2 所述,这可用于在事件过滤器中请求 ConditionId。
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()。
QVariant 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
。
© 2025 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.