We have open sourced a compact and simple dataflow programming library in C++ intended for hard real-time embedded systems as well as general-purpose applications. It is dependency-free, single-header-only, and runs anywhere out of the box. Behold the Real-time Actor-based Message Exchange Network :
Hereβs the idea:
ββββββββββ
(float) β Summer β (float)
in_a ββββββββββ€ ββββββββββ out_sum
β β
(float) β β
in_b ββββββββββ€ β
ββββββββββ
struct Summer
{
ramen::Puller<float> in_a;
ramen::Puller<float> in_b;
ramen::Pullable<float> out_sum = [this](float& out) { out = *in_a + *in_b; };
};
A detailed walkthrough with examples is available from the repo.