130 void initScheduler();
138 uint8_t getFirstTaskID();
148 SensorSampler* createSampler(uint8_t
id, std::chrono::nanoseconds period);
150 const uint8_t MAX_TASK_ID = 255;
154 bool customScheduler;
156 std::vector<SensorSampler*>
159 std::map<AbstractSensor*, SensorSampler*>
162 bool initResult =
true;
Base abstract class for sensor drivers.
static PrintLogger getLogger(const string &name)
The SensorManager handles sensors initialization and sampling.
std::map< AbstractSensor *, SensorInfo > SensorMap_t
bool start()
Starts the task scheduler.
void enableSensor(AbstractSensor *sensor)
Enable sampling for the specified sensor.
void stop()
Starts the task scheduler.
bool areAllSensorsInitialized()
Checks whether all the sensors have been initialized correctly.
std::function< void()> function_t
SensorManager(const SensorMap_t &sensorsMap)
~SensorManager()
Deallocates samplers (through the samplers vector).
void disableSensor(AbstractSensor *sensor)
Disable sampling for the specified sensor.
const SensorInfo getSensorInfo(AbstractSensor *sensor)
const vector< TaskStatsResult > getSamplersStats()
Virtual sensor sampler class.
The Task Scheduler allow to manage simple tasks with a single thread. All the task added must not tak...
This file includes all the types the logdecoder script will decode.
Sensors information struct needed by the SensorManager.