Files
firmware/src/mesh/ReliableRouter.h

34 lines
944 B
C
Raw Normal View History

2020-05-19 11:56:17 -07:00
#pragma once
2023-10-02 19:31:23 +02:00
#include "NextHopRouter.h"
2020-05-19 14:54:47 -07:00
2020-05-19 11:56:17 -07:00
/**
* This is a mixin that extends Router with the ability to do (one hop only) reliable message sends.
*/
2023-10-02 19:31:23 +02:00
class ReliableRouter : public NextHopRouter
2020-05-19 11:56:17 -07:00
{
public:
/**
* Constructor
*
*/
// ReliableRouter();
/**
* Send a packet on a suitable interface. This routine will
* later free() the packet to pool. This routine is not allowed to stall.
* If the txmit queue is full it might return an error
*/
virtual ErrorCode send(meshtastic_MeshPacket *p) override;
2020-05-19 11:56:17 -07:00
protected:
/**
* Look for acks/naks or someone retransmitting us
2020-05-19 11:56:17 -07:00
*/
virtual void sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c) override;
2020-05-19 11:56:17 -07:00
/**
* We hook this method so we can see packets before FloodingRouter says they should be discarded
*/
virtual bool shouldFilterReceived(const meshtastic_MeshPacket *p) override;
2023-10-02 19:31:23 +02:00
};