This repository holds a tiny C REDAC (short tcredac) interface and simulator. It has the following jobs (sorted by priority for the author):
- Provide a TCP/IP client library for the json-lines protocol to the REDAC/LUCIDAC microcontroller. This is a header-only library with no external dependencies (beyond standard STL/libc) and no exclusive build system. See below for the details.
- Provide a simple simulator of the REDAC, using explicit runge-kutta like time stepping for solving the equivalent differential equation (implicitely given by the wiring).
- Provide a TCP/IP server library to the json-lines protocol so the simulator can act like a LUCIDAC/REDAC in the network. This emulation is only implemented covering the most relevant features.
- Provide a small demonstrator executable for the client library, using the client library and providing a simple access via a scripting language similar to the one used by pyanabrid. Obviously that executable can also be used to target the simulator.
Guiding idioms
- No shared codebase with the C++/Arduino firmware code which runs on the Teensy. Do not confuse this code with that firmware.
- Keep it simple, stupid. Nothing fancy in terms of asynchronous code, threading or similar.
- Uses modern C++17 or similar.
- No external dependencies, no Boost, no complex include paths, no subdirectories.
- No opt-in for a particular build system. A simple Makefile is included for getting started.
- Aims for simple embedding in existing codes.
- Aims for providing a library, not a framework.
- Maximizes compatibilty with any compiler and host structure.
- In case of doubt, this is more a demonstrator and lesser a tool.
The network client: libredac++ and redacpp
This is the place where the C++ client implementation of the REDAC communication protocol is implemented. The purpose of this code is to be run on Linux/Mac/Windows Host PCs oder Servers in order to communicate to the REDAC Teensy Microcontroller via the TCP/IP JSON protocol.
The naming is obviously a pun on redac and c++.
Hint: Do not confuse this code with the C++ Firmware code which runs on the Teensy.
Libraries used
See also
See issues in https://lab.analogparadigm.com/lucidac/software/redacpp
Other parts
To be described here.