Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Scheduler.h
Go to the documentation of this file.
1#ifndef RENSSELAERMOTORSPORT_SCHEDULER_H
2#define RENSSELAERMOTORSPORT_SCHEDULER_H
3
4#include <stdbool.h>
5
6#include "PriorityQueue.h"
7
8#define MAX_SENSORS 10
9#define MAX_HZ 1000
10
11typedef struct Scheduler {
13 bool running;
15
22void SchedulerInit(Scheduler* scheduler, Updateable* updatableArray[]);
23
29void SchedulerRun(Scheduler* scheduler);
30
36void SchedulerStop(Scheduler* scheduler);
37
38#endif // RENSSELAERMOTORSPORT_SCHEDULER_H
void SchedulerInit(Scheduler *scheduler, Updateable *updatableArray[])
Initializes the scheduler with the given sensors.
Definition: Scheduler.c:14
void SchedulerStop(Scheduler *scheduler)
Stops the scheduler.
Definition: Scheduler.c:66
void SchedulerRun(Scheduler *scheduler)
Runs the scheduler, executing tasks based on their priority.
Definition: Scheduler.c:43
PriorityQueue tasks
Definition: Scheduler.h:12
bool running
Definition: Scheduler.h:13