2021-01-03 21:43:35 +00:00
|
|
|
#ifndef TASK_APRS_IS_H_
|
|
|
|
#define TASK_APRS_IS_H_
|
|
|
|
|
|
|
|
#include <TaskManager.h>
|
|
|
|
#include <APRS-IS.h>
|
|
|
|
#include <APRSMessage.h>
|
2021-03-12 19:01:47 +00:00
|
|
|
#include <Timer.h>
|
2021-01-03 21:43:35 +00:00
|
|
|
|
|
|
|
class AprsIsTask : public Task
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AprsIsTask();
|
|
|
|
virtual ~AprsIsTask();
|
|
|
|
|
2021-01-04 22:10:23 +00:00
|
|
|
virtual bool setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) override;
|
2021-01-03 21:43:35 +00:00
|
|
|
virtual bool loop(std::shared_ptr<Configuration> config) override;
|
|
|
|
|
2021-01-04 22:10:23 +00:00
|
|
|
TaskQueue<std::shared_ptr<APRSMessage>> inputQueue;
|
|
|
|
|
2021-01-03 21:43:35 +00:00
|
|
|
private:
|
|
|
|
std::shared_ptr<APRS_IS> _aprs_is;
|
|
|
|
std::shared_ptr<APRSMessage> _beaconMsg;
|
2021-03-12 19:01:47 +00:00
|
|
|
Timer _beacon_timer;
|
2021-01-03 21:43:35 +00:00
|
|
|
|
2021-01-05 22:57:59 +00:00
|
|
|
bool connect(std::shared_ptr<Configuration> config);
|
2021-01-03 21:43:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|