Page 1 of 1

createNodeManagerNS1

Posted: 11 May 2019, 19:07
by vinothtcecse
Hi,

I would like inherit the class NodeManagerNS1 in my Server application.

Code: Select all

class MyNodeManagerNS1: public NodeManagerNS1
{
....
....
};
Only way to create the instance of MyNodeManagerNS1 is to override the method from ServerManager "ServerManager::createNodeManagerNS1"

Code: Select all

class MyServerManager: public ServerManager
{
....
....
   virtual NodeManager* createNodeManagerNS1(..)
   {
        return new [b]MyNodeManagerNS1[/b](..);
   }
};
But there is no way to send the instance of MyServerManager to CoreModule::initialize().

Please suggest me how to send the instance of MyServerManager to CoreModule.

Regards,
Vinoth

Re: createNodeManagerNS1

Posted: 12 May 2019, 10:06
by vinothtcecse
Hi Team,

I saw the server_hello_world sample program. In OpcServerMain () method, the instance of UaServerApplication is created using

Code: Select all

OpcServer* pServer = new OpcServer;
from the pServer i am able to get the coremodule. I guess, CoreModule is created and initialized in the start method.

Code: Select all

pServer->Start() 
There is no way to send "MyServerManager" to the pServer->Start() method.

Please let me know how I can pass my own ServerManager (MyServerManager)

Regards,
Vinoth