Initial commit: demo-epb v1.0 — Elektrische Parkbremse Demo

Vollstaendige Demo des slohmaier Dev Process anhand einer EPB-Steuergeraet-
Software. Zeigt ASPICE 4.0 / ISO 26262-konforme Entwicklung im Monorepo.

Inhalte:
- 5 Plaene (PID, PM-, QA-, SWE-, Test-Plan) in Word, ausgefuellt mit
  EPB-spezifischen Inhalten
- 10 System-Anforderungen + 25 Software-Anforderungen (Doorstop-MD)
- 5 System-Architektur-Elemente + 10 Software-Architektur-Elemente
  mit PlantUML-Diagrammen und vollstaendigem Mapping
- 3 implementierte Komponenten (Apply Controller D, Actuator Driver B,
  Switch Debouncer QM) plus 7 Header-Stubs
- 28 Unit-Tests, alle gruen, mit Coverage- und MISRA-Build-Targets
- Audit-Artefakte: 1 Review-Protokoll, 1 Non-Conformity, 1 MISRA-Record
- Gitea-Actions-CI-Pipeline (validate.yml)
- Doorstop-Konfiguration fuer bidirektionale Traceability
- Generator-Skript fuer alle 50 Reqs/Arch-Elemente aus Strukturdaten
- README mit gefuehrter Tour fuer Prospects
This commit is contained in:
Stefan Lohmaier
2026-05-11 13:51:02 -07:00
commit 1855162e6d
92 changed files with 4116 additions and 0 deletions
+80
View File
@@ -0,0 +1,80 @@
---
active: true
derived: false
header: 'Apply Controller'
level: 1.2
normative: true
reviewed: null
links:
- SWE-001
- SWE-002
- SWE-003
- SWE-004
asil: D
---
# SWA-002: Apply Controller
## Verantwortung
Zentraler Controller fuer Apply, Hold und Release der Parkbremse.
ASIL-D-Kern der EPB-Software. Implementiert in `src/apply_controller.c`.
## Statische Sicht
```plantuml
@startuml
[Apply Controller] --> [Actuator Driver L] : apply/release
[Apply Controller] --> [Actuator Driver R] : apply/release
[Switch Debouncer] --> [Apply Controller] : sw_apply, sw_release
[Safety Manager] --> [Apply Controller] : auto_apply, hill_hold_request
[Apply Controller] --> [Display Manager] : status
[Apply Controller] <-- [Watchdog] : alive_check
@enduml
```
## Schnittstellen (Provided)
```c
Status apply_ctrl_init(void);
void apply_ctrl_step_50ms(const ApplyInputs* in);
EpbStatus apply_ctrl_get_status(void);
```
## Dynamisches Verhalten
```plantuml
@startuml
[*] --> Released
Released --> Applying : apply_request & v_low
Applying --> Applied : current_target_reached
Applied --> Releasing : release_request & preconditions_ok
Applied --> Applied : 50ms hold check (re-clamp if needed)
Releasing --> Released : release_complete
Applying --> Error : timeout > 1500ms
Releasing --> Error : timeout > 1200ms
Error --> Released : reset & no fault
@enduml
```
## Ressourcen
- Stack: <= 384 B
- Worst-Case Timing: 350 us / Aufruf
## Designentscheidungen
| Entscheidung | Begruendung |
|--------------|-------------|
| Statische Allokation, kein Heap | Determinismus, MISRA C 21.3 |
| State Machine | Einfacher zu verifizieren, deterministisch |
| 50ms Step-Funktion | Synchron zur Inclinometer-Abtastung |
## Mapping auf Anforderungen
| Anforderung | Wie abgedeckt |
|-------------|---------------|
| SWE-001 | Hold-Zustand mit periodischer Klemmkraft-Pruefung |
| SWE-002 | Watchdog-Pet im step_50ms |
| SWE-003 | sw_apply Input wird sofort ausgewertet |
| SWE-004 | Current-Target-Detektion via Actuator-Driver-Feedback |