|
3-phase PV router
|
Unit grouping and payload bookkeeping for remotely controlled loads. More...


Go to the source code of this file.
Classes | |
| class | RemoteLoadCore< NumUnits > |
| Builds and schedules the RF payloads of every remote unit. More... | |
| struct | RemoteUnitState |
| Transmission bookkeeping for one remote unit. More... | |
Functions | |
| template<uint8_t NumIds> | |
| constexpr bool | areValidNodeIds (const uint8_t(&nodeIds)[NumIds], uint8_t numUnits, uint8_t routerId) |
Check the node IDs of the first numUnits remote units. | |
Variables | |
| constexpr uint8_t | REMOTE_REFRESH_CYCLES { 5 } |
Unit grouping and payload bookkeeping for remotely controlled loads.
Given the load map (see load_map.h) and the current state of every dump load, this builds one RF payload per remote unit and decides when a transmission is due. It knows nothing about the radio itself: the actual send lives in remote_loads.h, outside the ISR.
Each unit is sent one byte, one bit per load: **bit b of a unit's payload is the b-th load of that unit in ascending physicalLoadPin[] order.** The receiver must agree.
A payload is transmitted when it changes, and otherwise refreshed every REMOTE_REFRESH_CYCLES mains cycles so a receiver that missed a packet - or was powered up late - converges within 100 ms.
<stdint.h> and load_map.h) so it can be exercised by the native test suite. Definition in file remote_loads_core.h.
|
constexpr |
Check the node IDs of the first numUnits remote units.
Each must lie in 1..30, differ from the router's own ID, and be unique.
| nodeIds | Node ID table, unit 1 first. |
| numUnits | Number of units actually addressed. |
| routerId | Node ID of the router itself. |
Definition at line 48 of file remote_loads_core.h.

|
inlineconstexpr |
send a refresh every N mains cycles
Definition at line 36 of file remote_loads_core.h.