Vehicle Control Unit
0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Core
Inc
Scheduler
Task.h
Go to the documentation of this file.
1
#ifndef RENSSELAERMOTORSPORT_TASK_H
2
#define RENSSELAERMOTORSPORT_TASK_H
3
4
#include "../Utils/Updateable.h"
5
// FIXME: Configure board to get high-resolution time
6
typedef
int
highResTime
;
7
8
typedef
struct
{
9
int
hz
;
10
highResTime
nextExecTime
;
11
Updateable
*
updateable
;
12
}
Task
;
13
22
void
TaskInit
(
Task
* task,
Updateable
* updateable,
int
hz);
23
30
void
TaskExecute
(
Task
* task);
31
32
#endif
// RENSSELAERMOTORSPORT_TASK_H
highResTime
int highResTime
Definition:
Task.h:6
TaskInit
void TaskInit(Task *task, Updateable *updateable, int hz)
Initializes a task with the given sensor and update frequency.
Definition:
Task.c:3
TaskExecute
void TaskExecute(Task *task)
Executes the task by calling the sensor's update function.
Definition:
Task.c:9
Task
Definition:
Task.h:8
Task::hz
int hz
Definition:
Task.h:9
Task::updateable
Updateable * updateable
Definition:
Task.h:11
Task::nextExecTime
highResTime nextExecTime
Definition:
Task.h:10
Updateable
Definition:
Updateable.h:22
Generated by
1.9.5