AutosarOS
|
Implementation for schedule tables management. More...
#include "ScheduleTables.h"
#include "Counter.h"
#include "Task.h"
#include "Events.h"
#include "OCB.h"
#include "OS.h"
#include "assert.h"
#include <util/atomic.h>
Go to the source code of this file.
Functions | |
StatusType | ScheduleTable_StartScheduleTableRel (ScheduleTableType scheduleTableID, TickType offset) |
Start schedule table from relative offset. More... | |
StatusType | ScheduleTable_StartScheduleTableAbs (ScheduleTableType scheduleTableID, TickType start) |
Start schedule table from absolute start. More... | |
StatusType | ScheduleTable_StopScheduleTable (ScheduleTableType scheduleTableID) |
Stop schedule table. More... | |
StatusType | ScheduleTable_NextScheduleTable (ScheduleTableType scheduleTableID_from, ScheduleTableType scheduleTableID_to) |
Queue schedule table. More... | |
StatusType | ScheduleTable_GetScheduleTableStatus (ScheduleTableType scheduleTableID, ScheduleTableStatusRefType scheduleStatus) |
Get schedule table status. More... | |
void | ScheduleTable_handleTick (CounterType counter) |
Handle tick. More... | |
void | ScheduleTable_handleSysTick (void) |
Handle system tick. More... | |
void | ScheduleTable_startup (void) |
Startup function for schedule table management. More... | |
Implementation for schedule tables management.
Definition in file ScheduleTables.c.
StatusType ScheduleTable_GetScheduleTableStatus | ( | ScheduleTableType | scheduleTableID, |
ScheduleTableStatusRefType | scheduleStatus | ||
) |
Get schedule table status.
Get current status of a schedule table.
scheduleTableID | ID of schedule table |
scheduleStatus | Reference to status |
Definition at line 218 of file ScheduleTables.c.
void ScheduleTable_handleSysTick | ( | void | ) |
Handle system tick.
Calls ScheduleTable_handleTick() where counter equals SYSTEM_COUNTER. This only exists to simplify the function call within the SysTick interrupt.
Definition at line 338 of file ScheduleTables.c.
void ScheduleTable_handleTick | ( | CounterType | counter | ) |
Handle tick.
Handles a tick of the specified counter. This will increment all associated schedule tables and handle expiry points if necessary.
counter | ID of the counter that triggered the tick |
Definition at line 248 of file ScheduleTables.c.
StatusType ScheduleTable_NextScheduleTable | ( | ScheduleTableType | scheduleTableID_from, |
ScheduleTableType | scheduleTableID_to | ||
) |
Queue schedule table.
Queue schedule table to be executed after the current schedule table finishes execution. If a there is already a next schedule table configured it will be replaced.
Both schedule tables must be driven by the same counter.
scheduleTableID_from | ID of current schedule table |
scheduleTableID_to | ID of schedule table to be queued |
Definition at line 174 of file ScheduleTables.c.
StatusType ScheduleTable_StartScheduleTableAbs | ( | ScheduleTableType | scheduleTableID, |
TickType | start | ||
) |
Start schedule table from absolute start.
Start the schedule table from an absolute starting point. The first expiry point will be executed at start + offset of first expiry point tick value of the underlaying counter.
Start must be below or equal MaxAllowedValue of the underlying counter.
scheduleTableID | ID of the schedule table to start |
start | Start value in ticks |
Definition at line 116 of file ScheduleTables.c.
StatusType ScheduleTable_StartScheduleTableRel | ( | ScheduleTableType | scheduleTableID, |
TickType | offset | ||
) |
Start schedule table from relative offset.
Start schedule table from relative offset. The first expiry point will be executed in offset + offset of first expiry point ticks of the underlying counter.
Offset must be greater than zero and smaller or equal MaxAllowedValue of the underlying counter.
scheduleTableID | ID of the schedule table to start |
offset | Offset in Ticks before the schedule table is executed |
Definition at line 79 of file ScheduleTables.c.
void ScheduleTable_startup | ( | void | ) |
Startup function for schedule table management.
This function starts all schedule tables configured as autostart and handles expiry points if necessary.
Definition at line 343 of file ScheduleTables.c.
StatusType ScheduleTable_StopScheduleTable | ( | ScheduleTableType | scheduleTableID | ) |
Stop schedule table.
Stop execution of the schedule table.
scheduleTableID | ID of the schedule table to stop |
Definition at line 147 of file ScheduleTables.c.