opc-ua-nodeset-parser icon indicating copy to clipboard operation
opc-ua-nodeset-parser copied to clipboard

Implementation Guidance of using this project with ExampleServer

Open gsshiva opened this issue 1 year ago • 0 comments

I am a new to OPC/UA and getting up to speed. We have a project that depends on DI and Robotics. I want to expose both models with the ExampleServer in the MILO's server-examples . I was able to do the folliowing

 @Test
    public void testMerge() throws Exception {
        UaNodeSet roboticsNodeSet = parse("robotics/Opc.Ua.Robotics.NodeSet2.xml");
        UaNodeSet devicesNodeSet = parse("di/Opc.Ua.Di.NodeSet2.xml");
        UaNodeSet mergedNodeSet = UaNodeSetMerger.merge(roboticsNodeSet, devicesNodeSet);
        System.out.println("Merged nodes has "+mergedNodeSet.getNodes().size());
    }

I see that the ExampleServer starts up an ExampleNamespace. If I need to expose the mergedNodeSet which contains 2 namespaces,

  1. Should I be creating two DINamespace and RoboticsNamespace classes which takes in the mergedNodeSet and filters only those nodes relavant for that namespace and add them ?
  2. Also, should I be doing the following code to get the FolderNode for References , DataTypes , ObjectTypes and simply add the nodes from the UANodeSet ?
getServer()
            .getAddressSpaceManager()
            .getManagedNode()

If you can guide with some sample code for the import process, I appreciate that. Thanks in advance for your time.

gsshiva avatar Feb 20 '23 03:02 gsshiva