firmware/src/modules/AdminModule.h

32 lines
827 B
C
Raw Normal View History

2021-02-21 06:03:44 +00:00
#pragma once
#include "ProtobufPlugin.h"
/**
2022-02-27 10:21:02 +00:00
* Routing module for router control messages
2021-02-21 06:03:44 +00:00
*/
2022-02-27 10:21:02 +00:00
class AdminModule : public ProtobufPlugin<AdminMessage>
2021-02-21 06:03:44 +00:00
{
public:
/** Constructor
* name is for debugging output
*/
2022-02-27 10:21:02 +00:00
AdminModule();
2021-02-21 06:03:44 +00:00
protected:
/** 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
*/
2022-01-24 17:24:40 +00:00
virtual bool handleReceivedProtobuf(const MeshPacket &mp, AdminMessage *p) override;
2021-02-21 06:03:44 +00:00
private:
void handleSetOwner(const User &o);
void handleSetChannel(const Channel &cc);
void handleSetRadio(RadioConfig &r);
2021-02-26 07:34:00 +00:00
void handleGetChannel(const MeshPacket &req, uint32_t channelIndex);
void handleGetRadio(const MeshPacket &req);
2021-02-21 06:03:44 +00:00
};
2022-02-27 10:21:02 +00:00
extern AdminModule *adminModule;