-1

We have a lot of classes that we would like to expose through OPC UA. We are trying to use the OPC UA Foundation classes.

I've seen that there is a lot of example using a XML config file to create the model.

Then they are using some ModelCompiler.exe file to generate some other files(.Classes, .Constants, .DataTypes).

I would like to know if it is possible to directly use our bases classes(like POCO in WCF), and how to generate the model from it? Is there some example somewhere of this? I didn't found it in the samples of OPC UA.

J4N
  • 19,480
  • 39
  • 187
  • 340

2 Answers2

0

I don't think you should look for such functionality in the OPC UA library. The XML generator exists because it reads a standardized OPC UA schema to create models (Read more https://open62541.org/doc/current/nodeset_compiler.html).

You have to write such a generator yourself.You can read how the schema is structured here: https://github.com/OPCFoundation/UA-ModelCompiler/blob/master/ModelCompiler/UA%20Model%20Design.xsd

Boslx
  • 81
  • 6
0

You could look at UAModeler from Unified Automation. It can auto gen code from a model. There are other tools like this from other vendors... I don't know of any technology that can create a UA server from existing java/C++/Phython classes

  • I'm not looking to manually generate "static" class that I should then use, I'm more looking in a way to give myself to OPC UA foundation the model it should use. The server implementation is not really part of this question, we will implement our own based on the OPC foundation framework. – J4N Nov 05 '18 at 20:38
  • Please clarify "give myself to OPC UA foundation the model it should use" – John Gillerman Nov 06 '18 at 21:40