opc-ua-nodeset-parser
opc-ua-nodeset-parser copied to clipboard
Implementation Guidance of using this project with ExampleServer
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,
- Should I be creating two
DINamespace
andRoboticsNamespace
classes which takes in themergedNodeSet
and filters only those nodes relavant for that namespace and add them ? - Also, should I be doing the following code to get the
FolderNode
for References , DataTypes , ObjectTypes and simply add the nodes from theUANodeSet
?
getServer()
.getAddressSpaceManager()
.getManagedNode()
If you can guide with some sample code for the import process, I appreciate that. Thanks in advance for your time.