Implementation OPC UA

UA APIs are available in several programming languages. Commercial SDK are available for C, C++, Java, and .NET. Open-source stacks are available at least for C, C++, Java, Javascript(node) and Python.

C++ Implementation

  • The open62541 project provides an Open Source implementation for OPC UA server and clients and is licensed under the Mozila Public Licence v2.0. Besides Linux and Windows, it also supports OS X, QNX and different embedded systems as compilation target.

  • The ASNeG project provides a C++ open source (Apache License 2.0) OPC UA Application Server and an OPC UA Web Server (beta state, currently only base functions).

  • The FreeOpcUa project provides an open source (LGPL) server and client implementation in C++.

  • The UAF project offers an open source (LGPL) C++/Python implementation .

.NET implementation

The .NET implementation uses ANSI C for the lower levels and implements the rest natively in .NET. That means only the handling of the socket and the Message-Chunking gets integrated from the ANSI C stack. De-serialization takes place directly in .NET and therefore gets converted directly into .NET structures and objects. This provides better performance than de-serializing into a C structure first and then copying the data to a .NET structure afterwards.

simpe implement by me here : https://github.com/msnmkh/OPCUA

Java implementation

Various stacks for Java were being developed.Similar to .NET, there are principally three variants:

  1. Encapsulate the complete ANSI C stack via JNI, which complicates portability. Although the stack can be ported to different operating systems, it needs to get compiled for those individually. Also, the data needs to get copied to the JNI boundary, but benefits from the performance of C during de-serialization.

  2. Code directly on the network layer (similar to the current .Net implementation) and de-serialize in Java. This saves one data copy execution, but still depends on the C stack.

  3. Write a native Java OPC UA stack. This was observed to be the most portable, but estimated to take the most engineering effort to implement. The Eclipse Milo project provides a pure-Java, open-source, implementation of the UA 1.03 client and server specification.

Alternatively, there is the simple variant to only support the WebService protocol. For that, a SOAP Toolkit that supports WS-Security is needed.

Python implementation

The FreeOpcUA project provides an implementation entirely in the Python programming language (compatible with Python 2, 3 and pypy) and provides high-level abstractions of an OPC-UA client and server which can be used as is or readily extended for custom applications.

Last updated