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:
1 parent
6b7a1f0306
commit
688a62ec5b
10 files changed
+299
-33
No files matched your search
@@ -78,6 +78,11 @@ class RedisStore : public sigc::trackable
|
||||
const std::string& codecs,
|
||||
uint32_t current_tg);
|
||||
void clearLiveClient(const std::string& callsign);
|
||||
// Publish the rich per-client status blob (rx levels, monitoredTGs,
|
||||
// qth/location etc.) as a serialized JSON string in the `status`
|
||||
// field of the existing live:client:<callsign> hash.
|
||||
void pushClientStatus(const std::string& callsign,
|
||||
const std::string& status_json);
|
||||
void pushLiveTrunk(const std::string& section,
|
||||
const std::string& state,
|
||||
const std::string& peer_id);
|
||||
|
||||
Reference in new issue
Block a user