Hi,
I'll have a OPC UA .NET server with a static and a dynamic part of the address space. The dynamic part could change sometimes, so I would like to export the whole address space (static and dynamic) to a Nodeset2 xml file. I was looking at the two methods "UANodeSet.Export" and "UANodeSet.Write" but the result was not satisfying.
First, there is not the right OPC UA namespace information stored in the exported NodeSet. Second, I didn't find a way to export all the nodes of an address space or all the children of a given node at one time.
Is there a way to export the whole address space of a server to a NodeSet xml file?
Thanks in advance.
Server address space to NodeSet xml export
Moderator: uasdknet
- Support Team
- Hero Member
- Posts: 3068
- Joined: 18 Mar 2011, 15:09
Re: Server address space to NodeSet xml export
Hello,
the easiest way for creating a NodeSet2 XML file ist, to create an XML file per NodeManager.
You need to create a FileInfo and call UANodeSet.Export and UANOdeSet.Write.
the easiest way for creating a NodeSet2 XML file ist, to create an XML file per NodeManager.
You need to create a FileInfo and call UANodeSet.Export and UANOdeSet.Write.
Code: Select all
var fileOnDisk = new System.IO.FileInfo("Addressspace.xml");
UANodeSet nodeSet = new UANodeSet();
nodeSet.Export(Server.MessageContext, InMemoryNodes);
System.IO.Stream stream = fileOnDisk.Create();
nodeSet.Write(stream);
Best regards
Unified Automation Support Team
Unified Automation Support Team