2019-01-08 21:53:54 -08:00
|
|
|
/*
|
|
|
|
* global_execution_queue.h
|
|
|
|
*
|
|
|
|
* 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-01-09 07:17:35 -08:00
|
|
|
TestExecutor();
|
2019-01-08 21:53:54 -08:00
|
|
|
void scheduleByTimestamp(scheduling_s *scheduling, efitimeus_t timeUs, schfunc_t callback, void *param);
|
2019-01-09 04:57:43 -08:00
|
|
|
void scheduleForLater(scheduling_s *scheduling, int delayUs, schfunc_t callback, void *param);
|
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_ */
|