mirror of
https://github.com/lora-aprs/LoRa_APRS_iGate.git
synced 2025-12-06 07:42:00 +01:00
23 lines
480 B
C
23 lines
480 B
C
|
|
#ifndef TASK_MQTT_H_
|
||
|
|
#define TASK_MQTT_H_
|
||
|
|
|
||
|
|
#include <APRSMessage.h>
|
||
|
|
#include <TaskManager.h>
|
||
|
|
#include <PubSubClient.h>
|
||
|
|
|
||
|
|
class MQTTTask : public Task {
|
||
|
|
public:
|
||
|
|
MQTTTask(TaskQueue<std::shared_ptr<APRSMessage>> &toMQTT);
|
||
|
|
virtual ~MQTTTask();
|
||
|
|
|
||
|
|
virtual bool setup(System &system) override;
|
||
|
|
virtual bool loop(System &system) override;
|
||
|
|
|
||
|
|
private:
|
||
|
|
bool _beginCalled;
|
||
|
|
TaskQueue<std::shared_ptr<APRSMessage>> &_toMQTT;
|
||
|
|
bool connect(const System &system);
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif
|