Creating Namespaces

Questions regarding the use of the C++ SDK for Server or Client development or integration into customer products ...

Moderator: uasdkcpp

Post Reply
RafaelCrespi
Hero Member
Hero Member
Posts: 26
Joined: 22 Jun 2017, 09:41

Creating Namespaces

Post by RafaelCrespi »

Hi,

I have read that NodeManagers than inherits from NodeManagerBase can only have 1 Namespace by NodeManager instance.

a) If I want to create different namespaces on runtime using a NodeManager than inherits from NodeManagerBase, can I do it creating as many NodeManager instances as Namespaces? Is there any other way?

b) When implementing the constructor of myNodeManager I have to define the Namespace URI just like that:

Code: Select all

myNodeManager::myNodeManager(): NodeManagerBase("NamespaceURI"){}
Can I do it by parameter when creating the NodeManager instance? I mean:

Code: Select all

myNodeManager::myNodeManager(): NodeManagerBase(const UaString s_NamespaceURI){}
and in main:

Code: Select all

myNodeManager* p_myNodeManager = new myNodeManager("NamespaceURI"); 


Thanks in advance,

Rafa

User avatar
baldo
Sr. Member
Sr. Member
Posts: 13
Joined: 19 Nov 2019, 12:15

Re: Creating Namespaces

Post by baldo »

RafaelCrespi wrote:
13 Mar 2018, 18:26
I have read that NodeManagers than inherits from NodeManagerBase can only have 1 Namespace by NodeManager instance.
Where did you read that?

User avatar
Support Team
Hero Member
Hero Member
Posts: 2522
Joined: 18 Mar 2011, 15:09

Re: Creating Namespaces

Post by Support Team »

Yes, NodeManagerUaNode is designed to care for exactly one Namespace and NodeManagerBase is derrived from that class.
Best regards
Unified Automation Support Team

Post Reply