![sp_Feed](https://forum.prosysopc.com/wp-content/sp-resources/forum-themes/default/images/sp_Feed.png)
![sp_TopicIcon](https://forum.prosysopc.com/wp-content/sp-resources/forum-themes/default/images/sp_TopicIcon.png)
17:59, EEST
![Avatar](https://forum.prosysopc.com/wp-content/sp-resources/forum-avatars/14896526571489670516_vegastrike_50.png)
March 16, 2017
![sp_UserOfflineSmall](https://forum.prosysopc.com/wp-content/sp-resources/forum-themes/default/images/sp_UserOfflineSmall.png)
Hi,
I would like to clarify if my unterstanding for registerNodes and unregisterNodes is correct.
If a server supports it and I call the registerNodes service with a NodeId ‘1’ then the server returns e.g. a new NodeId like NodeId ‘2’ which I can use for a ‘quick’ access.
The question is what NodeId do I have to use when I call the unregisterNodes service?
From the Javadoc I would assume that it is the NodeId ‘2’ which have been returned when calling the registerNodes service – because in the Javadoc it says: ‘This Service is used to unregister NodeIds that have been obtained via registerNodes(com.prosysopc.ua.stack.builtintypes.NodeId…).’
Is this correct?
Thank you!
11:32, EEST
![Avatar](https://forum.prosysopc.com/wp-content/sp-resources/forum-avatars/defaults/moderatordefault.png)
April 3, 2012
![sp_UserOfflineSmall](https://forum.prosysopc.com/wp-content/sp-resources/forum-themes/default/images/sp_UserOfflineSmall.png)
Hi,
The com.prosysopc.ua.client.AddressSpace.registerNodes(NodeId…) + registerNodes(NodeId…) are just basically wrappers on the service call (with tracking the NodeIds to enable AddressSpace.unregisterAllNodes()). Thus since per spec it is the NodeIds previously received from RegisterNodes the answer is ‘yes’. However, I should probably note few things.
RegisterNodes: https://reference.opcfoundation.org/Core/Part4/v105/docs/5.8.5
UnregisterNodes: https://reference.opcfoundation.org/Core/Part4/v105/docs/5.8.6
Unless you have a server that really needs this, I would just recommend to ignore this Service exists. For example, our SDK’s server side by default just returns the same NodeIds back, i.e. no benefit. Also e.g. for a case of repeatedly Read:ing a long-String-NodeId’d node, Subscriptions+MonitoredItems are a better alternative anyway since the notifications use numeric MonitoredItemIds, not NodeIds. Plus since the registered NodeIds only work within a Session in the case of any reconnects you would need to re-register them (and you might get a different NodeId than previous session).
Most Users Ever Online: 518
Currently Online:
13 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 142
pramanj: 86
rocket science: 85
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 724
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1495
Posts: 6352
Newest Members:
armandovarley, dole, rustyhammer, braydenaquino6, blaircleveland0, maribelkeeler7, Nicky, rickymeade2, niamhtoussaint0, adamq0505309Moderators: Jouni Aro: 1017, Pyry: 1, Petri: 0, Bjarne Boström: 1003, Jimmy Ni: 26, Matti Siponen: 337, Lusetti: 0
Administrators: admin: 1