Search in the Nodes tree on the Client|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Search in the Nodes tree on the Client
Avatar
qualifier qualifier
New Member
Members
Forum Posts: 2
Member Since:
04/16/2021
sp_UserOfflineSmall Offline
1
05/27/2021 - 05:02
sp_Permalink sp_Print

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.

Avatar
Randy Armstrong
Admin
Forum Posts: 1451
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
05/27/2021 - 05:13
sp_Permalink sp_Print sp_EditHistory

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.

Avatar
qualifier qualifier
New Member
Members
Forum Posts: 2
Member Since:
04/16/2021
sp_UserOfflineSmall Offline
3
05/27/2021 - 05:43
sp_Permalink sp_Print

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?

Avatar
Randy Armstrong
Admin
Forum Posts: 1451
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
05/27/2021 - 07:50
sp_Permalink sp_Print

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.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 39
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1349
Posts: 4577