|
|
|
|
@ -1408,10 +1408,11 @@ class BridgeUseCases:
|
|
|
|
|
slot,
|
|
|
|
|
_inthops,
|
|
|
|
|
)
|
|
|
|
|
# INGRESS: debug-only (all OBP legs); monitor logs it but does not update OPENBRIDGES chips until START.
|
|
|
|
|
if _do_report and self._report_factory and hasattr(self._report_factory, "send_bridge_event"):
|
|
|
|
|
try:
|
|
|
|
|
self._report_factory.send_bridge_event(
|
|
|
|
|
"GROUP VOICE,START,RX,{},{},{},{},{},{}".format(
|
|
|
|
|
"GROUP VOICE,INGRESS,RX,{},{},{},{},{},{}".format(
|
|
|
|
|
system_name, int_id(stream_id), int_id(peer_id), int_id(rf_src), slot, int_id(dst_id)
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
@ -1442,6 +1443,7 @@ class BridgeUseCases:
|
|
|
|
|
st["LAST"] = pkt_time
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
st = status[stream_id]
|
|
|
|
|
hr_times: dict[str, float] = {}
|
|
|
|
|
_sysslot_last = 0
|
|
|
|
|
for other_name, proto in (protocols or {}).items():
|
|
|
|
|
@ -1502,9 +1504,6 @@ class BridgeUseCases:
|
|
|
|
|
call_duration,
|
|
|
|
|
)
|
|
|
|
|
st["LOOPLOG"] = True
|
|
|
|
|
# Report END,TX (not END,RX): this OBP lost loop race; the call may continue on the winning OBP.
|
|
|
|
|
# END,RX would (a) spam Last Heard with 0s "ends" and (b) make the monitor pop stream_id from
|
|
|
|
|
# every OPENBRIDGES row (rts_update global END,RX), clearing the dashboard before VTERM.
|
|
|
|
|
if _do_report and self._report_factory and hasattr(self._report_factory, "send_bridge_event"):
|
|
|
|
|
try:
|
|
|
|
|
self._report_factory.send_bridge_event(
|
|
|
|
|
@ -1530,6 +1529,8 @@ class BridgeUseCases:
|
|
|
|
|
st["_bcsq"] = True
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
# Legacy skips packet control on the first frame of a stream (else branch only on 2nd+ packet).
|
|
|
|
|
if st.get("packets", 0) > 0:
|
|
|
|
|
_elapsed = pkt_time - st["START"]
|
|
|
|
|
if _elapsed > 0 and st["packets"] > 18 and (st["packets"] / _elapsed) > 25:
|
|
|
|
|
logger.warning(
|
|
|
|
|
@ -1576,8 +1577,6 @@ class BridgeUseCases:
|
|
|
|
|
((st["loss"] / st["packets"]) * 100) if st.get("packets") else 0.0,
|
|
|
|
|
)
|
|
|
|
|
return False
|
|
|
|
|
# Match intent of legacy `seq > 0 and crc in set`, but also drop seq==0
|
|
|
|
|
# retransmissions of the same 53-byte frame (seq is falsy so duplicate-seq check misses).
|
|
|
|
|
if _pkt_crc in st["crcs"]:
|
|
|
|
|
st["loss"] += 1
|
|
|
|
|
logger.debug(
|
|
|
|
|
@ -1605,6 +1604,19 @@ class BridgeUseCases:
|
|
|
|
|
st["lastSeq"] = seq
|
|
|
|
|
st["lastData"] = data
|
|
|
|
|
|
|
|
|
|
# Canonical START,RX for monitor CTABLE (OpenBridge / Linked / Active QSO) after loop win; INGRESS was debug-only.
|
|
|
|
|
if _do_report and self._report_factory and hasattr(self._report_factory, "send_bridge_event"):
|
|
|
|
|
if not st.get("_monitor_canonical_rx"):
|
|
|
|
|
try:
|
|
|
|
|
self._report_factory.send_bridge_event(
|
|
|
|
|
"GROUP VOICE,START,RX,{},{},{},{},{},{}".format(
|
|
|
|
|
system_name, int_id(stream_id), int_id(peer_id), int_id(rf_src), slot, int_id(dst_id)
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
st["_monitor_canonical_rx"] = True
|
|
|
|
|
except Exception:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
st = status[stream_id]
|
|
|
|
|
st["crcs"].add(_pkt_crc)
|
|
|
|
|
st["LAST"] = pkt_time
|
|
|
|
|
|