AutosarOS
|
Alarm management. More...
#include "Types.h"
Go to the source code of this file.
Functions | |
StatusType | Alarm_GetAlarmBase (AlarmType alarmID, AlarmBaseRefType info) |
Get alarm base. More... | |
StatusType | Alarm_GetAlarm (AlarmType alarmID, TickRefType tick) |
Get alarm. More... | |
StatusType | Alarm_SetRelAlarm (AlarmType alarmID, TickType increment, TickType cycle) |
Set relative alarm. More... | |
StatusType | Alarm_SetAbsAlarm (AlarmType alarmID, TickType start, TickType cycle) |
Set absolute alarm. More... | |
StatusType | Alarm_CancelAlarm (AlarmType alarmID) |
Cancel alarm. More... | |
void | Alarm_evaluateAlarm (CounterType counter) |
Evaluate alarms with user generated counter. More... | |
void | Alarm_evaluateSysTickAlarm (void) |
Evaluate alarm with SYSTEM_COUNTER. More... | |
void | Alarm_startup (void) |
Startup function for alarm management. More... | |
Alarm management.
Definition in file Alarm.h.
StatusType Alarm_CancelAlarm | ( | AlarmType | alarmID | ) |
void Alarm_evaluateAlarm | ( | CounterType | counter | ) |
Evaluate alarms with user generated counter.
This will evaluate all alarms with a user generated counter and handle expiration if necessary.
counter may not equal SYSTEM_COUNTER. Alarm_evaluateSysTickAlarm() must be used instead.
counter | ID of the counter that triggered the alarm evaluation |
Definition at line 211 of file Alarm.c.
void Alarm_evaluateSysTickAlarm | ( | void | ) |
StatusType Alarm_GetAlarm | ( | AlarmType | alarmID, |
TickRefType | tick | ||
) |
Get alarm.
Get relative value in ticks before alarm expires.
alarmID | Alarm which remaining ticks should be read |
tick | Pointer to write remaining ticks into |
StatusType Alarm_GetAlarmBase | ( | AlarmType | alarmID, |
AlarmBaseRefType | info | ||
) |
Get alarm base.
This service will get a copy of the counter configuration used as the alarm base.
alarmID | Alarm which base should be read |
info | Pointer to copy base info into |
Definition at line 37 of file Alarm.c.
StatusType Alarm_SetAbsAlarm | ( | AlarmType | alarmID, |
TickType | start, | ||
TickType | cycle | ||
) |
Set absolute alarm.
Set an absolute alarm. The alarm will expire once the base counter reaches the start value. If cycle does not equal zero the alarm will be restarted to expire in cycle ticks after it expires.
alarmID | Alarm to set |
start | Absolute value in ticks (must be between zero and maxallowedvalue of the base) |
cycle | Cycle value for cyclic alarm (must be between mincycle and maxallowedvalue of the base) |
Definition at line 139 of file Alarm.c.
StatusType Alarm_SetRelAlarm | ( | AlarmType | alarmID, |
TickType | increment, | ||
TickType | cycle | ||
) |
Set relative alarm.
Set a relative alarm. The alarm will expire in increment ticks. If cycle does not equal zero the alarm will be restarted to expire in cycle ticks after it expires.
alarmID | Alarm to set |
increment | Relative value in ticks (must be between one and maxallowedvalue of the base) |
cycle | Cycle value for cyclic alarm (must be between mincycle and maxallowedvalue of the base) |
Definition at line 103 of file Alarm.c.