nico@207: nico@207: nico@215: CanFestival: src/timer.c File Reference nico@207: nico@207: nico@207: nico@207: nico@207:
nico@207:
nico@207:
nico@207:
nico@215: nico@215:

timer.c File Reference

#include <applicfg.h>
nico@215: #include "timer.h"
nico@215: nico@215:

nico@215: Include dependency graph for timer.c:

nico@215: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: nico@215: nico@210: nico@210:

nico@207: Go to the source code of this file. nico@207: nico@207: etisserant@240: nico@207: nico@207: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: nico@207: nico@207: etisserant@240: etisserant@240: etisserant@240: etisserant@240: etisserant@240: nico@207: nico@207:

Defines

#define min_val(a, b)   ((a<b)?a:b)

Functions

TIMER_HANDLE SetAlarm (CO_Data *d, UNS32 id, TimerCallback_t callback, TIMEVAL value, TIMEVAL period)
TIMER_HANDLE DelAlarm (TIMER_HANDLE handle)
void TimeDispatch ()

Variables

s_timer_entry timers [MAX_NB_TIMER] = {{TIMER_FREE, NULL, NULL, 0, 0, 0},}
TIMEVAL total_sleep_time = TIMEVAL_MAX
TIMER_HANDLE last_timer_raw = -1
nico@210:


Detailed Description

nico@210:
Author:
Edouard TISSERANT and Francis DUPIN
nico@210:
Date:
Tue Jun 5 09:32:32 2007
nico@210: nico@210:

nico@210: Definition in file timer.c.


Define Documentation

etisserant@240: nico@207:
nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
#define min_val (a,
 )    ((a<b)?a:b)
nico@207:
nico@207:
nico@207: nico@207:

nico@207: nico@207:

nico@210: Definition at line 44 of file timer.c. nico@210:

nico@210: Referenced by TimeDispatch(). nico@207:

nico@207:

nico@207:


Function Documentation

etisserant@240: nico@207:
nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
TIMER_HANDLE DelAlarm (TIMER_HANDLE  handle  ) 
nico@207:
nico@207:
nico@207: nico@207:

nico@210: ----- Use this to remove an alarm ----

nico@210:

Parameters:
nico@210: nico@210: nico@210:
handle 
nico@210:
nico@210:
Returns:
nico@210: nico@210:

nico@210: Definition at line 112 of file timer.c. nico@210:

nico@215: References last_timer_raw, MSG_WAR, struct_s_timer_entry::state, and timers. nico@210:

etisserant@240: Referenced by _sendPDOevent(), heartbeatStop(), PDOStop(), proceedNODE_GUARD(), proceedPDO(), ProducerHearbeatAlarm(), stopSYNC(), and TPDO_Communication_Parameter_Callback(). etisserant@240:

etisserant@240:

etisserant@240: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@215: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: etisserant@240: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
TIMER_HANDLE SetAlarm (CO_Data d,
UNS32  id,
TimerCallback_t  callback,
TIMEVAL  value,
TIMEVAL  period 
)
nico@207:
nico@207:
nico@207: nico@207:

nico@210: ------- Use this to declare a new alarm ------

nico@210:

Parameters:
nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210:
d 
id 
callback 
value 
period 
nico@210:
nico@210:
Returns:
nico@210: nico@210:

nico@210: Definition at line 57 of file timer.c. nico@210:

nico@215: References struct_s_timer_entry::d, last_timer_raw, MAX_NB_TIMER, TIMER_HANDLE, and timers. nico@215:

etisserant@240: Referenced by _sendPDOevent(), heartbeatInit(), proceedNODE_GUARD(), startSYNC(), and StartTimerLoop(). etisserant@240:

etisserant@240:

etisserant@240: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@215: nico@207: nico@207: nico@207: nico@207: nico@207:
void TimeDispatch (void   ) 
nico@207:
nico@207:
nico@207: nico@207:

nico@210: ------ TimeDispatch is called on each timer expiration ---- nico@210:

nico@210: Definition at line 131 of file timer.c. nico@210:

nico@215: References getElapsedTime(), last_timer_raw, min_val, TIMER_HANDLE, timers, TIMEVAL, TIMEVAL_MAX, and total_sleep_time. nico@215:

nico@215: Referenced by class_timers::timer_loop_thread_proc(), timer_notify(), and timerloop_task_proc(). nico@215:

etisserant@240: Here is the call graph for this function:

etisserant@240: etisserant@240: nico@215: nico@215: nico@207:
nico@207:

nico@207:


Variable Documentation

etisserant@240: etisserant@240:
etisserant@240:
etisserant@240: etisserant@240: etisserant@240: nico@207: nico@207:
TIMER_HANDLE last_timer_raw = -1
nico@207:
nico@207:
nico@207: nico@207:

nico@207: nico@207:

nico@210: Definition at line 42 of file timer.c. nico@210:

nico@210: Referenced by DelAlarm(), SetAlarm(), and TimeDispatch(). nico@207:

nico@207:

etisserant@240: etisserant@240:

etisserant@240:
etisserant@240: etisserant@240: etisserant@240: nico@207: nico@207:
s_timer_entry timers[MAX_NB_TIMER] = {{TIMER_FREE, NULL, NULL, 0, 0, 0},}
nico@207:
nico@207:
nico@207: nico@207:

nico@207: nico@207:

nico@210: Definition at line 39 of file timer.c. nico@210:

nico@210: Referenced by DelAlarm(), SetAlarm(), and TimeDispatch(). nico@207:

nico@207:

etisserant@240: etisserant@240:

etisserant@240:
etisserant@240: etisserant@240: etisserant@240: nico@207: nico@207:
TIMEVAL total_sleep_time = TIMEVAL_MAX
nico@207:
nico@207:
nico@207: nico@207:

nico@207: nico@207:

nico@210: Definition at line 41 of file timer.c. nico@210:

nico@210: Referenced by TimeDispatch(). nico@210:

nico@210:

etisserant@240:


Generated on Mon Jul 2 19:10:42 2007 for CanFestival by  nico@207: nico@207: doxygen 1.5.1
nico@207: nico@207: