satellite: expose active TG filter in statusJson

When a satellite advertises a SATELLITE_FILTER via MsgTrunkFilter, the
parent-side SatelliteLink now emits it as satellites[<id>].filter in
its JSON status. Key is omitted when no filter is set (empty => all TGs
pass), so existing consumers that check for its absence keep working.

This single field propagates to three observer surfaces for free:
  - HTTP /status — Reflector::refreshStatus() copies statusJson() into
    m_status["satellites"].
  - Redis live snapshot — statusChanged -> publishSatelliteStatusToRedis
    reserializes statusJson() to live📡<id> on every filter
    change (handleMsgTrunkFilter already emits statusChanged).
  - MQTT retained "status" topic — the periodic publishFullStatus(m_status)
    timer includes the same JSON.

Passive propagation only — no dedicated MQTT filter-change event.
Follow-up work if active notifications are needed: emit a
satellite/<id>/filter topic from handleMsgTrunkFilter.
This commit is contained in:
Audric committed 2026-04-20 14:54:19 +02:00
1 parent de47c62dfa
commit bf74bbdc78
1 file changed
+5
+5
View File
@@ -54,6 +54,11 @@ Json::Value SatelliteLink::statusJson(void) const
active_tgs.append(tg); active_tgs.append(tg);
} }
obj["active_tgs"] = active_tgs; obj["active_tgs"] = active_tgs;
if (!m_tg_filter.empty())
{
obj["filter"] = m_tg_filter.toString();
}
return obj; return obj;
} /* SatelliteLink::statusJson */ } /* SatelliteLink::statusJson */