Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [milo-dev] Node Management Services

The Session already instantiates a DefaultNodeManagementServiceSet and uses it to handle incoming node management requests.

All you need to do is in your AddressSpace implementation (which in turn implements the NodeManagementServices interface) implement the required methods:

  • NodeManagementServices::addNodes
  • NodeManagementServices::deleteNodes
  • NodeManagementServices::addReferences
  • NodeManagementServices::deleteReferences

i.e. everything is already hooked up, you just need to actually implement these methods in your AddressSpace.

On Nov 25, 2024, at 00:01, Erik Voges via milo-dev <milo-dev@xxxxxxxxxxx> wrote:

Dear Community

I am confused with adding node management services, in particular, how the NodeManagementServices gets called (I can't find any reference to it in the code).

What I have done so far was to register the AbstractNodeManager and also the DefaultNodeManagementServiceSet as follows:

                server = new OpcUaServer(serverConfig);

                AddressSpaceManager addressSpaceManager = server.getAddressSpaceManager();
                AbstractNodeManager<UaNode> nodeManager = new AbstractNodeManager<UaNode>();

                addressSpaceManager.register(nodeManager);
                System.out.println("registered NodeManager ...");

                server.getStackServer().addServiceSet("urn:energyutilities:opcua:server",
                                new DefaultNodeManagementServiceSet());
                System.out.println("added DefaultNodeManagementServiceSet ...");

.. But whenever I try to add a node to my server  from an outside script, it calls this line in DefaultNodeManagementServiceSet.addNodes():

      ...
           server.getAddressSpaceManager().addNodes(context, nodesToAdd);
      ...

... which ends up calling the default NodeManagementServices.addNodes() which returns "BadNotSupported".

So my question is really: If I create a custom subclass of NodeManagementServices, where do I register it so that it will get called instead of the original interface?

I thought that  " addressSpaceManager.register(nodeManager); " would have taken care of it ... what am I missing?

Or was I supposed to change the DefaultNodeManagementServiceSet.addNodes() so that it does something different?

I'm sorry if is is a real dumb question....

Best regards
Erik

_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev


Back to the top