Vehicle Control Unit
0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Core
Inc
Scheduler
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
11
typedef
struct
Scheduler
{
12
PriorityQueue
tasks
;
13
bool
running
;
14
}
Scheduler
;
15
22
void
SchedulerInit
(
Scheduler
* scheduler,
Updateable
* updatableArray[]);
23
29
void
SchedulerRun
(
Scheduler
* scheduler);
30
36
void
SchedulerStop
(
Scheduler
* scheduler);
37
38
#endif
// RENSSELAERMOTORSPORT_SCHEDULER_H
PriorityQueue.h
SchedulerInit
void SchedulerInit(Scheduler *scheduler, Updateable *updatableArray[])
Initializes the scheduler with the given sensors.
Definition:
Scheduler.c:14
SchedulerStop
void SchedulerStop(Scheduler *scheduler)
Stops the scheduler.
Definition:
Scheduler.c:66
SchedulerRun
void SchedulerRun(Scheduler *scheduler)
Runs the scheduler, executing tasks based on their priority.
Definition:
Scheduler.c:43
PriorityQueue
Definition:
PriorityQueue.h:15
Scheduler
Definition:
Scheduler.h:11
Scheduler::tasks
PriorityQueue tasks
Definition:
Scheduler.h:12
Scheduler::running
bool running
Definition:
Scheduler.h:13
Updateable
Definition:
Updateable.h:22
Generated by
1.9.5