11:59, EET
February 1, 2018
Hello,
I have been working on an OPC UA Android client.
I have implemented subscriptions for specific nodes. However I had the “luxury” to know the NodeIds of the nodes I want to subscribe.
As next step I want to be able to get these NodeIds only by knowing the “BrowseNames” of the nodes.
I guess i have to browse throught the AddressSpace and search for a node with the specific BrowseName.
Thank you
14:52, EET
April 17, 2013
Hello,
You have understood correctly that in order to make a subscription, you need to know the NodeId of the node. The NodeId uniquely identifies a Node in an OPC UA server. It’s used to address the Node in OPC UA services. When you’re connecting to an unknown OPC UA server for the first time, you do need to find out the NodeIds by some mechanism. The mechanism can be OPC UA browse service calls, or alternatively it can be a configuration file supplied by the administrator of the application.
There’s no mechanism to automatically find out a NodeId corresponding to a given BrowseName. So, you have understood correctly that you need to browse through the AddressSpace in order to find out the NodeIds. However, it’s good to note that typically OPC UA servers do not dynamically change NodeIds between restarts. In the normal situation the client application can safely cache the NodeIds and use the same NodeIds everytime.
I would also like to mention that there’s a service called TranslateBrowsePathsToNodeIds which can be used to find out the NodeId of a Node in certain BrowsePath. In certains situations, this can function as a “more convenient browse”. The original use case of TranslateBrowsePathsToNodeId service is that client application can be programmed by using TypeDefinitions.
In the end, it’s also good to note that there may be some caveats when using BrowseNames. The main point is that there’s no guarantee that BrowseNames are unique like NodeIds. For example, it’s possible 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.
Most Users Ever Online: 1919
Currently Online:
12 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 729
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech KubalaModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1