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
@@ -1016,6 +1016,7 @@ void ReflectorClient::handleNodeInfo(std::istream& is)
|
||||
<< "]: Failed to parse MsgNodeInfo JSON object: "
|
||||
<< e.what() << std::endl;
|
||||
}
|
||||
if (m_reflector != nullptr) m_reflector->publishClientStatus(this);
|
||||
} /* ReflectorClient::handleNodeInfo */
|
||||
|
||||
|
||||
@@ -1433,6 +1434,7 @@ void ReflectorClient::setMonitoredTGs(const std::set<uint32_t>& tgs)
|
||||
monitored_tgs.append(tg);
|
||||
}
|
||||
}
|
||||
if (m_reflector != nullptr) m_reflector->publishClientStatus(this);
|
||||
} /* ReflectorClient::setMonitoredTGs */
|
||||
|
||||
|
||||
@@ -1467,6 +1469,7 @@ void ReflectorClient::setTg(uint32_t tg)
|
||||
}
|
||||
|
||||
updateIsTalker();
|
||||
if (m_reflector != nullptr) m_reflector->publishClientStatus(this);
|
||||
} /* ReflectorClient::setTg */
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user