* Dispatcher: more stats added

This commit is contained in:
Scott Powell 2025-01-19 00:36:59 +11:00
parent 67b0dfa868
commit 382b73f6c5
4 changed files with 37 additions and 1 deletions

View file

@ -94,6 +94,9 @@ class Dispatcher {
Packet* outbound; // current outbound packet
unsigned long outbound_expiry, outbound_start, total_air_time;
unsigned long next_tx_time;
uint32_t n_sent_flood, n_sent_direct;
uint32_t n_recv_flood, n_recv_direct;
uint32_t n_full_events;
protected:
PacketManager* _mgr;
@ -119,6 +122,11 @@ public:
void sendPacket(Packet* packet, uint8_t priority, uint32_t delay_millis=0);
unsigned long getTotalAirTime() const { return total_air_time; } // in milliseconds
uint32_t getNumSentFlood() const { return n_sent_flood; }
uint32_t getNumSentDirect() const { return n_sent_direct; }
uint32_t getNumRecvFlood() const { return n_recv_flood; }
uint32_t getNumRecvDirect() const { return n_recv_direct; }
uint32_t getNumFullEvents() const { return n_full_events; }
// helper methods
bool millisHasNowPassed(unsigned long timestamp) const;