mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 02:32:23 +00:00
Update filenames from plugins to modules
This commit is contained in:
35
src/modules/RoutingModule.h
Normal file
35
src/modules/RoutingModule.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
#include "ProtobufPlugin.h"
|
||||
#include "Channels.h"
|
||||
|
||||
/**
|
||||
* Routing plugin for router control messages
|
||||
*/
|
||||
class RoutingPlugin : public ProtobufPlugin<Routing>
|
||||
{
|
||||
public:
|
||||
/** Constructor
|
||||
* name is for debugging output
|
||||
*/
|
||||
RoutingPlugin();
|
||||
|
||||
void sendAckNak(Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex);
|
||||
|
||||
protected:
|
||||
friend class Router;
|
||||
|
||||
/** Called to handle a particular incoming message
|
||||
|
||||
@return true if you've guaranteed you've handled this message and no other handlers should be considered for it
|
||||
*/
|
||||
virtual bool handleReceivedProtobuf(const MeshPacket &mp, Routing *p) override;
|
||||
|
||||
/** Messages can be received that have the want_response bit set. If set, this callback will be invoked
|
||||
* so that subclasses can (optionally) send a response back to the original sender. */
|
||||
virtual MeshPacket *allocReply() override;
|
||||
|
||||
/// Override wantPacket to say we want to see all packets, not just those for our port number
|
||||
virtual bool wantPacket(const MeshPacket *p) override { return true; }
|
||||
};
|
||||
|
||||
extern RoutingPlugin *routingPlugin;
|
||||
Reference in New Issue
Block a user