SNIP_CLASSIC_COM_SECTION_8_5_Scheduled_functions
Wortlaut
8.5 Scheduled functions
Many BSW Modules have one or more Scheduled Functions (also called Main processing functions) that have to be called cyclically or upon an event (e.g. within an OS
Task) and that do the main work of the module.
Scheduled functions are directly called by Basic Software Scheduler. They have no
return value and no parameter. Calling of Scheduled functions is restricted to the BSW
Scheduler, see chapter 7.1.11.
The according BSW Module specification either defines one Scheduled function and
handles all the processing internally or defines multiple Scheduled functions with appropriate module specific extensions. This depends on specific BSW Module requirements.
Scheduled functions are specified in chapter 8 of the corresponding BSW Module
specification. These functions are defined using the following template:
Service name:
Name of API call
Syntax:
Syntax of call including return type and parameters.
Service ID[hex]:
Number of service ID. This ID is used as parameter for the error report API of Default Error
Tracer.
Description:
Short description of the scheduled function
Table 8.3: Scheduled functions template
General Specification of Basic Software Modules
[SWS_BSW_00153] Naming convention for Scheduled functions
Upstream requirements: SRS_BSW_00373, SRS_BSW_00347
⌈Scheduled functions of a BSW Module shall be named according to the following:
<Mip>_MainFunction[<Sd>]
Where <Mip> is the Module implementation prefix [SWS_BSW_00102]. The content
between brackets shall be used only if the module defines more than one Scheduled
function, where <Sd> is a module specific name extension given to every function.⌋
Examples (for illustration only):
• Possible main processing function of EEPROM driver:
void Eep_21_LDExt_MainFunction(void)
• Possible main processing functions of Communication module:
void Com_MainFunctionRx(void)
void Com_MainFunctionTx(void)
void Com_MainFunctionRouteSignals(void)
[SWS_BSW_00154] Scheduled functions have no parameters
Upstream requirements: SRS_BSW_00373
⌈Scheduled functions shall have no parameters and no return value. Their return type
is always void.⌋
Note:
Scheduled functions are typically not reentrant.
Scheduled functions must be able to be allocated to a basic task. Because of this, they
are not allowed to enter any wait state.
[SWS_BSW_00156] Scheduled functions do not enter a wait state
Upstream requirements: SRS_BSW_00424
⌈Scheduled functions shall not enter any wait state.⌋
Typically, basic tasks are more efficient then extended tasks. Extended and basic task
are classified in the Specification of Operating System [12].
The scheduling strategy that is built inside the BSW Modules must be properly documented, see also [SWS_BSW_00054].
General Specification of Basic Software Modules
Versionen & Provenienz · Zugeordnete Anforderungen
Diese Angaben zeigt der Versions-Explorer.
Begründung & Zuweisungs-Evidenz
Example Com scheduled function routing signals
Dokumenten-Herkunft & Rückverfolgbarkeit
| Spezifikations-Dokument | SWS_BSWGeneral.pdf |
|---|---|
| Dokumentseite | Seite 79 |
| Ziel-Modul | com (classic) |
| Ziel-Anforderung | SWS_Com_00400 |
| Semantische Rolle | heuristic |
| Automatisierungs-Konfidenz | 0.70 |