19:54, EET
February 20, 2014
We are evaluating the Prosys SDK at the moment. I was able to modify the browse function fom the SampleConsoleClient to get a list of all the nodes with their node Ids. From the example, all the rest of the function depends on the NodeId such as read, write, subscribe.
For our client application, we would like to display a list of the nodes in a tree like format, and the user can right click on the selected node and either read the value or subscribe to it. When building the tree, each node is uniquely identitfied by the nodeId.
How do I create a NodeId object from just the nodeId (string type) such as “ns=1;s=[Device_1]_Meta:Ramp”?
I do not see the UaClient.getNamespaceTable() available as described in the follwoing thread.
http://www.prosysopc.com/blog/forum/opc-ua-java-sdk/nodeid-questions/
Thanks and Regards,
RC
8:09, EET
December 21, 2011
getNamespaceTable() is not static – so you use it as
client.getNamespaceTable()…
I think you have in mind a similar tree view that we have in the Java Client application.
22:23, EET
February 20, 2014
Thank you for the post. I am able to get the nodeId by the id value “ns=1;s=[Device_1]_Meta:Ramp” . I have another followup question.
From your previous post, I know that the namespaceindex differs each time the server starts. And we should store the namespaceUri instead of the namespaceindex. Will you share an example of how to get the namespaceUri for a node? (the reference link on the NodeId questons is broken) We would like to know if we just store the path/ID part for each node, how can we find out the namespaceIndex and create a NodeId object .
8:20, EET
December 21, 2011
and
You can also use toExpandedNodeId() and toNodeId() to convert between these types.
Note, however, that the ExpandedNodeId is not guaranteed to contain the NamespaceUri, but may contain the index instead (if you get the value from somewhere else).
Most Users Ever Online: 1919
Currently Online:
53 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: 726
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1525
Posts: 6456
Newest Members:
forrestdilke5, ernestoportus31, martin123, rickie5305, shaylamaggard4, rickyjuarez140, jonathonmcintyre, fannielima, kristiewinkle8, rustModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1028, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1