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