Skip to content
Open Source C++ OPC-UA Server and Client Library
C++ Python CMake Makefile M4 Shell Other
Branch: master
Clone or download

Latest commit

ralf1070 Travis (#346)
* enable VERBOSE option in travis
* fix GUID test
Latest commit da2b76f Oct 10, 2019


Type Name Latest commit message Commit time
Failed to load latest commit information.
debian Fix Debian build. Oct 2, 2017
include/opc make it compile with boost >= 1.66.0 (#324) Jan 25, 2019
python Devel (#345) Oct 10, 2019
schemas reduce stack impact of initialisation Oct 2, 2017
src Devel (#345) Oct 10, 2019
tests Travis (#346) Oct 10, 2019
.gitignore Devel (#345) Oct 10, 2019
.travis.yml Travis (#346) Oct 10, 2019
AUTHORS merge Nov 9, 2014
CMakeLists.txt Devel (#345) Oct 10, 2019
COPYING New sources structure. Jun 22, 2014
ChangeLog New sources structure. Jun 22, 2014
Dockerfile Adds a dockerfile Jul 3, 2015 debug errors with linux compilation Nov 3, 2017
NEWS New sources structure. Jun 22, 2014 Consistent C++ styling (#243) May 30, 2017
StatusCodes.csv Node ids are generated. Updated standard address space to have predef… Nov 14, 2014
astylerc Consistent C++ styling (#243) May 30, 2017 merge Aug 7, 2014 Refactored headers. There were repitition in names: sunscriptions.h a… Aug 10, 2014 cleanup autoreconf autogenerated files Nov 3, 2017
debian.soft New sources structure. Jun 22, 2014 Add Cflags lines to files Sep 25, 2015 Add Cflags lines to files Sep 25, 2015 Add Cflags lines to files Sep 25, 2015 Add Cflags lines to files Sep 25, 2015 New sources structure. Jun 22, 2014
restyle Consistent C++ styling (#243) May 30, 2017

Open Source C++ OPC-UA Server and Client Library

Build Status

LGPL OPC-UA server and client library written in C++ and with a lot of code auto-generated from xml specification using python.

Python bindings can be found in the python directory.

mailing list:!forum/freeopcua

Currently supported:

  • read, write, browse
  • translateBrowsePathToNodeId
  • DataChange Events
  • Events
  • Subscriptions
  • complete opc-ua address space generated from xml specification
  • Method call from client
  • Linux and Windows(VS13) support

Work in progress

  • StatusChange Events
  • Filtering
  • Documentation
  • Automatic generation of binary protocol from OPC schema files
    • Methods on server side

Not implemented yet (patches are welcome)

  • History
  • Security: Authentication, Certificates handling, ..


Documentation is sparse but several examples are availables:

C++ examples in
Python examples in can also be a usefull source of information

Example minimal client in python

  client = opcua.Client(False)

  objects = client.get_objects_node()
  print("Children of objects are: ", objects.get_children())

  var = objects.get_child(["3:AnObject", "AVariable"])
  print("Value of variable is: ", var.get_value())

Tested clients and servers with default settings

  • uaexperts client application
  • node-opcua (client and server tested)
  • ignition server
  • Beckhoff PLC (seems to be some issues, but mostly working)
  • ignition open-source sdk (server tested)
  • quickopc client sdk
  • prosysopc demo client
  • prosysopc demo server
  • unified automation sdk (client and server tested)


An environment supporting c++11 is necessary: gcc-4.8+, clang 3.4 or VS2013

Ubuntu (Debians)

There is a script debian.soft in the root for installing all required soft to build all repositories.

Using GNU autotools

autoreconf -f -i
./configure --prefix=/path/to/server
make check
make install
cd /path/to/server
LD_LIBRARY_PATH=./lib ./bin/opcuaserver

Using cmake


mkdir build
cd build
cmake ..
make test


Boost and libxml2 are necessary

rem compiling
mkdir build
cd build
cmake .. -DBOOST_ROOT=c:\boost_1_56
cmake --build
ctest -C Debug
cd bin\Debug


docker build .


C++ style

  • 2 spaces not tab
  • CamelCase
  • Local variables start with small letter
  • Global/member variables starts with capital letters
  • Use provided automatic formatter (Artistic Style) by invoking ./restyle

python code and API should follows PEP8 (many places should be fixed)

Address space and most protocol code are auto-generated and should not be modified directly. Every auto-generated file starts with a mention that it should not be edited. There's a lot of old hand written protocol code left that should use the auto-generated code. This is done by uncommenting struct names in schemas/ and removing old code and files in src/protocol and include/opc/ua/protocol/

You can’t perform that action at this time.