reactor-c 1.0
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
reactor-c
Note
The reactor-c runtime system for Lingua Franca is the system used when you specify as your target C, CCpp, or Python. While it is theoretically possible to use reactor-c alone by writing applications in C, it is meant to be used via the Lingua Franca coordination language together with its code generator, lfc.

The documentation here is generated automatically from the C source code using Doxygen. Higher-level user documentation and getting-started information can be found on the lf-lang.org website, with details about the C runtime on the target language details page.

Note
The most useful entry point to this documentation is likely the topics page. The API subpage describes the API used in writing reactors. The Utilities subpage describes various utilities that may help with writing reactors.

Overview

When you specify

target C

then a C compiler (such as gcc) will be used. If you specify

target CCpp

then a C++ compiler (such as g++) will be used. In this case, your reaction bodies can written in C++ and you can include and link to C++ code. Unlike the Cpp target, you will still access the LF API through the C API documented here.

When you specify

target Python

then lfc will generate a Python program that uses this reactor-c runtime under the hood.

Supported Platforms

The C, CCpp, and Python targets are tested nightly on Linux, macOS, and Windows (with WSL). The federated programs are tested on Linux and macOS only.

For embedded platforms, there is support for C on Arduino and Zephyr, plus bare-metal (unthreaded) execution on the Raspberry Pi RP2040, nRF52, FlexPRET, and Patmos. For bare-metal, Zephyr, and RIoT, consider using the reactor-uc target instead.