AutosarOS
ScheduleTables.h File Reference

Schedule tables management. More...

#include "Types.h"
Include dependency graph for ScheduleTables.h:
This graph shows which files directly or indirectly include this file:

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...
 

Detailed Description

Schedule tables management.

Date
2020-06-25
Author
Pascal Romahn

Definition in file ScheduleTables.h.

Function Documentation

◆ ScheduleTable_GetScheduleTableStatus()

StatusType ScheduleTable_GetScheduleTableStatus ( ScheduleTableType  scheduleTableID,
ScheduleTableStatusRefType  scheduleStatus 
)

Get schedule table status.

Get current status of a schedule table.

Parameters
scheduleTableIDID of schedule table
scheduleStatusReference to status
Returns
E_OK No error
E_OS_ID Invalid schedule table ID
E_OS_PARAM_POINTER Pointer parameter is invalid

Definition at line 218 of file ScheduleTables.c.

◆ ScheduleTable_handleSysTick()

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.

Here is the call graph for this function:

◆ ScheduleTable_handleTick()

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.

Parameters
counterID of the counter that triggered the tick

Definition at line 248 of file ScheduleTables.c.

Here is the caller graph for this function:

◆ ScheduleTable_NextScheduleTable()

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.

Parameters
scheduleTableID_fromID of current schedule table
scheduleTableID_toID of schedule table to be queued
Returns
E_OK No error
E_OS_ID Invalid schedule table IDs or counters not matching
E_OS_NOFUNC Current schedule table is not started
E_OS_STATE Schedule table to be queued is not stopped

Definition at line 174 of file ScheduleTables.c.

◆ ScheduleTable_StartScheduleTableAbs()

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.

Parameters
scheduleTableIDID of the schedule table to start
startStart value in ticks
Returns
E_OK No error
E_OS_ID Invalid schedule table ID
E_OS_VALUE Value of start is invalid
E_OS_STATE Schedule table was already started

Definition at line 116 of file ScheduleTables.c.

Here is the call graph for this function:

◆ ScheduleTable_StartScheduleTableRel()

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.

Parameters
scheduleTableIDID of the schedule table to start
offsetOffset in Ticks before the schedule table is executed
Returns
E_OK No error
E_OS_ID Invalid schedule table ID
E_OS_VALUE Value of offset is invalid
E_OS_STATE Schedule table was already started

Definition at line 79 of file ScheduleTables.c.

Here is the caller graph for this function:

◆ ScheduleTable_startup()

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.

◆ ScheduleTable_StopScheduleTable()

StatusType ScheduleTable_StopScheduleTable ( ScheduleTableType  scheduleTableID)

Stop schedule table.

Stop execution of the schedule table.

Parameters
scheduleTableIDID of the schedule table to stop
Returns
E_OK No error
E_OS_ID Invalid schedule table ID
E_OS_NOFUNC Schedule table was already stopped

Definition at line 147 of file ScheduleTables.c.