Tango C++ Reactive Programming

Hi all,

I wanted to share a follow-up to my Tango Users Group Meeting 2026 talk on applying ReactiveX principles to Tango/EPICS/TINE/etc control-system programming.

I have now added C++ support to rx-controls-suite.

The suite already had Tango support in Java/Python, EPICS support in Python, and TINE support in Java. The missing piece was C++, even though C++ is the native language of cppTango and many real Tango device servers and middleware components.

The new work adds:

  • RxTango/cpp

  • RxEpics/cpp

The goal is to expose cppTango as reactive rxcpp::observable<T> streams, aligned with the existing Python design.

The broader idea is not “another client API.” The goal is to build a shared vocabulary for common control-system recipes:

  • polling and monitoring;

  • combining values into atomic snapshots;

  • shared health streams;

  • fault handling;

  • guarded scans;

  • acquisition logic;

  • cross-SCADA coupling.

In other words: instead of every project writing its own loops, buffers, timestamp matching, callbacks, and error-handling glue, we can express these patterns as composable reactive pipelines.

Repository:
https://github.com/scientific-software-hub/rx-controls-suite

I would be very interested in feedback from people working with cppTango, PyTango, device servers, acquisition scripts, or high-level automation:

Does a reactive recipe layer around Tango sound useful?

And which recurring Tango control pattern would be worth turning into a reusable recipe first?

Following up on the reactive programming talk from the User Meeting: a few people mentioned the code was hard to follow without a proper introduction to the reactive style first, which is fair feedback.

I put together a short primer to address that: Reactive Programming, Explained With Marbles

It walks through one real function from the suite’s demo (a shutter that closes and reopens automatically on beam loss), shows the imperative version most of us would already write, then the reactive version line by line next to it, then the same logic as a marble diagram, then a short live run. About ten minutes end to end.

Curious whether this makes the operators easier to follow than the talk slides did. Feedback welcome, especially if something still doesn’t click.