quasar
quasar is a framework for rapidly developing OPC UA (Open Platform Communications Unified Architecture) servers. It provides tools and abstractions to simplify the process of creating industrial-grade OPC UA servers, which are widely used for secure, reliable data exchange in industrial automation and IoT applications. The quick opcua server generation framework.
For quick start-up, see our YouTube tutorial
Primary contact: quasar-developers@cern.ch
Versions
Credits
This framework was developed through the collaborative efforts of the following:
- Paris Moschovakos (paris.moschovakos@cern.ch):
quasar lead
Embedded and ARM64
quasar.docs.cern.ch
UaObjects, Cacophony
quasar Sanitizers
mule (SNMP optional module)
- Piotr Nikiel (piotr.nikiel@cern.ch, piotr@nikiel.info):
Framework’s concept and architecture and code-generation
Address Space, Device and Configuration generation (XSLTs, design files, scripts, Jinja2-based rewrite)
CMake-based build system
RPM generation for Linux
Documentation and screencasts
Build configurations for Raspberry Pi, Zynq and MSVC10 on Wine
Yocto and PetaLinux support
CalculatedVariables, Cacophony, UaObjects…
quasar lead from its ground zero (2014) until Sep 2022
- Stefan Schlenker (stefan.schlenker@cern.ch)
Use cases, ideas, optional modules mechanism
- Benjamin Farnham (benjamin.farnham@cern.ch):
LogIt logging engine
Meta module
Use cases & ideas
- Damian Abalo Miron (damian.abalo@cern.ch)
Windows compatibility and MSVC10 support
Python-based scripts and tools
- Ingo Berg (external contributor not affiliated with CERN)
muParser formula parser and evaluation engine, used by the CalculatedVariables and shipped with quasar. (muParser’s webpage)
- Viatcheslav “Slava” Filimonov (viatcheslav.filimonov@cern.ch):
XML Configuration (inspiration)
Calculation engine (inspiration)
Node manager
- Cristian-Valeriu Soare
Embedded python module (PyEmbed)
- Giordon Holtsberg Stark
quasar with Yocto on a “big” Zynq SoCs: ideas, consulting, development, testing
Installation and Dependencies
Note: we have specific instructions for the following operating systems:
AlmaLinux / RHEL (and dependent distributions): - version 9 (e.g. AlmaLinux 9, RHEL 9, …),
For remaining systems (other distros of Linux, other Unix, embedded Linux: PetaLinux, Yocto)
Mandatory:
C++ compiler with C++11 support (gcc 11.x is the minimum)
OPCUA protocol stacks / toolkits (either of them is needed): - see More info on alternative backends.
Boost development libraries. (In principle, boost-regex, boost-devel, boost-thread and boost-program-options should be sufficient).
Python3 (3.6 is what we use at minimum) and some libraries (Jinja2, colorama, lxml, pygit2)
cmake3, version 3.10 + (for older versions you could try older quasar versions)
kdiff3 for occasional merges.
Recommended:
Schema-aware XML editor for editing the design file. We use either of: - Eclipse - VS Code
Good C++ development environment (or IDE, …). The core quasar team uses VS Code.
Good merge tool. We use kdiff3 (available as kdiff3 RPM in SLC6 Linux).
ArtisticStyle ( http://astyle.sourceforge.net/ ) for automatic formatting of generated code. If you don’t use it, the generated code will look like a shipwreck (but will still work). Astyle is easy to get (e.g. standard in Ubuntu) so get it.
graphviz, if you want to visualize your object design in UML-alike class diagram.
UnifiedAutomation UaExpert or any other OPC UA Client for exploring OPC UA address space.
Valgrind, for checking memory-related problems
PDF viewer for opening UML-like diagrams created from design file.
Doxygen for generating documentation.
RPM Build tools for RPM generation
Quick setup hints for AlmaLinux 9 (the most standard way)
Install latest epel realease
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
Install packages from AlmaLinux 9 default repos:
sudo dnf install git patch python3-colorama python3-jinja2 python3-lxml cmake3 gcc-c++ boost-devel graphviz ninja-build xsd xerces-c-devel libxml2-devel openssl-devel doxygen astyle
Download UaExpert for an universal test&dev tool for OPC UA.
Quick setup hints for Ubuntu 24.04 LTS
Deploy from standard Ubuntu repos
sudo apt install cmake g++ libboost-all-dev libxml2-utils astyle xsdcxx libxerces-c-dev libssl-dev kdiff3 default-jre libxml2-utils python-enum34 python-lxml python3-pip
Deploy Jinja2
pip3 install -U Jinja2 --user
Setup for Windows users
Tutorial
Optional modules
quasar build system
Calculated Variables
Logging
Frequently Asked Questions (FAQ)
How to build an executable with debug symbols?
Just append Debug to your “quasar.py build” invocation, i.e.:
./quasar.py build Debug
Build fails
Try to read carefully the output. If you can’t figure the issue on your own, try contacting quasar-developers@cern.ch
quasar (itself) misbehaves (not to confuse with quasar-made OPC UA components). What can I do?
You can increase verbosity of quasar tooling itself. This might point you to a problem (e.g. file permissions issues) or can help quasar developers diagnose the problem. The verbosity is controlled by environment variable called “QUASAR_LOG_LEVEL” and the most relevant levels are “INF” (the default, about no debug) and “DBG” (a lot of debug). If you use bash, you can increase the verbosity by invoking:
export QUASAR_LOG_LEVEL=DBG
Sometimes quasar tooling (e.g. anything you run via quasar.py command) will terminate with error. We did pay attention to be verbose enough but sometimes it might help to drop in the Python Debugger (pdb) to debug post-mortem rather than to drop to shell. This can be achieved by exporting the variable QUASAR_RUN_PDB to 1, e.g. in bash:
export QUASAR_RUN_PDB=1
The general support email is quasar-developers@cern.ch. You can get some support there or you can file a bug ticket directly via GitHub.
How to create a RPM/MSI/DEB package with my OPCUA server? CPack fits very well into the provided quasar build system and RPM/MSI are known to work well with quasar.
- How to upgrade to newer release of quasar?
Download/checkout quasar in the version of your choice
Execute quasar.py upgrade_project which is in its root directory, passing path to your project to be upgraded as the first parameter:
./quasar.py upgrade_project <path>
Can I use evaluation version of the UA Toolkit to create an OPC UA server using this framework?
You can. Note that for many basic features you can use free and open-source open62541-compat backend instead of the paid UA Toolkit, see More info on alternative backends.
How does a developer define specific command line options for my quasar server implementation? This is documented here: User Defined Command Line Parameters
How does a developer define a dynamic (at start up) configuration? For example, where the server ‘discovers’ connected hardware on start up. This is documented here: User Defined Runtime Configuration
How does a developer persist a ‘discovered’ configuration as described above? For example, where the server ‘discovers’ connected hardware initially and saves it for use thereafter as a static configuration. This is also documented here: User Defined Runtime Configuration
How do I link libraries, add include directories, use build configurations etc… ? See build system doc.
Contributing
We welcome contributions to quasar! Whether you’re fixing bugs, improving documentation, or proposing new features, your input is valuable. Please contact quasar-developers@cern.ch for more information on how to get started or to discuss your ideas.
Report inconsistencies and bugs to <quasar-developers@cern.ch>
© CERN 2015-2024. All rights not expressly granted are reserved.