#ifndef TASKSCHEDULERMANAGER_H
#define TASKSCHEDULERMANAGER_H
#include <Arduino.h>
#include "RtcManager.h"

namespace TaskSchedulerManagerHelper
{
  class Schedule
  {
    public:
    protected:
    private:
  };
}

class TaskSchedulerManager
{
  friend class SAB;
  public:
    boolean addTask(const char *name, TaskSchedulerManagerHelper::Schedule schedule, boolean (*taskRoutine)(void*), void *pData = NULL);
    boolean addTask(uint8_t id, TaskSchedulerManagerHelper::Schedule schedule, boolean (*taskRoutine)(void*), void *pData = NULL);
    boolean removeTask(const char *name);
    boolean removeTask(uint8_t id);
    void runTaskScheduler();
  protected:
    TaskSchedulerManager();
    TaskSchedulerManager(RtcManager &rtcManager);
  private:
    RtcManager *_rtcManager;
};

#endif //TASKSCHEDULERMANAGER_H
