本页内容

SimpleAttributeOperand QML Type

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

Import Statement: import QtOpcUa
Since: QtOpcUa 5.13
Status: Deprecated since 6.9

自 QtOpcUa 6.9 起,此类型已弃用。我们强烈建议不要在新代码中使用它。

属性

详细说明

SimpleAttributeOperand 在 OPC UA 1.05 第 4 部分的 7.7.4.5 节中进行了规定。当需要将节点属性用作操作数时,应使用该操作数。

例如,以下简单属性操作数表示基础事件类型的“Severity”字段的值:

import QtOpcUa as QtOpcUa

QtOpcUa.SimpleAttributeOperand {
    identifier: "Severity"
    ns: "http://opcfoundation.org/UA/"
}

属性文档

browsePath : list<OpcUaNodeId>

包含该属性的节点的浏览路径。

import QtOpcUa as QtOpcUa

QtOpcUa.SimpleAttributeOperand {
    ...
    browsePath: [
        QtOpcUa.NodeId {
            identifier: "Message"
            ns: "http://opcfoundation.org/UA/"
         }
         ...
    ]
}

indexRange : string

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

import QtOpcUa as QtOpcUa

QtOpcUa.SimpleAttributeOperand {
    ...
    indexRange: "0:2"
}

nodeAttribute : Constants.NodeAttribute

节点browsePath 所指向的属性。默认值为Constants.NodeAttribute.Value 。

import QtOpcUa as QtOpcUa

QtOpcUa.SimpleAttributeOperand {
    ...
    nodeAttribute: QtOpcUa.Constants.NodeAttribute.Value
}

typeId : string

类型定义节点的节点 ID。操作数将具有该类型或其子类型之一。默认值为"ns=0;i=2041" 。

import QtOpcUa as QtOpcUa

QtOpcUa.SimpleAttributeOperand {
    ...
    typeId: "ns=0;i=2041"
}

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