opex62541 Logo


Valiot Logo

Opex62541 is an Elixir wrapper for the open62541 library; open62541 is an open-source implementation of OPC UA (OPC Unified Architecture) aka IEC 62541 licensed under Mozilla Public License v2.0.

Content

Features

This library implements the following features from open62541:

Installation

To install this package, add opex62541 to your list of dependencies in mix.exs:

def deps do
  [
    {:opex62541, git: "https://github.com/valiot/opex62541"}
  ]
end

Compatibility

Opex62541 was developed for open62541 "1.0.0" with Elixir 1.10.0. It was tested on:

Adding the following opex62541 dependencies to build the package:

sudo apt-get install git build-essential gcc pkg-config cmake python libmbedtls-dev

Nerves

Nerves is a complete IoT platform and infrastructure to build and deploy maintainable embedded systems to boards such as Raspberry Pi or Beaglebone.

To add opex62541 dependency (mbedtls) to your Nerves project, you need to create a Nerves Custom System and add the following lines to the nerves_defconfig file:

BR2_PACKAGE_MBEDTLS=y
BR2_PACKAGE_MBEDTLS_COMPRESSION=y

Customized builds

By default, Opex62541 downloads and compiles the v1.0 release of open62541. If you want to compile it manually or change the default version, use the following example commands to set the desired env variables:

export MANUAL_BUILD=true

export OPEN62541_DOWNLOAD_VERSION=v1.0.1

The open62541 project uses CMake to manage the build options for code generation and to generate build projects for the different systems and IDEs. To overwrite the default options, use OPEN62541_BUILD_ARGS as follows:

export OPEN62541_BUILD_ARGS='-DCMAKE_BUILD_TYPE=Release -DUA_NAMESPACE_ZERO=MINIMAL'

Default values for OPEN62541_BUILD_ARGS are -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_NAMESPACE_ZERO=FULL -DUA_LOGLEVEL=601 -DUA_ENABLE_DISCOVERY_MULTICAST=ON -DUA_ENABLE_AMALGAMATION=ON -DUA_ENABLE_ENCRYPTION=ON.

Docker Container

To build the container locally use:

git clone https://github.com/valiot/opex62541
cd opex62541
docker build -t <name:tag> .

You can use this container to test this application.

Documentation

For detailed documentation and tutorials refer to hexdocs.pm.

Contributing

If you wish to clone this repository, use:

git clone https://github.com/valiot/opex62541.git

License

See LICENSE.

TODO