Elisa3
|
00001 /******************************************************************************** 00002 00003 Advance agenda events of e-puck 00004 December 2004: first version 00005 Lucas Meier & Francesco Mondada 00006 00007 00008 This file is part of the e-puck library license. 00009 See http://www.e-puck.org/index.php?option=com_content&task=view&id=18&Itemid=45 00010 00011 (c) 2004-2007 Francesco Mondada, Lucas Meier 00012 00013 Robotics system laboratory http://lsro.epfl.ch 00014 Laboratory of intelligent systems http://lis.epfl.ch 00015 Swarm intelligent systems group http://swis.epfl.ch 00016 EPFL Ecole polytechnique federale de Lausanne http://www.epfl.ch 00017 00018 **********************************************************************************/ 00019 00035 #ifndef __AGENDA_H__ 00036 #define __AGENDA_H__ 00037 00038 00039 #define AG_ALREADY_CREATED 1 00040 #define AG_NOT_FOUND 2 00041 00042 /********************************************************************** 00043 * ------------------------ Type definition --------------------------- 00044 **********************************************************************/ 00045 00046 typedef struct AgendaType Agenda; 00047 00058 struct AgendaType 00059 { 00060 unsigned int cycle; 00061 int counter; 00062 char activate; 00063 void (*function) (void); 00066 Agenda *next; 00067 }; 00068 00069 00070 /*********************************************************************** 00071 * ------------------------ From agenda.c file -------------------------- 00072 **********************************************************************/ 00073 void e_start_agendas_processing(void); 00074 void e_end_agendas_processing(void); 00075 00076 int e_activate_agenda(void (*func)(void), int cycle); 00077 int e_destroy_agenda(void (*func)(void)); 00078 00079 int e_set_agenda_cycle(void (*func)(void), int cycle); 00080 int e_reset_agenda(void (*func)(void)); 00081 00082 int e_pause_agenda(void (*func)(void)); 00083 int e_restart_agenda(void (*func)(void)); 00084 00085 #endif /* __AGENDA_H__ */ 00086 00087 00088 /* End of File : agenda.h */