3-phase PV router
Loading...
Searching...
No Matches
relay_engine.h File Reference

Decisions of the relay diversion: which relay switches, and when. More...

#include <stdint.h>
#include "config_system.h"
#include "type_traits.hpp"
#include "ewma_avg.hpp"
#include "utils_bits.h"
Include dependency graph for relay_engine.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  RelayLogic::Engine< R, N, D >
 A collection of relays, switched one at a time from a sliding average. More...
 
struct  RelayLogic::NoOutput
 The default output of a relay: none, the state only. More...
 
class  RelayLogic::Relay< Output >
 The state of one relay, and its decisions. More...
 

Namespaces

namespace  RelayLogic
 The relay engine without its I/O.
 

Detailed Description

Decisions of the relay diversion: which relay switches, and when.

Author
Frédéric Metrich (frede.nosp@m.ric..nosp@m.metri.nosp@m.ch@l.nosp@m.ive.f.nosp@m.r)
Version
0.1
Date
2026-11-21

The relay engine without its I/O: the thresholds, the minimum ON and OFF times, the settle time after any relay change, the order the relays come in and go out, and the EWMA average they decide on. On each change, the relay calls the switched() of its Output type, which drives the pin in the firmware (utils_relay.h). Its native tests are in test/native/test_relay_engine.

Note
This header has no Arduino dependency (its whole include closure is plain C++).

Definition in file relay_engine.h.