alarm.h File Reference

This file contains the interfaces for the OSEK/VDX compatible alarm handling. More...

Go to the source code of this file.

Classes

struct  AlarmBaseType
 This data type represents a structure for storage of counter characteristics. More...
struct  t_counter
struct  t_alarm

Defines

#define ALARMCALLBACK(x)   void x(AlarmType AlarmID)

Typedefs

typedef unsigned TickType
 This data type represents count values in ticks.
typedef TickTypeTickRefType
typedef AlarmBaseTypeAlarmBaseRefType
typedef t_alarmAlarmType

Functions

StatusType GetAlarmBase (AlarmType AlarmId, AlarmBaseRefType info)
 The system service GetAlarmBase reads the alarm base characteristics.
StatusType GetAlarm (AlarmType AlarmID, TickRefType Info)
 The system service GetAlarm returns the relative value in ticks before the alarm <AlarmID> expires.
StatusType SetRelAlarm (AlarmType AlarmID, TickType increment, TickType cycle)
 The system service occupies the alarm <AlarmID> element.
StatusType SetAbsAlarm (AlarmType AlarmID, TickType start, TickType cycle)
 The system service occupies the alarm <AlarmID> element.
StatusType CancelAlarm (AlarmType AlarmID)
 The system service cancels the alarm <AlarmID>.


Detailed Description

This file contains the interfaces for the OSEK/VDX compatible alarm handling.

Definition in file alarm.h.


Function Documentation

StatusType CancelAlarm AlarmType  AlarmID  ) 
 

The system service cancels the alarm <AlarmID>.

Parameters:
AlarmID Reference to an alarm

StatusType GetAlarm AlarmType  AlarmID,
TickRefType  Info
 

The system service GetAlarm returns the relative value in ticks before the alarm <AlarmID> expires.

Parameters:
AlarmID Reference to an alarm
Info Relative value in ticks before the alarm <AlarmID> expires.

StatusType GetAlarmBase AlarmType  AlarmId,
AlarmBaseRefType  info
 

The system service GetAlarmBase reads the alarm base characteristics.

The return value <Info> is a structure in which the information of data type AlarmBaseType is stored.

Parameters:
AlarmID Reference to alarm
Info Reference to structure with constants of the alarm base.

StatusType SetAbsAlarm AlarmType  AlarmID,
TickType  start,
TickType  cycle
 

The system service occupies the alarm <AlarmID> element.

When <start> ticks are reached, the task assigned to the alarm <AlarmID> is activated or the assigned event (only for extended tasks) is set or the alarm-callback routine is called. If the absolute value <start> is very close to the current counter value, the alarm may expire, and the task may become ready or the alarm-callback may be called before the system service returns to the user. If the absolute value <start> already was reached before the system call, the alarm shall only expire when the absolute value <start> is reached again, i.e. after the next overrun of the counter. If <cycle> is unequal zero, the alarm element is logged on again immediately after expiry with the relative value <cycle>. The alarm <AlarmID> shall not already be in use. To change values of alarms already in use the alarm shall be cancelled first. If the alarm is already in use, this call will be ignored and the error E_OS_STATE is returned. Allowed on task level and in ISR, but not in hook routines.

Parameters:
AlarmID Reference to the alarm element
start Absolute value in ticks
cycle Cycle value in case of cyclic alarm. In case of single alarms, cycle shall be zero.

StatusType SetRelAlarm AlarmType  AlarmID,
TickType  increment,
TickType  cycle
 

The system service occupies the alarm <AlarmID> element.

After <increment> ticks have elapsed, the task assigned to the alarm <AlarmID> is activated or the assigned event (only for extended tasks) is set or the alarm-callback routine is called. The behaviour of <increment> equal to 0 is up to the implementation. If the relative value <increment> is very small, the alarm may expire, and the task may become ready or the alarm-callback may be called before the system service returns to the user. If <cycle> is unequal zero, the alarm element is logged on again immediately after expiry with the relative value <cycle>. The alarm <AlarmID> must not already be in use. To change values of alarms already in use the alarm shall be cancelled first. If the alarm is already in use, this call will be ignored and the error E_OS_STATE is returned. Allowed on task level and in ISR, but not in hook routines.

Parameters:
AlarmID Reference to the alarm element
increment Relative value in ticks
cycle Cycle value in case of cyclic alarm. In case of single alarms, cycle shall be zero.


Generated on Mon Sep 29 19:56:48 2008 for mKernel by  doxygen 1.4.6