1

I need to subscribe to ~1000 nodes, which were created in a hierarchy, like:

ns=2;s=0:Manufacturing.E01.Ambient.Temperature

ns=2;s=0:Manufacturing.E01.Ambient.WindDir

ns=2;s=0:Manufacturing.E01.Commands.AckAllErrors

ns=2;s=0:Manufacturing.E03.Ambient.Temperature

ns=2;s=0:Manufacturing.E03.Ambient.WindDir

ns=2;s=0:Manufacturing.E03.Ambient.WindSpeed

I am treating every update the same way, thus calling subscription.monitor() function for each of them and creating a new callback function does not seem to be the optimal way to me.

Is it possible to subscribe to multiple nodes with a pattern, e.g all nodes that fall under:

ns=2;s=0:Manufacturing.E01.

4

1 回答 1

5

不,不是 - 无法订阅 OPC UA 中的“文件夹”。

在您的情况下,最简单的方法是首先使用 OPC UA浏览服务浏览文件夹。

OPC UA 服务器将返回来自被询问的起始节点的所有引用(OPC UA 父子引用可能是OrganizesHasComponent、Has Property等)。

然后您可以使用 OPC UA CreateSubscription / CreateMonitoredItems Services 订阅节点。

于 2019-01-31T21:39:38.670 回答