Node QML Type
代表服务器上的一个节点。更多
| Import Statement: | import QtOpcUa |
| Since: | QtOpcUa 5.12 |
| Inherited By: | MethodNode and ValueNode |
| Status: | Deprecated since 6.9 |
自 QtOpcUa 6.9 起,该类型已被弃用。我们强烈建议不要在新代码中使用它。
属性
- Status : enumeration
- browseName : string
- connection : Connection
- description : LocalizedText
- displayName : LocalizedText
- errorMessage : string
- eventFilter : EventFilter
- nodeClass : QOpcUa::NodeClass
- nodeId : NodeId
- readyToUse : bool
- status : Status
方法
- Date getServerTimestamp(Constants::NodeAttribute attribute)
- Date getSourceTimestamp(QOpcUa::NodeAttribute attribute)
详细说明
import QtOpcUa as QtOpcUa QtOpcUa.Node { nodeId : QtOpcUa.NodeId { identifier: "s=Example.Method" ns: "Example Namespace" } connection: myConnection }
财产文件
Status : enumeration
节点的状态。
| 常数 | 说明 |
|---|---|
Node.Status.Valid | 节点已准备就绪 |
Node.Status.InvalidNodeId | 节点 ID 无效 |
Node.Status.NoConnection | 未连接到服务器 |
Node.Status.InvalidNodeType | 服务器上的节点类型与 QML 类型不匹配 |
Node.Status.InvalidClient | 连接客户端无效 |
Node.Status.FailedToResolveNode | 节点解析失败 |
Node.Status.InvalidObjectNode | 对象节点无效或其类型与预期类型不符 |
Node.Status.FailedToReadAttributes | 读取属性失败 |
Node.Status.FailedToSetupMonitoring | 设置监控失败 |
另请参阅 status 和errorMessage 。
browseName : string
节点的浏览名称。如果信息不可用,则返回空字符串。
connection : Connection
节点实例使用的连接。当相关连接已与服务器建立连接时,节点将自动被访问。
如果未设置此属性,则将使用默认连接(如果有)。
另请参阅 Connection 和Connection::defaultConnection 。
description : LocalizedText
节点的描述。如果没有相关信息,则返回默认的构造LocalizedText 。
displayName : LocalizedText
节点的本地化文本。如果信息不可用,则返回默认构建的LocalizedText 。
errorMessage : string [read-only]
当前状态代码的字符串表示。
eventFilter : EventFilter
事件过滤器允许根据特定条件监控服务器上的事件。
另请参阅 EventFilter 。
nodeClass : QOpcUa::NodeClass [read-only]
节点的节点类别。如果信息不可用,则返回QtOpcUa.Constants.NodeClass.Undefined 。
nodeId : NodeId
要使用的服务器上节点的 ID。可以是绝对节点 ID,也可以是相对节点 ID。
另请参阅 NodeId 和RelativeNodeId 。
readyToUse : bool [read-only]
此属性返回节点是否已准备就绪可以使用。在与服务器建立成功连接并成功设置节点后,该属性会发生一次。
status : Status [read-only]
节点的当前状态。只有当状态为Valid 时,节点才可用。在任何其他情况下,它都表示出错。
另请参阅 errorMessage 和Status 。
方法文档
Date getServerTimestamp(Constants::NodeAttribute attribute)
返回给定attribute 的服务器时间戳。
Date getSourceTimestamp(QOpcUa::NodeAttribute attribute)
返回给定attribute 的源时间戳。
© 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.