-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate code from UaNodeset file #6
Comments
You can easily do it using the demo version of the OPC UA Address Space Model Designer. Always it is reverse engineering (disassembler) process, so some details may be lost. Because it is hard to prepare UANodeSet file manually, my advice is to use ModelDesign schema as the source code to be compiled and produce all required deliverables (including UANodeSet) all together. Unfortunately the ModelCompiler in this repository fits only partially to the whole process. |
I am in the situation where another company has delivered the OPC UA model in UaNodeSet format (XML) and the proprietary .ua format of Unified Automation's UaModeler. I want to use the same model that we use to generate and develop in C to be used for our testing framework that uses the C#.NET SDK. I tried to load the base model in the Address Space Model Designer but I cannot get the build to finish. The resulting output is:
I agree that when designing a model that it makes sense to start with the ModelCompiler format. However I don't have the time to fully convert the existing model into this format since manually converting this is tedious work and error prone. |
Have you got any errors while importing the NodeSet model? The list of error is in the application log file and displayed in the debug window. The location of the log file is in the help menu. |
any news ? |
@aliridha1510 I tried generating code from OpcUaDiModelv11.xml and OpcUaDiModelv11.csv file. Playing with ModelCompiler source code I could generate ansic code. I tried following input tokens/args to Opc.Ua.ModelCompiler.exe
the help text for
does not provide any information about output directory as an input argument after -ansic I have checked it in my repository, from where you can download all of them: |
Hi, As there is no definitive answer: How can I turn my UaNodeset.xml in a ModelDesign.xml without using a modeldesigner? |
@NichtEuler I understand your point, but the question is how to compensate for the development effort. It is possible and easy to expand the project: https://github.com/mpostol/OPC-UA-OOI/tree/master/SemanticData and add the converter code I have in my commercial product, but the question is about motivation. |
I am trying to generate C#.NET code from a model defined as a XML file conforming to the "UANodeSet.xsd" format. Since this is the standard format for describing an OPC UA model I would expect that it is possible to generate code using the XML file as input. However the ModelCompiler expects an XML file conforming to the "UA Model Design.xsd".
Is there an easy way of converting a UaNodesSet XML file to a UA Model Design XML file. Or is there any other way to generate C#.NET code from a UaNodeSet XML file?
The text was updated successfully, but these errors were encountered: