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