Good time of the day!
We are planning to implement search in the tree structure by NodeId and DisplayName. For this
the tree structure is supposed to be obtained on the Client. In this regard, questions.
We use "OPC Foundation UA-.NETStandard" for Client development.
1) Can we, knowing the NodeId, build a full path to it?
For example NodeId = "i = 2258" - how to get "Server.ServerStatus.CurrentTime" from it?
2) Knowing the NodeId, can we call Browse towards Root and get all parent nodes?
3) Is it possible to get the entire tree of all Node servers in one call?
4) Is it good practice to subtract the server's Node Tree structure once,
save it in XML and then build a GUI tree based on it and use it in the next
time the next time you connect to the server?
5) Is there any documentation on "UA-.NETStandard" with a description of the functions.
Thank you.
05/30/2017
1) There is no such thing as a "full path" identifier in OPC UA because it is a mesh model rather than a tree model. You can pick starting point and find a path from the starting point to the target but that path is only valid given the starting point.
2) You can navigate back to the root node but there may be many paths to root. In some cases, you can encounter loops.
3) No
4) Most definitely not. UA servers can have dynamic addresses spaces which means the path to the node from root changes even if the node is still valid.
5) Any docs will be in the GitHub repo.
Randy Armstrong said
1) There is no such thing as a "full path" identifier in OPC UA because it is a mesh model rather than a tree model. You can pick starting point and find a path from the starting point to the target but that path is only valid given the starting point.2) You can navigate back to the root node but there may be many paths to root. In some cases, you can encounter loops.
3) No
4) Most definitely not. UA servers can have dynamic addresses spaces which means the path to the node from root changes even if the node is still valid.
5) Any docs will be in the GitHub repo.
Thank you very much for the quick response!
6) Is subscribing MonitoredItem by NodeId the right decision? NodeId will not become
moment invalid?
7) It turns out that the only correct way to view the tag tree is
this is each time dynamically building it from the root and adding to it as the nodes expand
children? Which works more or less quickly in terms of performance.
8) Is there another approach - to present all Nodes in a flat form - as a list, and not hierarchically nested?
05/30/2017
Many clients create client side views that allow users to pull in data from multiple servers.
The client side views could have a hierarchy and at each level in the hierarchy there would be a flat list of node ids.
In some cases, the client would persist a starting node plus a path to child nodes. This is typically done when a node is an instance of an ObjectType and the client view is programmed against the ObjectType. This means that switching the view to use a different instance only requires the starting node to be changed.
Subscribing to MonitoredItems is the way to go. If a Node dissppears the Server will report BadNodeIdUnknown as the StatusCode which could trigger logic in you client. This is rare but no impossible scenario.
1 Guest(s)