2020-12-11 01:11:53 +00:00
|
|
|
#pragma once
|
2022-03-09 08:01:43 +00:00
|
|
|
#include "SinglePortModule.h"
|
2020-12-11 01:11:53 +00:00
|
|
|
|
|
|
|
/**
|
2022-02-27 08:29:05 +00:00
|
|
|
* A simple example module that just replies with "Message received" to any message it receives.
|
2020-12-11 01:11:53 +00:00
|
|
|
*/
|
2022-03-09 08:01:43 +00:00
|
|
|
class ReplyModule : public SinglePortModule
|
2020-12-11 01:11:53 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** Constructor
|
|
|
|
* name is for debugging output
|
|
|
|
*/
|
2023-01-21 17:22:19 +00:00
|
|
|
ReplyModule() : SinglePortModule("reply", meshtastic_PortNum_REPLY_APP) {}
|
2020-12-11 01:11:53 +00:00
|
|
|
|
|
|
|
protected:
|
2022-02-27 08:29:05 +00:00
|
|
|
/** For reply module we do all of our processing in the (normally optional)
|
2020-12-13 04:57:37 +00:00
|
|
|
* want_replies handling
|
2023-01-21 13:34:29 +00:00
|
|
|
*/
|
2023-01-21 17:22:19 +00:00
|
|
|
virtual meshtastic_MeshPacket *allocReply() override;
|
2020-12-11 01:11:53 +00:00
|
|
|
};
|