publishing: MQTT works in satellite mode + Redis publishes per-client status blob

- Move MQTT init above the satellite early-return in Reflector::initialize so
  satellite-mode reflectors publish to MQTT (client connect/disconnect, talker
  events, full status, etc.) just like full reflectors.
- Add reflector-sat (SATELLITE_OF=reflector-a) to the default test compose so
  satellite mode is exercised end-to-end. New test_31 verifies MQTT
  client-connect/disconnect events under the satellite's own topic prefix.
- Add RedisStore::pushClientStatus and Reflector::publishClientStatus to write
  the per-client status JSON (qth, rx siglev/sql_open/enabled/active,
  monitoredTGs, selected TG, ...) to live:client:<callsign>.status. Hooked
  from publishRxUpdate, handleNodeInfo, setMonitoredTGs, and setTg.
- New Redis test_live_client_status_blob sends a synthetic MsgNodeInfoV2 with
  qth+rx and asserts the parsed blob contains the expected fields.

31/31 trunk + 10/10 twin + 14/14 redis pass.
This commit is contained in:
Audric committed 2026-04-17 01:05:37 +02:00
1 parent 6b7a1f0306
commit 688a62ec5b
10 files changed
+299 -33

No files matched your search

+3
View File
@@ -260,6 +260,9 @@ class Reflector : public sigc::trackable
void forwardFlushToSatellitesExcept(SatelliteLink* except, uint32_t tg);
void publishRxUpdate(ReflectorClient* client);
// Push the rich per-client status blob (rx, monitoredTGs, qth, ...)
// to Redis. Cheap no-op if Redis is not configured.
void publishClientStatus(ReflectorClient* client);
void onClientAuthenticated(const std::string& callsign, uint32_t tg,
const std::string& ip);
void notifyExternalTrunkTalkerStart(uint32_t tg,