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.