How can I get the NodeManger from the OpcUaServer
I am trying to add the namespace to the server, and I found these codes in the https://github.com/kevinherron/pi-server
server.getNamespaceManager().registerAndAdd(
PiNamespace.NAMESPACE_URI,
(namespaceIndex) -> new PiNamespace(this, namespaceIndex));
And I found a way to get the new namespace.
There is a function in the PiNamespace in https://github.com/kevinherron/pi-server
public UaNodeManager getNodeManager() {
return server.getServer().getNodeManager();
}
and it shows that the server should have the function getNodeManager().
The server node is the instance of OpcUaServer, but I am sorrow to find there is no getNodeManager() function.
How can I do to add a self-defined namespace to the server?
Many Thanks!
I found the new way to set up the Server's Namespace
ExampleNamespace exampleNamespace = new ExampleNamespace(server);
exampleNamespace.startup();
is that mean, if I have another namespace to register.
I need to de
ExampleNamespace exampleNamespace = new ExampleNamespace(server);
exampleNamespace.startup();
AnotherNamespace anoterNamespace = new AnotherNamespace(server);
anoterNamespace.startup();
Can I use this way to start a new namespace?
Yes, that's fine for registering and starting a new Namespace instance.
I'm not sure the code in the pi-server project is written against a recent version of Milo, so best to stick to the ExampleServer and ExampleNamespace classes as a reference.
Yes, that's fine for registering and starting a new Namespace instance.
I'm not sure the code in the
pi-serverproject is written against a recent version of Milo, so best to stick to theExampleServerandExampleNamespaceclasses as a reference.
Thank you very much! It's so kind of you!