OPC UA TranslateBrowsePathsToNodeIds() 服务
OPC UA TranslateBrowsePathsToNodeIds() Service
我知道 TranslateBrowsePathsToNodeIds() 服务可用于针对类型定义进行编程,并通过扩展检索节点 components/properties 的 NodeId。
我有两个问题。
1) RelativePath 结构的最后一个元素是否需要有效的 targetName,即不能为空?
2) 当路径可以沿着两个不同的分支成功解析时是否有任何规定的行为,即程序可以 select 中间路径上的不同节点并且仍然成功地遵循下一个路径序列?
谢谢
1) 是的,最后一个元素可以有一个 empty targetName。根据规范:
The final element may have an empty targetName. In this situation all targets of the references identified by the referenceTypeId are the targets of the RelativePath.
The targetName shall be specified for all other elements.
2) 同样,来自规范:
If a Node has multiple targets with the same BrowseName, the Server shall return a list of NodeIds. However, since one of the main purposes of this Service is to support programming against type definitions, the NodeId of the Node based on the type definition of the starting Node is returned as the first NodeId in the list.
我知道你问的是中间的重复浏览名称,但我认为这仍然适用;您最终会从调用中返回多个目标。
我知道 TranslateBrowsePathsToNodeIds() 服务可用于针对类型定义进行编程,并通过扩展检索节点 components/properties 的 NodeId。
我有两个问题。
1) RelativePath 结构的最后一个元素是否需要有效的 targetName,即不能为空?
2) 当路径可以沿着两个不同的分支成功解析时是否有任何规定的行为,即程序可以 select 中间路径上的不同节点并且仍然成功地遵循下一个路径序列?
谢谢
1) 是的,最后一个元素可以有一个 empty targetName。根据规范:
The final element may have an empty targetName. In this situation all targets of the references identified by the referenceTypeId are the targets of the RelativePath.
The targetName shall be specified for all other elements.
2) 同样,来自规范:
If a Node has multiple targets with the same BrowseName, the Server shall return a list of NodeIds. However, since one of the main purposes of this Service is to support programming against type definitions, the NodeId of the Node based on the type definition of the starting Node is returned as the first NodeId in the list.
我知道你问的是中间的重复浏览名称,但我认为这仍然适用;您最终会从调用中返回多个目标。