2019-01-08 21:53:54 -08:00
|
|
|
/*
|
2019-04-15 16:24:46 -07:00
|
|
|
* @file global_execution_queue.h
|
2019-01-08 21:53:54 -08:00
|
|
|
*
|
|
|
|
* Created on: Jan 9, 2019
|
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2019
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GLOBAL_EXECUTION_QUEUE_H_
|
|
|
|
#define GLOBAL_EXECUTION_QUEUE_H_
|
|
|
|
|
|
|
|
#include "scheduler.h"
|
2019-01-09 17:06:41 -08:00
|
|
|
#include "event_queue.h"
|
2019-01-08 21:53:54 -08:00
|
|
|
|
|
|
|
class TestExecutor : public ExecutorInterface {
|
|
|
|
public:
|
2019-12-02 20:52:35 -08:00
|
|
|
void scheduleByTimestamp(scheduling_s *scheduling, efitimeus_t timeUs, schfunc_t callback, void *param) override;
|
|
|
|
void scheduleForLater(scheduling_s *scheduling, int delayUs, schfunc_t callback, void *param) override;
|
2019-01-09 07:17:35 -08:00
|
|
|
void clear();
|
2019-01-09 16:52:01 -08:00
|
|
|
int executeAll(efitime_t now);
|
2019-01-09 07:36:35 -08:00
|
|
|
int size();
|
2019-01-09 13:42:34 -08:00
|
|
|
scheduling_s* getForUnitTest(int index);
|
2019-01-09 17:06:41 -08:00
|
|
|
private:
|
|
|
|
EventQueue schedulingQueue;
|
2019-01-08 21:53:54 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* GLOBAL_EXECUTION_QUEUE_H_ */
|