Timer Management
[User API]

Collaboration diagram for Timer Management:

Functions

void EnterMutex (void)
 Acquire mutex.
void LeaveMutex (void)
 Release mutex.
void TimerInit (void)
 Initialize Timer.
void TimerCleanup (void)
 Cleanup Timer.
void StartTimerLoop (TimerCallback_t Callback)
 Start the timer task.
void StopTimerLoop (TimerCallback_t Callback)
 Stop the timer task.
TIMER_HANDLE SetAlarm (CO_Data *d, UNS32 id, TimerCallback_t callback, TIMEVAL value, TIMEVAL period)
 Set an alarm to execute a callback function when expired.
TIMER_HANDLE DelAlarm (TIMER_HANDLE handle)
 Delete an alarm before expiring.
void setTimer (TIMEVAL value)
 Set a timerfor a given time.
TIMEVAL getElapsedTime (void)
 Get the time elapsed since latest timer occurence.

Function Documentation

TIMER_HANDLE DelAlarm ( TIMER_HANDLE  handle  ) 

Delete an alarm before expiring.

Parameters:
handle A timer handle
Returns:
The timer handle

Definition at line 85 of file timer.c.

Referenced by _sendPDOevent(), PDOStop(), proceedPDO(), and TPDO_Communication_Parameter_Callback().

TIMEVAL getElapsedTime ( void   ) 

Get the time elapsed since latest timer occurence.

Returns:
time elapsed since latest timer occurence

Definition at line 122 of file timers_unix.c.

Referenced by SetAlarm().

TIMER_HANDLE SetAlarm ( CO_Data d,
UNS32  id,
TimerCallback_t  callback,
TIMEVAL  value,
TIMEVAL  period 
)

Set an alarm to execute a callback function when expired.

Parameters:
*d Pointer to a CAN object data structure
id The alarm Id
callback A callback function
value Call the callback function at current time + value
period Call periodically the callback function
Returns:
handle The timer handle

Definition at line 46 of file timer.c.

References getElapsedTime(), and setTimer().

Referenced by _sendPDOevent(), and StartTimerLoop().

Here is the call graph for this function:

void setTimer ( TIMEVAL  value  ) 

Set a timerfor a given time.

Parameters:
value The time value.

Definition at line 107 of file timers_unix.c.

Referenced by SetAlarm().

void StartTimerLoop ( TimerCallback_t  Callback  ) 

Start the timer task.

Parameters:
Callback A callback function

Definition at line 68 of file timers_unix.c.

References EnterMutex(), LeaveMutex(), and SetAlarm().

Here is the call graph for this function:

void StopTimerLoop ( TimerCallback_t  Callback  ) 

Stop the timer task.

Parameters:
Callback A callback function

Definition at line 60 of file timers_unix.c.

References EnterMutex(), and LeaveMutex().

Here is the call graph for this function:


Generated on Wed Feb 4 12:17:24 2009 for CanFestival by  doxygen 1.5.6