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
RegisterNodes and UnregisterNodes
July 12, 2024
17:59, EEST
Avatar
rocket science
Member
Members
Forum Posts: 85
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

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!

July 15, 2024
11:32, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1003
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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).

Forum Timezone: Europe/Helsinki

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, adamq0505309

Moderators: Jouni Aro: 1017, Pyry: 1, Petri: 0, Bjarne Boström: 1003, Jimmy Ni: 26, Matti Siponen: 337, Lusetti: 0

Administrators: admin: 1