2021-01-27 19:18:16 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
2022-03-09 19:01:43 +11:00
|
|
|
#include "SinglePortModule.h"
|
2021-01-27 19:18:16 -08:00
|
|
|
#include "concurrency/OSThread.h"
|
|
|
|
|
#include "configuration.h"
|
|
|
|
|
#include <Arduino.h>
|
|
|
|
|
#include <functional>
|
|
|
|
|
|
2021-03-13 13:32:23 +08:00
|
|
|
/*
|
2022-02-27 01:49:24 -08:00
|
|
|
* Radio interface for ExternalNotificationModule
|
2021-03-13 13:32:23 +08:00
|
|
|
*
|
|
|
|
|
*/
|
2022-03-09 19:01:43 +11:00
|
|
|
class ExternalNotificationModule : public SinglePortModule, private concurrency::OSThread
|
2021-01-27 19:18:16 -08:00
|
|
|
{
|
|
|
|
|
public:
|
2022-02-27 01:49:24 -08:00
|
|
|
ExternalNotificationModule();
|
2021-01-27 19:18:16 -08:00
|
|
|
|
2021-01-27 20:06:39 -08:00
|
|
|
void setExternalOn();
|
|
|
|
|
void setExternalOff();
|
2021-01-27 21:20:18 -08:00
|
|
|
void getExternal();
|
2021-01-27 20:06:39 -08:00
|
|
|
|
2021-01-27 19:18:16 -08:00
|
|
|
protected:
|
2021-03-13 13:32:23 +08:00
|
|
|
// virtual MeshPacket *allocReply();
|
2021-01-27 19:18:16 -08:00
|
|
|
|
|
|
|
|
/** Called to handle a particular incoming message
|
|
|
|
|
|
2021-09-23 04:42:09 +03:00
|
|
|
@return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for it
|
2021-01-27 19:18:16 -08:00
|
|
|
*/
|
2022-01-24 17:24:40 +00:00
|
|
|
virtual ProcessMessage handleReceived(const MeshPacket &mp) override;
|
2021-01-27 19:18:16 -08:00
|
|
|
|
2022-01-24 17:24:40 +00:00
|
|
|
virtual int32_t runOnce() override;
|
2021-03-13 13:32:23 +08:00
|
|
|
};
|