Hi there,
I have modeled my type system with UaModeler and instantiated two objects directly from it (both siblings at the top-level object folder), as it would be a pain in the bottom to do this manually (as OPC UA is!). However, I have to decide which object should be available for browsing during runtime, the other is unnecessary and has to be removed from the tree. So, I want to use the DeleteNode function or something similar from the generated myNS_NodeManager.cpp but it seems that everything needs a ServiceContext. Where to get that from? Your documentation is very sparse when it comes to using UaModeler with the C++ toolkit. Please be so kind and point me to the correct solution.
Thank you!
Best wishes,
Martin
DeleteNode in NodeManager
Moderator: uasdkcpp
-
- Full Member
- Posts: 7
- Joined: 24 Jun 2021, 17:13
Re: DeleteNode in NodeManager
Okay, this brought me a solution:
https://forum.unified-automation.com/viewtopic.php?f=34&t=316&p=316&hilit=deleteUaNode#p316
I think this should be part of the tutorial series or even the UaModeler tutorials and how-to section.
What's even more interesting is how to obtain the UaNodeId object coming from the UaModeler:
where is a inside the
As UaModeler is using numeric identifiers, using these definitions is way more convenient - but it is poorly documented, unfortunately.
https://forum.unified-automation.com/viewtopic.php?f=34&t=316&p=316&hilit=deleteUaNode#p316
I think this should be part of the tutorial series or even the UaModeler tutorials and how-to section.
What's even more interesting is how to obtain the UaNodeId object coming from the UaModeler:
Code: Select all
UaNodeId id = UaNodeId(MyNsId_MyInstanciatedObject, getNameSpaceIndex());
Code: Select all
MyNsId_MyInstanciatedObject
Code: Select all
#define
file, generated by UaModeler.MyNs_identifiers.h
As UaModeler is using numeric identifiers, using these definitions is way more convenient - but it is poorly documented, unfortunately.