30 lines
708 B
C++
30 lines
708 B
C++
#ifndef SYS_TASK_RUNNER_H
|
|||
|
|
#define SYS_TASK_RUNNER_H
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @brief 任务执行器。
|
||
|
|
* @note 负责消费 TaskManager 置位的任务,并驱动各模块完成实际工作。
|
||
|
|
*/
|
||
|
|
class TaskRunner {
|
||
|
|
public:
|
||
|
|
static void init();
|
||
|
|
static void runPending();
|
||
|
|
|
||
|
|
private:
|
||
|
|
struct Runtime;
|
||
|
|
static Runtime s_runtime;
|
||
|
|
|
||
|
|
static void taskAdcVrefSample();
|
||
|
|
static void taskAdcTempSample();
|
||
|
|
static void taskAdcProcess();
|
||
|
|
static void taskCanRxPoll();
|
||
|
|
static void taskCanRxParse();
|
||
|
|
static void taskCanTxPrepare();
|
||
|
|
static void taskCanTxSend();
|
||
|
|
static void taskStatusLed();
|
||
|
|
static void taskHeartbeat();
|
||
|
|
static void taskDiagnosticPrint();
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif /* SYS_TASK_RUNNER_H */
|