Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
NodeID vs BrowsePath
January 11, 2018
20:53, EET
Avatar
ashiwalv
Member
Members
Forum Posts: 3
Member Since:
April 14, 2015
sp_UserOfflineSmall Offline

Hello All,

For an implementation, I need to clarify the doubt about using NodeID or Its BrowsePath.
For the server I am connecting to create own NodeID after every update to its software. As being client each and everytime I need to reconfigure all nodes with new NodeID and it make unnecessary a lot of work as there are 1000+ nodes need to configure.
I know TranslateBrowsePathsToNodeId would be an alternate solution for this issue but I would like to know if creating Static NodeID(at OPC UA Server) does make any sense rather than Browsing 1000+ nodes to get its NodeIDs?
and I also would like to know about what would be performance if we use Static NodeID vs TranslateBrowsePathsToNodeId service to identify 1000+ nodes?

Thank you very much!

January 12, 2018
10:53, EET
Avatar
Heikki Tahvanainen
Moderator
Members

Moderators
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hello,

Typically OPC UA servers do not dynamically change NodeIds between restarts. So in the normal situation the client application can safely cache the NodeIds and use the same NodeIds everytime.

However, based on the sentence “after every update to its software” I would understand that there has been larger changes in the OPC UA server software and in these situations it’s in principle possible that NodeIds change. If the NodeIds change, then you indeed need to reconfigure them. However, this should happen only seldom.

The original use case of TranslateBrowsePathsToNodeId service is that client application can be programmed by using TypeDefinitions. You can use it also as a “more convenient browse” but it’s good to know that there are some caveats. As an example, there’s no guarantee that BrowseNames are unique and this means that TranslateBrowsePathsToNodeId service may return an array of NodeIds. Then you need to be able to decide which one of the NodeIds is the correct one.

It’s good to keep in mind that NodeId is the unique identifier of a Node in the server address space and NodeId is the concept that is used in all service calls. In other words, using static NodeIds would be the better option.

According to my understanding the performance question is not meaningful: of course it’s better to use NodeIds directly because browsing for the Nodes in every client restart is just an additional step. You would only use the dynamical NodeIds if you have no other choice.

Also, it’s good to note that NodeId structure contains NamespaceIndex which points to an index in server’s NamespaceArray. Usually the NamespaceIndexes do not change between server restart. However, the OPC UA specification does not require this and it’s possible that the NamespaceIndex order change much more often than NodeId identifiers otherwise would. For this reason, it would actually be better to store the NamespaceURI instead of the NamespaceIndex in the client. The most practical way is to convert the NodeId to ExpandedNodeId and back with methods

client.getAddressSpace().getNamespaceTable().toExpandedNodeId(nodeId)
client.getAddressSpace().getNamespaceTable().toNodeId(expandedNodeId)

Alternatively, you can do this in a more manual way with

int index = client.getAddressSpace().getNamespaceTable().getIndex(namespaceUri)
Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
25 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 679

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule, rashadbrownrigg, christi10l, ahamad1, Flores Frederick

Moderators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1