Warning: This is an old version. The latest stable version is Version 10.0.0.

Quick Start


You will need a valid license to access and use the library. For more information on how to obtain a license, visit https://steinwurf.com/license.

If you already installed a C++14 compiler, git and python on your system, then you can clone this repository to a suitable folder:

git clone git@gitlab.com:steinwurf/otacast.git

After cloning the repository you will have the latest development snapshot. Unless you need to work on the latest and greatest we recommend that you switch to a released version of the library.

cd otacast
git checkout 

Using the Waf buildsystem

Waf is the primary buildsystem used at Steinwurf use this to build the library along with the tests, examples, and application.

Configure and build the project:

python waf configure
python waf build
python waf install --destdir=otacast_install

The final install step will create a folder containing all the nessecary files needed to use the library (e.g. static library, headers etc.). You can change the output folder by passing a different path to --destdir. You can also copy/move this install folder anywhere you like.

Use as Dependency in CMake

To depend on this project when using the CMake build system, add the following in your CMake build script:

add_subdirectory("/path/to/otacast" otacast)
target_link_libraries(<my_target> steinwurf::otacast)

Where <my_target> is replaced by your target.

Build example

To create your first “hello world” program using OTAcast you can try the following:

// with the Software (see accompanying file LICENSE.rst or
// https://www.steinwurf.com/license), unless otherwise different
// terms and conditions are agreed in writing between Licensee and
// Steinwurf ApS in which case the license will be regulated by that
// separate written agreement.
// License for Non-Commercial Usage
// Distributed under the "OTACAST RESEARCH LICENSE 1.2"
// Licensees holding a valid research license may use this project
// in accordance with the license agreement terms provided with the
// Software
// See accompanying file LICENSE.rst or https://www.steinwurf.com/license

#include <iostream>

#include <otacast/encoder.hpp>
#include <otacast/to_string.hpp>
#include <otacast/version.hpp>

int main()
    // Print the version of the library used

    // Create the encoder object with a specific finite field
    otacast::encoder encoder;

    otacast::finite_field field = otacast::finite_field::binary8;
    std::size_t block_bytes = 1024 * 1000; // 1 MB
    std::size_t symbol_bytes = 1500;
    std::size_t width = 5;

    encoder.configure(field, block_bytes, symbol_bytes, width);

    std::cout << "version:      " << otacast::version() << "\n";
    std::cout << "block_bytes:  " << encoder.block_bytes() << "\n";
    std::cout << "symbol_bytes: " << encoder.symbol_bytes() << "\n";
    std::cout << "width:        " << encoder.width() << "\n";
    std::cout << "symbols       " << encoder.symbols() << "\n";
    std::cout << "field         " << otacast::to_string(encoder.finite_field())
              << "\n";
    return 0;

To compile with g++ (if you installed to the otacast_install local folder):

g++ main.cpp -std=c++14 -I otacast_install/include -L otacast_install/lib -lotacast

See the full API provided by the class encoder and class decoder objects to see all available operations.