Rleg  2
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
taskScheduler.h
Go to the documentation of this file.
1 
7 #ifndef TASK_SCHEDULER_H_INCLUDED
8 #define TASK_SCHEDULER_H_INCLUDED
9 
10 #include <time.h>
11 #include <sys/time.h>
12 
20 typedef struct taskS{
21  timer_t timer;
22  volatile double t_global;
23  volatile double T_exec_global;
24  volatile double T_mean_global;
25  volatile double T_max_global;
26  volatile double T_min_global;
27  volatile int period_us;
28  volatile int isFirstExecution;
29 
30  void (*run)();
31 } TASK_S;
32 
39 void timer_new_task(TASK_S *task,void (*runFunction)(void));
40 
48 void timer_start_task(TASK_S *task,void (*alertFunction)(int),int period_us);
49 
55 void timer_stop_task(TASK_S *task);
56 #endif
volatile double T_mean_global
Definition: taskScheduler.h:24
volatile double T_exec_global
Definition: taskScheduler.h:23
volatile double T_max_global
Definition: taskScheduler.h:25
volatile int isFirstExecution
Flag to sign first Exec.
Definition: taskScheduler.h:28
void timer_stop_task(TASK_S *task)
Stop some task.
timer_t timer
Definition: taskScheduler.h:21
void timer_start_task(TASK_S *task, void(*alertFunction)(int), int period_us)
Start some task.
Definition: taskScheduler.c:27
void timer_new_task(TASK_S *task, void(*runFunction)(void))
Create a task.
Definition: taskScheduler.c:16
Task to schedule definition.
Definition: taskScheduler.h:20
volatile double T_min_global
Definition: taskScheduler.h:26
volatile int period_us
Definition: taskScheduler.h:27
volatile double t_global
Definition: taskScheduler.h:22