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
can I ad new node dynamically using UaClient?
May 19, 2023
19:43, EEST
Avatar
uzair4991
New Member
Members
Forum Posts: 2
Member Since:
May 19, 2023
sp_UserOfflineSmall Offline

I want to add new node using client. I have simulator which I got from internet . UaClient successfully connects from my simulator, but now i want to add new node using UaClient. Is it possible to Add Node dynamically?

May 22, 2023
7:52, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

The SDK API to do this would be (UaClient) client.getAddressSpace().addNodes or addNode which do take in the AddNodesItem paramater. Or exactly addNode(NodeId parentNodeId, NodeId referenceTypeId, NodeId newNodeId, QualifiedName browseName, NodeClass nodeClass, NodeAttributes nodeAttributes, NodeId typeDefinition), which is just the AddNodesItem structure fields.
The methods taking in an ‘UaNode’ are separate and do not make the ‘AddNodes’ call, SDK uses that internally (and is basically a side-effect of shared UaAddressSpace interface).

However, note that this only works if the server side specifically supports it (https://reference.opcfoundation.org/Core/Part4/v105/docs/5.7.2). And just as a guess, I do assume this simulator doesn’t support it, as it would be extremely rare.

P.S.
If you would do a server with our SDK, the feature would be by default off for security reasons (as you could also delete nodes with this, https://reference.opcfoundation.org/Core/Part4/v105/docs/5.7.4). None of our Applications support it at the moment, but the SampleConsoleServer has an option to turn it on (see SampleConsoleServer.Action.ENABLE_NODE_MANAGEMENT).

Note that if you do this in a server application, you should most likely also do user authorization to limit this feature to only e.g. ‘admin users’. Also you will need to implement things (skipped here) if you wish to detect this in the server to e.g. persist the addition or actually make the node to do anything (otherwise it is just a temporary data-holder basically).

May 22, 2023
14:28, EEST
Avatar
uzair4991
New Member
Members
Forum Posts: 2
Member Since:
May 19, 2023
sp_UserOfflineSmall Offline

If I am getting you correct. What you mean is while server is running node can be created dynamically with out server to restart? correct me if I am wrong and secondly I am really thankful for your answer

May 22, 2023
16:01, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Basically meaning that the server must have been built to support this feature, which is not common. Generally speaking, do not expect a server to support this feature.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
31 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

TimK: 41

Member Stats:

Guest Posters: 0

Members: 681

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com

Moderators: Jouni Aro: 1010, 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