mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-28 15:58:12 +00:00
feat(mesh): track actually-forwarded packet count, show in Diagnostics
allowPacketForward() only gates permission; the packet can still be dropped afterward (hasSeen(), path-size limit). Add Mesh::n_forwarded, incremented at the 3 ACTION_RETRANSMIT_DELAYED return sites, so the Diagnostics screen can confirm a repeater is actually relaying traffic rather than just being configured to. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,7 @@ class Mesh : public Dispatcher {
|
||||
RTCClock* _rtc;
|
||||
RNG* _rng;
|
||||
MeshTables* _tables;
|
||||
uint32_t n_forwarded; // packets actually re-transmitted (repeater/transport role)
|
||||
|
||||
void removeSelfFromPath(Packet* packet);
|
||||
void routeDirectRecvAcks(Packet* packet, uint32_t delay_millis);
|
||||
@@ -178,6 +179,10 @@ public:
|
||||
|
||||
LocalIdentity self_id;
|
||||
|
||||
// packets actually re-transmitted (vs. just permitted by allowPacketForward()) —
|
||||
// confirms a repeater/transport role is really forwarding, not just configured to.
|
||||
uint32_t getNumForwarded() const { return n_forwarded; }
|
||||
|
||||
RNG* getRNG() const { return _rng; }
|
||||
RTCClock* getRTCClock() const { return _rtc; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user