Code Monkey home page Code Monkey logo

opcua-primer's Introduction

It seems the sanest way (from a human perspective) of modelling an OPC-UA server is to create a (relatively) simple XML file describing data and relations (the "model design" format), convert it into another more machine-oriented XML file (the "NodeSet2" format) and then generate from it the C code to be linked against other server code.

The conversion from model design to NodeSet2 is performed by UA-ModelCompiler, a tool officially endorsed by the OPC foundation, while the generation of the C code from NodeSet2 is performed by nodeset_compiler.py, a Python script provided by the awesome Open62541 project.

While nodeset_compiler.py, apart from being included in PATH, does not require any particular processing, the UA-ModelCompiler is strongly geared towards Windows/DotNet and it is in general quite unpleasant to work with. In other words, compiling model designs on GNU/Linux systems is a nightmare.

The only documentation I found is the OPC-UA information model tutorial, which provides a strong foundation for understanding the whole process but the commands reported there for converting the model design simply do not work on my system (ArchLinux current).

After a lot of trials and errors, I came up with a solution based on docker that does not require building and installing UA-ModelCompiler natively. See the Makefile for the gory details.

The sample model design used here is an adaptation of the work done by Industry40tv on its YouTube tutorial: check it out for a really good introduction.

opcua-primer's People

Contributors

ntd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bkt-it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.