From a47e0aed3eb74bdd2b670d6929f211a676698a1b Mon Sep 17 00:00:00 2001 From: Stefan Lohmaier Date: Tue, 12 May 2026 03:28:54 -0700 Subject: [PATCH] feat(i18n): tools + landing page + doorstop generator in English Phase 1 of full English translation: - generate_doorstop_items.py: all 55 items (SG/SYS/SWE/SA/SWA) rewritten in English - generate_landing_page.py: full UI labels, KPI cards, section headings in English - traceability.py: docstring, error messages, HTML headers in English - generate_test_report.py: report content + table headers in English - All 55 markdown items in safety/sg/, reqs/, arch/ regenerated in English Still to come: - demo-epb filled Word docs (PID, plans, safety, manuals, audit artefacts) - Code comments + test names + CI workflow step names - README + dev-process repo templates --- arch/swe/SWA-001.md | 30 +- arch/swe/SWA-002.md | 43 +- arch/swe/SWA-003.md | 32 +- arch/swe/SWA-004.md | 12 +- arch/swe/SWA-005.md | 7 +- arch/swe/SWA-006.md | 17 +- arch/swe/SWA-007.md | 10 +- arch/swe/SWA-008.md | 7 +- arch/swe/SWA-009.md | 7 +- arch/swe/SWA-010.md | 8 +- arch/sys/SA-001.md | 60 +-- arch/sys/SA-002.md | 34 +- arch/sys/SA-003.md | 38 +- arch/sys/SA-004.md | 22 +- arch/sys/SA-005.md | 21 +- docs/traceability/index.html | 110 ++--- docs/traceability/matrix.json | 24 +- reqs/swe/SWE-001.md | 6 +- reqs/swe/SWE-002.md | 6 +- reqs/swe/SWE-003.md | 6 +- reqs/swe/SWE-004.md | 6 +- reqs/swe/SWE-005.md | 6 +- reqs/swe/SWE-006.md | 6 +- reqs/swe/SWE-007.md | 6 +- reqs/swe/SWE-008.md | 6 +- reqs/swe/SWE-009.md | 6 +- reqs/swe/SWE-010.md | 6 +- reqs/swe/SWE-011.md | 6 +- reqs/swe/SWE-012.md | 6 +- reqs/swe/SWE-013.md | 6 +- reqs/swe/SWE-014.md | 6 +- reqs/swe/SWE-015.md | 6 +- reqs/swe/SWE-016.md | 6 +- reqs/swe/SWE-017.md | 6 +- reqs/swe/SWE-018.md | 6 +- reqs/swe/SWE-019.md | 6 +- reqs/swe/SWE-020.md | 6 +- reqs/swe/SWE-021.md | 6 +- reqs/swe/SWE-022.md | 6 +- reqs/swe/SWE-023.md | 6 +- reqs/swe/SWE-024.md | 6 +- reqs/swe/SWE-025.md | 6 +- reqs/sys/SYS-001.md | 8 +- reqs/sys/SYS-002.md | 6 +- reqs/sys/SYS-003.md | 6 +- reqs/sys/SYS-004.md | 6 +- reqs/sys/SYS-005.md | 6 +- reqs/sys/SYS-006.md | 6 +- reqs/sys/SYS-007.md | 6 +- reqs/sys/SYS-008.md | 6 +- reqs/sys/SYS-009.md | 6 +- reqs/sys/SYS-010.md | 6 +- safety/sg/SG-001.md | 8 +- safety/sg/SG-002.md | 8 +- safety/sg/SG-003.md | 8 +- safety/sg/SG-004.md | 8 +- safety/sg/SG-005.md | 8 +- tools/generate_doorstop_items.py | 682 ++++++++++++++++--------------- tools/generate_landing_page.py | 128 +++--- tools/generate_test_report.py | 22 +- tools/traceability.py | 42 +- 61 files changed, 805 insertions(+), 803 deletions(-) diff --git a/arch/swe/SWA-001.md b/arch/swe/SWA-001.md index 5861d9f..a9281fe 100644 --- a/arch/swe/SWA-001.md +++ b/arch/swe/SWA-001.md @@ -17,12 +17,12 @@ asil: D # SWA-001: Safety Manager -## Verantwortung +## Responsibility -Hoechste Sicherheitsschicht. Erkennt Motor-Aus, aktiviert Hill-Hold, -triggert Auto-Apply. Lebenswichtige Logik mit redundanter Pruefung. +Highest safety layer. Detects engine-off, activates hill-hold, +triggers auto-apply. Life-critical logic with redundant checks. -## Statische Sicht +## Static view ```plantuml @startuml @@ -31,20 +31,20 @@ package "Safety Manager" { [Hill-Hold Logic] [Auto-Apply Logic] } -[Safety Manager] ..> [Apply Controller] : Apply-Anforderung +[Safety Manager] ..> [Apply Controller] : apply request [Wheel Speed Plausi] --> [Safety Manager] : v_vehicle [Inclinometer Filter] --> [Safety Manager] : grade @enduml ``` -## Schnittstellen (Provided) +## Provided interfaces ```c Status safety_mgr_init(void); void safety_mgr_step_50ms(const SafetyInputs* in); ``` -## Dynamisches Verhalten +## Dynamic behaviour ```plantuml @startuml @@ -58,16 +58,16 @@ AutoApplyTriggered --> Idle : applied @enduml ``` -## Ressourcen +## Resources - Stack: <= 256 B -- Worst-Case Timing: 200 us / Aufruf +- Worst-case timing: 200 us per call -## Mapping auf Anforderungen +## Mapping to requirements -| Anforderung | Wie abgedeckt | -|-------------|---------------| +| Requirement | How covered | +|-------------|-------------| | SWE-007 | engine_off + v<0.5 in step_50ms | -| SWE-008 | 2s-Filter und Trigger | -| SWE-009 | Hill-Hold-Aktivierung | -| SWE-010 | Brake-Released-Detektion | +| SWE-008 | 2 s filter and trigger | +| SWE-009 | hill-hold activation | +| SWE-010 | brake-released detection | diff --git a/arch/swe/SWA-002.md b/arch/swe/SWA-002.md index 6aea22e..8231419 100644 --- a/arch/swe/SWA-002.md +++ b/arch/swe/SWA-002.md @@ -16,12 +16,13 @@ asil: D # SWA-002: Apply Controller -## Verantwortung +## Responsibility -Zentraler Controller fuer Apply, Hold und Release der Parkbremse. -ASIL-D-Kern der EPB-Software. Implementiert in `src/apply_controller.c`. +Central controller for apply, hold and release of the parking brake. +ASIL-D core of the EPB software. Implemented in +`src/apply_controller.c`. -## Statische Sicht +## Static view ```plantuml @startuml @@ -34,7 +35,7 @@ ASIL-D-Kern der EPB-Software. Implementiert in `src/apply_controller.c`. @enduml ``` -## Schnittstellen (Provided) +## Provided interfaces ```c Status apply_ctrl_init(void); @@ -42,7 +43,7 @@ void apply_ctrl_step_50ms(const ApplyInputs* in); EpbStatus apply_ctrl_get_status(void); ``` -## Dynamisches Verhalten +## Dynamic behaviour ```plantuml @startuml @@ -58,24 +59,24 @@ Error --> Released : reset & no fault @enduml ``` -## Ressourcen +## Resources - Stack: <= 384 B -- Worst-Case Timing: 350 us / Aufruf +- Worst-case timing: 350 us per call -## Designentscheidungen +## Design decisions -| Entscheidung | Begruendung | -|--------------|-------------| -| Statische Allokation, kein Heap | Determinismus, MISRA C 21.3 | -| State Machine | Einfacher zu verifizieren, deterministisch | -| 50ms Step-Funktion | Synchron zur Inclinometer-Abtastung | +| Decision | Rationale | +|----------|-----------| +| Static allocation, no heap | Determinism, MISRA C 21.3 | +| State machine | Easier to verify, deterministic | +| 50 ms step function | Synchronous with inclinometer sample rate | -## Mapping auf Anforderungen +## Mapping to requirements -| 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 | +| Requirement | How covered | +|-------------|-------------| +| SWE-001 | Hold state with periodic clamping-force check | +| SWE-002 | Watchdog pet in step_50ms | +| SWE-003 | sw_apply input is evaluated immediately | +| SWE-004 | current-target detection via actuator-driver feedback | diff --git a/arch/swe/SWA-003.md b/arch/swe/SWA-003.md index b73b426..4d73112 100644 --- a/arch/swe/SWA-003.md +++ b/arch/swe/SWA-003.md @@ -15,13 +15,13 @@ asil: B # SWA-003: Actuator Driver -## Verantwortung +## Responsibility -Low-Level-Ansteuerung der beiden Aktor-Motoren. PWM-Generierung, -Strom-Messung, Overcurrent-Cutoff, Klemmkraft-Schaetzung. -Implementiert in `src/actuator_driver.c`. +Low-level control of the two actuator motors. PWM generation, +current measurement, overcurrent cutoff, clamping-force estimation. +Implemented in `src/actuator_driver.c`. -## Statische Sicht +## Static view ```plantuml @startuml @@ -32,7 +32,7 @@ Implementiert in `src/actuator_driver.c`. @enduml ``` -## Schnittstellen (Provided) +## Provided interfaces ```c Status actuator_init(void); @@ -40,20 +40,20 @@ void actuator_apply(ActuatorId id, uint8_t pwm_percent); void actuator_release(ActuatorId id, uint8_t pwm_percent); void actuator_stop(ActuatorId id); ActuatorStatus actuator_get_status(ActuatorId id); -void actuator_isr_1khz(void); // Strom-Sampling +void actuator_isr_1khz(void); // Current sampling ``` -## Ressourcen +## Resources - Stack: <= 256 B -- Worst-Case Timing: 50 us / ISR -- Static RAM: 64 B pro Aktor +- Worst-case timing: 50 us per ISR +- Static RAM: 64 B per actuator -## Mapping auf Anforderungen +## Mapping to requirements -| Anforderung | Wie abgedeckt | -|-------------|---------------| -| SWE-006 | actuator_release fuer beide Aktoren parallel | +| Requirement | How covered | +|-------------|-------------| +| SWE-006 | actuator_release for both actuators in parallel | | SWE-013 | actuator_isr_1khz | -| SWE-014 | Overcurrent-Detektor in ISR | -| SWE-015 | Peak-Current-Tracking + lineare Klemmkraft-Schaetzung | +| SWE-014 | overcurrent detector in ISR | +| SWE-015 | peak-current tracking + linear clamping-force estimate | diff --git a/arch/swe/SWA-004.md b/arch/swe/SWA-004.md index 9c9edac..e445fe3 100644 --- a/arch/swe/SWA-004.md +++ b/arch/swe/SWA-004.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Wheel Speed Plausibilisierung' +header: 'Wheel Speed Plausibilisation' level: 1.4 normative: true reviewed: null @@ -11,14 +11,14 @@ links: asil: B --- -# SWA-004: Wheel Speed Plausibilisierung +# SWA-004: Wheel Speed Plausibilisation -## Verantwortung +## Responsibility -Aufbereitung und Plausibilisierung der 4 Wheel-Speed-Signale. Erkennt -Stillstand und plausibilisiert untereinander. +Conditioning and plausibilisation of the four wheel-speed signals. +Detects standstill and cross-checks the wheels. -## Schnittstellen (Provided) +## Provided interfaces ```c Status wheel_speed_init(void); diff --git a/arch/swe/SWA-005.md b/arch/swe/SWA-005.md index c0f5c21..7c3a14d 100644 --- a/arch/swe/SWA-005.md +++ b/arch/swe/SWA-005.md @@ -12,11 +12,12 @@ asil: B # SWA-005: Inclinometer Filter -## Verantwortung +## Responsibility -Tiefpass-Filterung des Inclinometer-Roh-Signals fuer die Hill-Hold-Bewertung. +Low-pass filtering of the raw inclinometer signal for hill-hold +evaluation. -## Schnittstellen (Provided) +## Provided interfaces ```c Status inclino_init(void); diff --git a/arch/swe/SWA-006.md b/arch/swe/SWA-006.md index 589a10c..658d6de 100644 --- a/arch/swe/SWA-006.md +++ b/arch/swe/SWA-006.md @@ -12,12 +12,13 @@ asil: QM # SWA-006: Switch Debouncer -## Verantwortung +## Responsibility -Software-Entprellung des EPB-Schalters. Liefert stabiles Apply / Release -Signal an den Apply-Controller. Implementiert in `src/switch_debouncer.c`. +Software debouncing of the EPB switch. Provides a stable apply / +release signal to the apply controller. Implemented in +`src/switch_debouncer.c`. -## Schnittstellen (Provided) +## Provided interfaces ```c Status switch_init(void); @@ -25,8 +26,8 @@ void switch_step_10ms(SwitchRaw raw); SwitchState switch_get_state(void); ``` -## Mapping auf Anforderungen +## Mapping to requirements -| Anforderung | Wie abgedeckt | -|-------------|---------------| -| SWE-025 | 50ms Debounce-Logik | +| Requirement | How covered | +|-------------|-------------| +| SWE-025 | 50 ms debounce logic | diff --git a/arch/swe/SWA-007.md b/arch/swe/SWA-007.md index 649402f..4da1e87 100644 --- a/arch/swe/SWA-007.md +++ b/arch/swe/SWA-007.md @@ -13,15 +13,15 @@ asil: QM # SWA-007: Display Manager -## Verantwortung +## Responsibility -Steuert LED am EPB-Schalter und CAN-Status-Frame an das Kombi-Display. -Empfaengt Status vom Apply-Controller. +Drives the LED on the EPB switch and the CAN status frame to the +instrument cluster. Receives status from the apply controller. -## Schnittstellen (Provided) +## Provided interfaces ```c Status display_init(void); void display_set_status(EpbStatus s); -void display_step_20ms(void); // 50 Hz CAN-Frame +void display_step_20ms(void); // 50 Hz CAN frame ``` diff --git a/arch/swe/SWA-008.md b/arch/swe/SWA-008.md index 081e834..4deeb91 100644 --- a/arch/swe/SWA-008.md +++ b/arch/swe/SWA-008.md @@ -13,11 +13,12 @@ asil: QM # SWA-008: Diagnostic Manager -## Verantwortung +## Responsibility -UDS-Diagnose nach ISO 14229: ReadDTC, ReadDataByIdentifier, RoutineControl. +UDS diagnostics per ISO 14229: ReadDTC, ReadDataByIdentifier, +RoutineControl. -## Schnittstellen (Provided) +## Provided interfaces ```c Status diag_init(void); diff --git a/arch/swe/SWA-009.md b/arch/swe/SWA-009.md index 3f186d2..76e7121 100644 --- a/arch/swe/SWA-009.md +++ b/arch/swe/SWA-009.md @@ -13,7 +13,8 @@ asil: QM # SWA-009: Service Mode -## Verantwortung +## Responsibility -Service-Modus fuer Werkstatt. Wird ueber UDS RoutineControl 0x31, Routine-ID -0x0301 aktiviert. Steuert Aktoren in Wartungsposition. +Service mode for the workshop. Activated via UDS RoutineControl +0x31, routine ID 0x0301. Drives the actuators into maintenance +position. diff --git a/arch/swe/SWA-010.md b/arch/swe/SWA-010.md index 0b7f56e..65ecf4d 100644 --- a/arch/swe/SWA-010.md +++ b/arch/swe/SWA-010.md @@ -13,12 +13,12 @@ asil: QM # SWA-010: Logger -## Verantwortung +## Responsibility -Logging fuer Entwicklung und Service. Ringpuffer im RAM (1 KB) sowie -Persistenz im EEPROM bei kritischen Ereignissen. +Logging for development and service. Ring buffer in RAM (1 KB) +plus persistence in EEPROM on critical events. -## Schnittstellen (Provided) +## Provided interfaces ```c Status log_init(void); diff --git a/arch/sys/SA-001.md b/arch/sys/SA-001.md index 07c032e..9e98671 100644 --- a/arch/sys/SA-001.md +++ b/arch/sys/SA-001.md @@ -21,28 +21,28 @@ asil: D # SA-001: EPB ECU -## Verantwortung +## Responsibility -Zentrales Steuergeraet der elektrischen Parkbremse. Beinhaltet alle Software- -Komponenten und die elektronische Ansteuerung der Aktoren. +Central control unit of the electric parking brake. Contains all +software components and the electronic actuation of the actuators. -## System-Kontext +## System context ```plantuml @startuml node "EPB ECU" as ECU -node "Aktor links" as AL -node "Aktor rechts" as AR -node "Wheel Speed Sensoren (x4)" as WS +node "Actuator left" as AL +node "Actuator right" as AR +node "Wheel-speed sensors (x4)" as WS node "Inclinometer" as IN -node "EPB-Schalter + LED" as SW -node "CAN-Bus" as CAN -node "Kombi-Display" as DI -node "OBD-Tester" as OBD +node "EPB switch + LED" as SW +node "CAN bus" as CAN +node "Instrument cluster" as DI +node "OBD tester" as OBD -ECU --> AL : PWM, I-Mess -ECU --> AR : PWM, I-Mess -WS --> ECU : Pulse +ECU --> AL : PWM, I-meas +ECU --> AR : PWM, I-meas +WS --> ECU : pulses IN --> ECU : SPI SW --> ECU : GPIO ECU --> SW : LED @@ -52,24 +52,24 @@ CAN <-> OBD @enduml ``` -## Schnittstellen +## Interfaces -| Schnittstelle | Typ | Richtung | -|---------------|----------------|----------| -| Aktor L/R | PWM + Shunt | I/O | -| Wheel Speed | Hall-Pulse | In | -| Inclinometer | SPI | In | -| Schalter | GPIO debounced | In | -| LED | GPIO | Out | -| CAN | ISO 11898 | I/O | +| Interface | Type | Direction | +|---------------|------------------|-----------| +| Actuator L/R | PWM + shunt | I/O | +| Wheel speed | Hall pulses | in | +| Inclinometer | SPI | in | +| Switch | GPIO debounced | in | +| LED | GPIO | out | +| CAN | ISO 11898 | I/O | -## Subkomponenten (Aufteilung auf SW) +## Subcomponents (allocated to software) -Realisiert in Software: alle SWA-Elemente SWA-001..SWA-010. +Realised in software: all SWA elements SWA-001..SWA-010. -## Nichtfunktionale Eigenschaften +## Non-functional properties -- Worst-Case Reaktionszeit (Schalter → Aktor-Bewegung): 250 ms -- Flash-Bedarf: < 256 KB -- RAM-Bedarf: < 32 KB -- Stromaufnahme: < 200 mA (Standby) / < 30 A (Aktor-Spitze) +- Worst-case reaction time (switch to actuator motion): 250 ms +- Flash demand: < 256 KB +- RAM demand: < 32 KB +- Current: < 200 mA (standby) / < 30 A (actuator peak) diff --git a/arch/sys/SA-002.md b/arch/sys/SA-002.md index bfa7390..073925c 100644 --- a/arch/sys/SA-002.md +++ b/arch/sys/SA-002.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Aktoren (Caliper-Motoren)' +header: 'Actuators (calliper motors)' level: 1.2 normative: true reviewed: null @@ -13,25 +13,25 @@ links: asil: D --- -# SA-002: Aktoren (Caliper-Motoren) +# SA-002: Actuators (calliper motors) -## Verantwortung +## Responsibility -Zwei elektromechanische Aktoren an den hinteren Bremssaetteln klemmen -und loesen die Bremsbelaege. Geliefert (Annahme): kommerzielles Bauteil -eines Tier-1-Lieferanten. +Two electromechanical actuators on the rear callipers clamp and +release the brake pads. Supplied (assumption): commercial component +from a Tier-1 supplier. -## Schnittstellen +## Interfaces -| Schnittstelle | Typ | Bemerkung | -|---------------|--------------|-----------------------------------| -| Power | 12 V, PWM | bidirektional fuer Apply/Release | -| Strom-Shunt | Analog | wird in der ECU abgegriffen | +| Interface | Type | Notes | +|---------------|--------------|---------------------------------| +| Power | 12 V, PWM | bidirectional for apply/release | +| Current shunt | analog | sampled inside the ECU | -## Nichtfunktionale Eigenschaften +## Non-functional properties -- Max. Klemmkraft: 20 kN -- Apply-Zeit (0 → max): 600 ms -- Strom (nominal): 4 A -- Strom (Spitze): 30 A (kurzzeitig) -- Temperaturbereich: -40°C bis +85°C +- Max clamping force: 20 kN +- Apply time (0 → max): 600 ms +- Nominal current: 4 A +- Peak current: 30 A (brief) +- Temperature range: -40 °C to +85 °C diff --git a/arch/sys/SA-003.md b/arch/sys/SA-003.md index b98b8f2..26554ad 100644 --- a/arch/sys/SA-003.md +++ b/arch/sys/SA-003.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Sensor-Cluster' +header: 'Sensor cluster' level: 1.3 normative: true reviewed: null @@ -12,27 +12,27 @@ links: asil: B --- -# SA-003: Sensor-Cluster +# SA-003: Sensor cluster -## Verantwortung +## Responsibility -Zusammenfassung aller fuer die EPB benoetigten Eingangssignale: -Wheel-Speed-Sensoren (4x), Inclinometer (1x), EPB-Schalter, Bremspedal- -Status, Gear-Position, Door-Open, Seat-Belt — die letzten vier per CAN. +Summary of all input signals required by the EPB: wheel-speed +sensors (4x), inclinometer (1x), EPB switch, brake-pedal status, +gear position, door open, seatbelt — the last four via CAN. -## Schnittstellen +## Interfaces -| Sensor | Typ | Quelle | -|-----------------|------------------|--------------| -| Wheel Speed x4 | Hall-Pulse | direkt | -| Inclinometer | SPI 1 kHz | direkt | -| EPB-Schalter | GPIO | direkt | -| Bremspedal | CAN 0x100 | aus BCM | -| Gear | CAN 0x110 | aus TCU | -| Door / Belt | CAN 0x120 | aus BCM | +| Sensor | Type | Source | +|-----------------|--------------|------------| +| Wheel speed x4 | Hall pulses | direct | +| Inclinometer | SPI 1 kHz | direct | +| EPB switch | GPIO | direct | +| Brake pedal | CAN 0x100 | from BCM | +| Gear | CAN 0x110 | from TCU | +| Door / belt | CAN 0x120 | from BCM | -## Nichtfunktionale Eigenschaften +## Non-functional properties -- Wheel-Speed-Genauigkeit: +/- 0.1 km/h ab 1 km/h -- Inclinometer-Genauigkeit: +/- 0.5° -- Sampling-Frequenz Inclinometer: 100 Hz +- Wheel-speed accuracy: +/- 0.1 km/h above 1 km/h +- Inclinometer accuracy: +/- 0.5° +- Inclinometer sampling rate: 100 Hz diff --git a/arch/sys/SA-004.md b/arch/sys/SA-004.md index 3efd47e..4d4003a 100644 --- a/arch/sys/SA-004.md +++ b/arch/sys/SA-004.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'HMI (Schalter, LED, Display)' +header: 'HMI (switch, LED, display)' level: 1.4 normative: true reviewed: null @@ -11,17 +11,17 @@ links: asil: QM --- -# SA-004: HMI (Schalter, LED, Display) +# SA-004: HMI (switch, LED, display) -## Verantwortung +## Responsibility -Fahrer-Interaktion und -Information: Tippschalter mit integrierter LED, -Statusanzeige im Kombi-Display via CAN. +Driver interaction and information: tap switch with integrated LED, +status display in the instrument cluster via CAN. -## Schnittstellen +## Interfaces -| Element | Typ | Verhalten | -|---------------|----------|--------------------------------------------| -| Tippschalter | GPIO | Apply-Richtung / Release-Richtung | -| LED | GPIO | aus / an / blink 2 Hz / blink 4 Hz | -| Display | CAN 0x3A0 | 50 Hz Status-Frame | +| Element | Type | Behaviour | +|---------------|----------|-------------------------------------------| +| Tap switch | GPIO | apply direction / release direction | +| LED | GPIO | off / on / blink 2 Hz / blink 4 Hz | +| Display | CAN 0x3A0| 50 Hz status frame | diff --git a/arch/sys/SA-005.md b/arch/sys/SA-005.md index d96be79..2fc2767 100644 --- a/arch/sys/SA-005.md +++ b/arch/sys/SA-005.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'CAN-Bus' +header: 'CAN bus' level: 1.5 normative: true reviewed: null @@ -11,16 +11,17 @@ links: asil: QM --- -# SA-005: CAN-Bus +# SA-005: CAN bus -## Verantwortung +## Responsibility -Kommunikations-Backbone fuer Eingangsdaten (Bremspedal, Gang, Tuer, Gurt), -Ausgabe (Status-Frame an Display) und Diagnose (UDS auf Tester-Adresse). +Communication backbone for input data (brake pedal, gear, door, +belt), output (status frame to the display) and diagnostics (UDS +on the tester address). -## Schnittstellen +## Interfaces -- Baudrate: 500 kbit/s, CAN 2.0B -- Empfangene Frames: 0x100 (Bremspedal), 0x110 (Gang), 0x120 (Door/Belt), - 0x712 (UDS-Request) -- Gesendete Frames: 0x3A0 (Status 50 Hz), 0x71A (UDS-Response) +- Baud rate: 500 kbit/s, CAN 2.0B +- Received frames: 0x100 (brake pedal), 0x110 (gear), + 0x120 (door/belt), 0x712 (UDS request) +- Sent frames: 0x3A0 (status 50 Hz), 0x71A (UDS response) diff --git a/docs/traceability/index.html b/docs/traceability/index.html index b53afae..2c2e43f 100644 --- a/docs/traceability/index.html +++ b/docs/traceability/index.html @@ -14,7 +14,7 @@ h1{color:#1f3864}h2{color:#1f3864;margin-top:30px} .missing{color:#c00}

demo-epb — Traceability Matrix

-

Vollstaendige Kette: SG → SYS → SA, SWE → SWA → Code (@arch) + Test (@reqs)

+

Complete chain: SG → SYS → SA, SWE → SWA → Code (@arch) + Test (@reqs)

SG: 5   SYS: 10   @@ -25,125 +25,125 @@ h1{color:#1f3864}h2{color:#1f3864;margin-top:30px} Test-Files: 4

- + - - - - - + + + + + - - + + - + - - - - - + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - + + + - - - + + +
Safety GoalSystem-RequirementSystem-ArchSoftware-ReqSoftware-ArchCodeTest
Safety GoalSystem RequirementSystem ArchSoftware ReqSoftware ArchCodeTest
SG-001 D
Kein ungewolltes Loesen der Parkbremse im Stillstand
SYS-001 D
Halten der Parkbremse im Stillstand
SA-001 D
EPB ECU
SA-002 D
Aktoren (Caliper-Motoren)
SWE-001 D
Apply-Controller haelt Klemmkraft
SWE-002 D
Watchdog ueberwacht Apply-Controller
SWE-022 B
Stillstands-Erkennung aus Wheel Speeds
SWA-002 D
Apply Controller
SWA-004 B
Wheel Speed Plausibilisierung
SG-001 D
No unintended release of the parking brake during standstill
SYS-001 D
Holding the parking brake at standstill
SA-001 D
EPB ECU
SA-002 D
Actuators (calliper motors)
SWE-001 D
Apply controller maintains clamping force
SWE-002 D
Watchdog monitors the apply controller
SWE-022 B
Standstill detection from wheel speeds
SWA-002 D
Apply Controller
SWA-004 B
Wheel Speed Plausibilisation
src/apply_controller.c
tests/unit/test_apply_controller.c
SG-001 D
Kein ungewolltes Loesen der Parkbremse im Stillstand
SYS-004 D
Auto-Apply bei Motor-Aus
SG-001 D
No unintended release of the parking brake during standstill
SYS-004 D
Auto-apply on engine off
SA-001 D
EPB ECU
SWE-007 D
Motor-Aus-Bedingung erkennen
SWE-008 D
Auto-Apply nach 2 s Verzoegerung
SWE-007 D
Detect engine-off condition
SWE-008 D
Auto-apply after 2 s delay
SWA-001 D
Safety Manager
src/safety_manager.c
tests/unit/test_safety_manager.c
SG-002 D
Kein ungewolltes Festklemmen waehrend der Fahrt
SYS-002 D
Apply auf Fahrer-Anforderung
SA-001 D
EPB ECU
SA-002 D
Aktoren (Caliper-Motoren)
SWE-003 D
Schalter-Apply-Signal an Apply-Controller weiterleiten
SWE-004 D
Klemmkraft-Erreichen bestaetigen
SWE-022 B
Stillstands-Erkennung aus Wheel Speeds
SWE-025 QM
Switch-Debouncing
SWA-002 D
Apply Controller
SWA-004 B
Wheel Speed Plausibilisierung
SWA-006 QM
Switch Debouncer
SG-002 D
No unintended clamping while driving
SYS-002 D
Apply on driver request
SA-001 D
EPB ECU
SA-002 D
Actuators (calliper motors)
SWE-003 D
Forward switch apply signal to the apply controller
SWE-004 D
Confirm target clamping force reached
SWE-022 B
Standstill detection from wheel speeds
SWE-025 QM
Switch debouncing
SWA-002 D
Apply Controller
SWA-004 B
Wheel Speed Plausibilisation
SWA-006 QM
Switch Debouncer
src/apply_controller.c
src/switch_debouncer.c
tests/unit/test_apply_controller.c
tests/unit/test_switch_debouncer.c
SG-002 D
Kein ungewolltes Festklemmen waehrend der Fahrt
SYS-005 D
Hill-Hold am Berg
SA-001 D
EPB ECU
SA-003 B
Sensor-Cluster
SWE-009 D
Hill-Hold-Aktivierungsbedingung
SWE-010 D
Hill-Hold-Uebergabe an Apply-Controller
SWE-024 B
Inclinometer Tiefpass-Filter
SG-002 D
No unintended clamping while driving
SYS-005 D
Hill-hold on an incline
SA-001 D
EPB ECU
SA-003 B
Sensor cluster
SWE-009 D
Hill-hold activation condition
SWE-010 D
Hill-hold handover to the apply controller
SWE-024 B
Inclinometer low-pass filter
SWA-001 D
Safety Manager
SWA-005 B
Inclinometer Filter
src/safety_manager.c
tests/unit/test_safety_manager.c
SG-003 A
Schutz gegen Aktor-Ueberlast
SYS-007 B
Aktor-Stromueberwachung
SA-001 D
EPB ECU
SA-002 D
Aktoren (Caliper-Motoren)
SA-003 B
Sensor-Cluster
SWE-013 B
Strommessung mit 1 kHz
SWE-014 B
Overcurrent-Cutoff
SWE-015 B
Klemmkraft-Schaetzung aus Strom-Profil
SWE-023 B
Wheel Speed Plausibilisierung
SWA-003 B
Actuator Driver
SWA-004 B
Wheel Speed Plausibilisierung
SG-003 A
Protection against actuator overload
SYS-007 B
Actuator current monitoring
SA-001 D
EPB ECU
SA-002 D
Actuators (calliper motors)
SA-003 B
Sensor cluster
SWE-013 B
Current sampling at 1 kHz
SWE-014 B
Overcurrent cutoff
SWE-015 B
Clamping force estimation from current profile
SWE-023 B
Wheel-speed plausibilisation
SWA-003 B
Actuator Driver
SWA-004 B
Wheel Speed Plausibilisation
src/actuator_driver.c
tests/unit/test_actuator_driver.c
SG-004 C
Zuverlaessige Hill-Hold-Uebergabe
SYS-005 D
Hill-Hold am Berg
SA-001 D
EPB ECU
SA-003 B
Sensor-Cluster
SWE-009 D
Hill-Hold-Aktivierungsbedingung
SWE-010 D
Hill-Hold-Uebergabe an Apply-Controller
SWE-024 B
Inclinometer Tiefpass-Filter
SG-004 C
Reliable hill-hold handover
SYS-005 D
Hill-hold on an incline
SA-001 D
EPB ECU
SA-003 B
Sensor cluster
SWE-009 D
Hill-hold activation condition
SWE-010 D
Hill-hold handover to the apply controller
SWE-024 B
Inclinometer low-pass filter
SWA-001 D
Safety Manager
SWA-005 B
Inclinometer Filter
src/safety_manager.c
tests/unit/test_safety_manager.c
SG-004 C
Zuverlaessige Hill-Hold-Uebergabe
SYS-006 B
Auto-Release beim Anfahren (Drive-Away-Assist)
SA-001 D
EPB ECU
SA-003 B
Sensor-Cluster
SWE-011 B
Anfahrabsicht erkennen
SWE-012 B
Sicherheits-Check vor Auto-Release
SWE-022 B
Stillstands-Erkennung aus Wheel Speeds
SWA-001 D
Safety Manager
SWA-004 B
Wheel Speed Plausibilisierung
SG-004 C
Reliable hill-hold handover
SYS-006 B
Auto-release on drive-away (Drive-Away Assist)
SA-001 D
EPB ECU
SA-003 B
Sensor cluster
SWE-011 B
Detect drive-away intent
SWE-012 B
Safety check before auto-release
SWE-022 B
Standstill detection from wheel speeds
SWA-001 D
Safety Manager
SWA-004 B
Wheel Speed Plausibilisation
src/safety_manager.c
tests/unit/test_safety_manager.c
SG-005 B
Reaktion auf Fahreranforderung
SYS-002 D
Apply auf Fahrer-Anforderung
SA-001 D
EPB ECU
SA-002 D
Aktoren (Caliper-Motoren)
SWE-003 D
Schalter-Apply-Signal an Apply-Controller weiterleiten
SWE-004 D
Klemmkraft-Erreichen bestaetigen
SWE-022 B
Stillstands-Erkennung aus Wheel Speeds
SWE-025 QM
Switch-Debouncing
SWA-002 D
Apply Controller
SWA-004 B
Wheel Speed Plausibilisierung
SWA-006 QM
Switch Debouncer
SG-005 B
Response to driver requests
SYS-002 D
Apply on driver request
SA-001 D
EPB ECU
SA-002 D
Actuators (calliper motors)
SWE-003 D
Forward switch apply signal to the apply controller
SWE-004 D
Confirm target clamping force reached
SWE-022 B
Standstill detection from wheel speeds
SWE-025 QM
Switch debouncing
SWA-002 D
Apply Controller
SWA-004 B
Wheel Speed Plausibilisation
SWA-006 QM
Switch Debouncer
src/apply_controller.c
src/switch_debouncer.c
tests/unit/test_apply_controller.c
tests/unit/test_switch_debouncer.c
SG-005 B
Reaktion auf Fahreranforderung
SYS-003 B
Release auf Fahrer-Anforderung
SA-001 D
EPB ECU
SA-002 D
Aktoren (Caliper-Motoren)
SWE-005 B
Release-Voraussetzungen pruefen
SWE-006 B
Aktoren in Release-Position fahren
SWE-025 QM
Switch-Debouncing
SG-005 B
Response to driver requests
SYS-003 B
Release on driver request
SA-001 D
EPB ECU
SA-002 D
Actuators (calliper motors)
SWE-005 B
Check release preconditions
SWE-006 B
Drive actuators into release position
SWE-025 QM
Switch debouncing
SWA-002 D
Apply Controller
SWA-003 B
Actuator Driver
SWA-006 QM
Switch Debouncer
src/apply_controller.c
src/actuator_driver.c
src/switch_debouncer.c
tests/unit/test_actuator_driver.c
tests/unit/test_apply_controller.c
tests/unit/test_switch_debouncer.c
SYS-008 QM
Service-Modus fuer Werkstatt
SA-001 D
EPB ECU
SA-004 QM
HMI (Schalter, LED, Display)
SWE-016 QM
UDS RoutineControl 0x31 fuer Service-Release
SWE-017 QM
Service-Mode-Indikator
SYS-008 QM
Service mode for the workshop
SA-001 D
EPB ECU
SA-004 QM
HMI (switch, LED, display)
SWE-016 QM
UDS RoutineControl 0x31 for service release
SWE-017 QM
Service mode indicator
SWA-009 QM
Service Mode
SYS-009 QM
UDS-Diagnose
SA-001 D
EPB ECU
SA-005 QM
CAN-Bus
SWE-018 QM
UDS Service 0x19 ReadDTC
SWE-019 QM
UDS Service 0x22 ReadDataByIdentifier
SYS-009 QM
UDS diagnostics
SA-001 D
EPB ECU
SA-005 QM
CAN bus
SWE-018 QM
UDS service 0x19 ReadDTC
SWE-019 QM
UDS service 0x22 ReadDataByIdentifier
SWA-008 QM
Diagnostic Manager
SWA-010 QM
Logger
SYS-010 QM
HMI-Statusanzeige
SA-001 D
EPB ECU
SA-004 QM
HMI (Schalter, LED, Display)
SA-005 QM
CAN-Bus
SWE-020 QM
LED-Steuerung
SWE-021 QM
CAN-Status-Frame
SYS-010 QM
HMI status display
SA-001 D
EPB ECU
SA-004 QM
HMI (switch, LED, display)
SA-005 QM
CAN bus
SWE-020 QM
LED control
SWE-021 QM
CAN status frame
SWA-007 QM
Display Manager
-

Code → Architektur

- +

Code → Architecture

+
Datei@arch@reqs
File@arch@reqs
src/safety_manager.cSWA-001SWE-007 SWE-008 SWE-009 SWE-010 SWE-011 SWE-012
src/apply_controller.cSWA-002SWE-001 SWE-002 SWE-003 SWE-004
src/actuator_driver.cSWA-003SWE-006 SWE-013 SWE-014 SWE-015
src/switch_debouncer.cSWA-006SWE-025
-

Test → Anforderungen

- +

Test → Requirements

+
Test-DateiDecklt SWA@reqs
diff --git a/docs/traceability/matrix.json b/docs/traceability/matrix.json index b583670..e17a146 100644 --- a/docs/traceability/matrix.json +++ b/docs/traceability/matrix.json @@ -7,7 +7,7 @@ "sys": { "id": "SYS-001", "asil": "D", - "title": "Halten der Parkbremse im Stillstand" + "title": "Holding the parking brake at standstill" }, "sa": [ { @@ -58,7 +58,7 @@ "sys": { "id": "SYS-004", "asil": "D", - "title": "Auto-Apply bei Motor-Aus" + "title": "Auto-apply on engine off" }, "sa": [ { @@ -97,7 +97,7 @@ "sys": { "id": "SYS-002", "asil": "D", - "title": "Apply auf Fahrer-Anforderung" + "title": "Apply on driver request" }, "sa": [ { @@ -158,7 +158,7 @@ "sys": { "id": "SYS-005", "asil": "D", - "title": "Hill-Hold am Berg" + "title": "Hill-hold on an incline" }, "sa": [ { @@ -209,7 +209,7 @@ "sys": { "id": "SYS-007", "asil": "B", - "title": "Aktor-Stromueberwachung" + "title": "Actuator current monitoring" }, "sa": [ { @@ -268,7 +268,7 @@ "sys": { "id": "SYS-005", "asil": "D", - "title": "Hill-Hold am Berg" + "title": "Hill-hold on an incline" }, "sa": [ { @@ -319,7 +319,7 @@ "sys": { "id": "SYS-006", "asil": "B", - "title": "Auto-Release beim Anfahren (Drive-Away-Assist)" + "title": "Auto-release on drive-away (Drive-Away Assist)" }, "sa": [ { @@ -370,7 +370,7 @@ "sys": { "id": "SYS-002", "asil": "D", - "title": "Apply auf Fahrer-Anforderung" + "title": "Apply on driver request" }, "sa": [ { @@ -431,7 +431,7 @@ "sys": { "id": "SYS-003", "asil": "B", - "title": "Release auf Fahrer-Anforderung" + "title": "Release on driver request" }, "sa": [ { @@ -487,7 +487,7 @@ "sys": { "id": "SYS-008", "asil": "QM", - "title": "Service-Modus fuer Werkstatt" + "title": "Service mode for the workshop" }, "sa": [ { @@ -523,7 +523,7 @@ "sys": { "id": "SYS-009", "asil": "QM", - "title": "UDS-Diagnose" + "title": "UDS diagnostics" }, "sa": [ { @@ -563,7 +563,7 @@ "sys": { "id": "SYS-010", "asil": "QM", - "title": "HMI-Statusanzeige" + "title": "HMI status display" }, "sa": [ { diff --git a/reqs/swe/SWE-001.md b/reqs/swe/SWE-001.md index 5c64029..71ced43 100644 --- a/reqs/swe/SWE-001.md +++ b/reqs/swe/SWE-001.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Apply-Controller haelt Klemmkraft' +header: 'Apply controller maintains clamping force' level: 1.1 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: D --- -# SWE-001: Apply-Controller haelt Klemmkraft +# SWE-001: Apply controller maintains clamping force -Der Apply-Controller muss die Klemmkraft im Hold-Zustand alle 50 ms verifizieren und bei Abweichung > 10% nachregeln. +The apply controller must verify the clamping force in the hold state every 50 ms and re-apply when the deviation exceeds 10%. diff --git a/reqs/swe/SWE-002.md b/reqs/swe/SWE-002.md index b9dbc19..1f77864 100644 --- a/reqs/swe/SWE-002.md +++ b/reqs/swe/SWE-002.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Watchdog ueberwacht Apply-Controller' +header: 'Watchdog monitors the apply controller' level: 1.2 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: D --- -# SWE-002: Watchdog ueberwacht Apply-Controller +# SWE-002: Watchdog monitors the apply controller -Ein unabhaengiger Watchdog muss die Liveness des Apply-Controllers mit 100 ms Timeout ueberwachen und bei Ausbleiben in den sicheren Zustand (Apply) gehen. +An independent watchdog must monitor the liveness of the apply controller with a 100 ms timeout and, on failure to respond, transition to the safe state (apply). diff --git a/reqs/swe/SWE-003.md b/reqs/swe/SWE-003.md index c34a3fe..598e30c 100644 --- a/reqs/swe/SWE-003.md +++ b/reqs/swe/SWE-003.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Schalter-Apply-Signal an Apply-Controller weiterleiten' +header: 'Forward switch apply signal to the apply controller' level: 1.3 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: D --- -# SWE-003: Schalter-Apply-Signal an Apply-Controller weiterleiten +# SWE-003: Forward switch apply signal to the apply controller -Das Software-Modul Switch-Debouncer muss ein entprelltes Apply-Signal innerhalb von 50 ms an den Apply-Controller liefern. +The Switch Debouncer software module must deliver a debounced apply signal to the apply controller within 50 ms. diff --git a/reqs/swe/SWE-004.md b/reqs/swe/SWE-004.md index 8aa595b..af0e97b 100644 --- a/reqs/swe/SWE-004.md +++ b/reqs/swe/SWE-004.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Klemmkraft-Erreichen bestaetigen' +header: 'Confirm target clamping force reached' level: 1.4 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: D --- -# SWE-004: Klemmkraft-Erreichen bestaetigen +# SWE-004: Confirm target clamping force reached -Der Apply-Controller muss das Erreichen der Ziel-Klemmkraft via Strommessung erkennen und ein Status-Flag setzen. +The apply controller must detect that the target clamping force has been reached via current measurement and set a status flag. diff --git a/reqs/swe/SWE-005.md b/reqs/swe/SWE-005.md index fc9012c..80bc5a6 100644 --- a/reqs/swe/SWE-005.md +++ b/reqs/swe/SWE-005.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Release-Voraussetzungen pruefen' +header: 'Check release preconditions' level: 1.5 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: B --- -# SWE-005: Release-Voraussetzungen pruefen +# SWE-005: Check release preconditions -Vor jedem Release muss der Apply-Controller pruefen: Motor laeuft, Bremspedal betaetigt, Gang ist eingelegt. Andernfalls Release abweisen. +Before any release, the apply controller must verify: engine running, brake pedal pressed, gear engaged. Otherwise reject the release. diff --git a/reqs/swe/SWE-006.md b/reqs/swe/SWE-006.md index 1606fb6..fc476e7 100644 --- a/reqs/swe/SWE-006.md +++ b/reqs/swe/SWE-006.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Aktoren in Release-Position fahren' +header: 'Drive actuators into release position' level: 1.6 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: B --- -# SWE-006: Aktoren in Release-Position fahren +# SWE-006: Drive actuators into release position -Der Actuator-Driver muss beide Aktoren parallel in Release-Position fahren. Maximalzeit: 1200 ms. Bei Timeout DTC setzen. +The Actuator Driver must drive both actuators in parallel into the release position. Maximum time: 1200 ms. On timeout, set a DTC. diff --git a/reqs/swe/SWE-007.md b/reqs/swe/SWE-007.md index e7f95c0..066ffa4 100644 --- a/reqs/swe/SWE-007.md +++ b/reqs/swe/SWE-007.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Motor-Aus-Bedingung erkennen' +header: 'Detect engine-off condition' level: 1.7 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: D --- -# SWE-007: Motor-Aus-Bedingung erkennen +# SWE-007: Detect engine-off condition -Der Safety-Manager muss erkennen: Motor-Status = aus, Geschwindigkeit < 0.5 km/h. Auswertezyklus 50 ms. +The Safety Manager must detect: engine status = off, vehicle speed < 0.5 km/h. Sampling period 50 ms. diff --git a/reqs/swe/SWE-008.md b/reqs/swe/SWE-008.md index 166e5fa..3495bca 100644 --- a/reqs/swe/SWE-008.md +++ b/reqs/swe/SWE-008.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Auto-Apply nach 2 s Verzoegerung' +header: 'Auto-apply after 2 s delay' level: 1.8 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: D --- -# SWE-008: Auto-Apply nach 2 s Verzoegerung +# SWE-008: Auto-apply after 2 s delay -Ist die Motor-Aus-Bedingung 2 s stabil erfuellt und Parkbremse noch nicht aktiv, muss der Safety-Manager Apply-Anforderung an den Apply-Controller senden. +If the engine-off condition is stable for 2 s and the parking brake is not yet active, the Safety Manager must send an apply request to the apply controller. diff --git a/reqs/swe/SWE-009.md b/reqs/swe/SWE-009.md index bc4c335..c038fca 100644 --- a/reqs/swe/SWE-009.md +++ b/reqs/swe/SWE-009.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Hill-Hold-Aktivierungsbedingung' +header: 'Hill-hold activation condition' level: 1.9 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: D --- -# SWE-009: Hill-Hold-Aktivierungsbedingung +# SWE-009: Hill-hold activation condition -Der Safety-Manager muss Hill-Hold aktivieren, wenn Neigung (gefiltert) > 5%, Geschwindigkeit < 0.5 km/h und Bremspedal betaetigt sind. +The Safety Manager must activate hill-hold when grade (filtered) > 5%, vehicle speed < 0.5 km/h and the brake pedal is pressed. diff --git a/reqs/swe/SWE-010.md b/reqs/swe/SWE-010.md index d8669bd..7cdfda0 100644 --- a/reqs/swe/SWE-010.md +++ b/reqs/swe/SWE-010.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Hill-Hold-Uebergabe an Apply-Controller' +header: 'Hill-hold handover to the apply controller' level: 1.10 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: D --- -# SWE-010: Hill-Hold-Uebergabe an Apply-Controller +# SWE-010: Hill-hold handover to the apply controller -Wird das Bremspedal bei aktivem Hill-Hold losgelassen, muss der Safety-Manager unmittelbar Apply-Anforderung an den Apply-Controller senden, bevor das Fahrzeug zu rollen beginnen kann. +If the brake pedal is released while hill-hold is active, the Safety Manager must immediately send an apply request to the apply controller before the vehicle can start to roll. diff --git a/reqs/swe/SWE-011.md b/reqs/swe/SWE-011.md index c5ea829..ba63031 100644 --- a/reqs/swe/SWE-011.md +++ b/reqs/swe/SWE-011.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Anfahrabsicht erkennen' +header: 'Detect drive-away intent' level: 1.11 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: B --- -# SWE-011: Anfahrabsicht erkennen +# SWE-011: Detect drive-away intent -Anfahrabsicht ist erkannt, wenn: Gaspedal > 10%, Gang in Vorwaerts oder Rueckwaerts, Motor laeuft. +Drive-away intent is detected when: throttle > 10%, gear in forward or reverse, engine running. diff --git a/reqs/swe/SWE-012.md b/reqs/swe/SWE-012.md index e1afc74..ea23a87 100644 --- a/reqs/swe/SWE-012.md +++ b/reqs/swe/SWE-012.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Sicherheits-Check vor Auto-Release' +header: 'Safety check before auto-release' level: 1.12 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: B --- -# SWE-012: Sicherheits-Check vor Auto-Release +# SWE-012: Safety check before auto-release -Vor Auto-Release muessen erfuellt sein: Fahrertuer geschlossen, Sicherheitsgurt angelegt. Andernfalls warnen und nicht loesen. +Before auto-release, the following must be satisfied: driver door closed, seatbelt fastened. Otherwise warn and do not release. diff --git a/reqs/swe/SWE-013.md b/reqs/swe/SWE-013.md index 92b28fb..0f3a4bd 100644 --- a/reqs/swe/SWE-013.md +++ b/reqs/swe/SWE-013.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Strommessung mit 1 kHz' +header: 'Current sampling at 1 kHz' level: 1.13 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: B --- -# SWE-013: Strommessung mit 1 kHz +# SWE-013: Current sampling at 1 kHz -Der Actuator-Driver muss den Motorstrom jedes Aktors mit mindestens 1 kHz abtasten. Genauigkeit +/- 100 mA. +The Actuator Driver must sample the motor current of each actuator at at least 1 kHz. Accuracy +/- 100 mA. diff --git a/reqs/swe/SWE-014.md b/reqs/swe/SWE-014.md index 148b75a..a2103f1 100644 --- a/reqs/swe/SWE-014.md +++ b/reqs/swe/SWE-014.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Overcurrent-Cutoff' +header: 'Overcurrent cutoff' level: 1.14 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: B --- -# SWE-014: Overcurrent-Cutoff +# SWE-014: Overcurrent cutoff -Bei Motorstrom > 8 A laenger als 100 ms muss der Actuator-Driver den Motor abschalten und einen DTC P0xxx setzen. +On motor current > 8 A for longer than 100 ms, the Actuator Driver must shut down the motor and set DTC P0xxx. diff --git a/reqs/swe/SWE-015.md b/reqs/swe/SWE-015.md index 8876a43..b28509f 100644 --- a/reqs/swe/SWE-015.md +++ b/reqs/swe/SWE-015.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Klemmkraft-Schaetzung aus Strom-Profil' +header: 'Clamping force estimation from current profile' level: 1.15 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: B --- -# SWE-015: Klemmkraft-Schaetzung aus Strom-Profil +# SWE-015: Clamping force estimation from current profile -Der Actuator-Driver muss die erreichte Klemmkraft aus dem Stromverlauf bei Apply schaetzen (Modell: F = k * I_peak). +The Actuator Driver must estimate the achieved clamping force from the current waveform during apply (model: F = k * I_peak). diff --git a/reqs/swe/SWE-016.md b/reqs/swe/SWE-016.md index 1e8345e..abdefd6 100644 --- a/reqs/swe/SWE-016.md +++ b/reqs/swe/SWE-016.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'UDS RoutineControl 0x31 fuer Service-Release' +header: 'UDS RoutineControl 0x31 for service release' level: 1.16 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: QM --- -# SWE-016: UDS RoutineControl 0x31 fuer Service-Release +# SWE-016: UDS RoutineControl 0x31 for service release -Service-Mode wird ueber UDS RoutineControl Service 0x31, Routine-ID 0x0301 aktiviert. Bedingung: Fahrzeug muss stillstehen. +Service mode is activated via UDS RoutineControl service 0x31, routine ID 0x0301. Precondition: vehicle must be at standstill. diff --git a/reqs/swe/SWE-017.md b/reqs/swe/SWE-017.md index 7311f2b..b17c564 100644 --- a/reqs/swe/SWE-017.md +++ b/reqs/swe/SWE-017.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Service-Mode-Indikator' +header: 'Service mode indicator' level: 1.17 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: QM --- -# SWE-017: Service-Mode-Indikator +# SWE-017: Service mode indicator -Im Service-Mode muss die EPB-LED am Schalter mit 2 Hz blinken. +While in service mode, the EPB LED on the switch must blink at 2 Hz. diff --git a/reqs/swe/SWE-018.md b/reqs/swe/SWE-018.md index 4277392..2b4a847 100644 --- a/reqs/swe/SWE-018.md +++ b/reqs/swe/SWE-018.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'UDS Service 0x19 ReadDTC' +header: 'UDS service 0x19 ReadDTC' level: 1.18 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: QM --- -# SWE-018: UDS Service 0x19 ReadDTC +# SWE-018: UDS service 0x19 ReadDTC -Das System muss alle gespeicherten DTCs ueber Service 0x19 (Subfunktion 0x02 reportDTCByStatusMask) ausgeben. +The system must output all stored DTCs via service 0x19 (sub-function 0x02 reportDTCByStatusMask). diff --git a/reqs/swe/SWE-019.md b/reqs/swe/SWE-019.md index 5787562..a3fd24c 100644 --- a/reqs/swe/SWE-019.md +++ b/reqs/swe/SWE-019.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'UDS Service 0x22 ReadDataByIdentifier' +header: 'UDS service 0x22 ReadDataByIdentifier' level: 1.19 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: QM --- -# SWE-019: UDS Service 0x22 ReadDataByIdentifier +# SWE-019: UDS service 0x22 ReadDataByIdentifier -Folgende DIDs muessen lesbar sein: 0xF187 (SW-Version), 0x0301 (Klemmkraft links), 0x0302 (Klemmkraft rechts). +The following DIDs must be readable: 0xF187 (SW version), 0x0301 (clamping force left), 0x0302 (clamping force right). diff --git a/reqs/swe/SWE-020.md b/reqs/swe/SWE-020.md index 6221377..d798730 100644 --- a/reqs/swe/SWE-020.md +++ b/reqs/swe/SWE-020.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'LED-Steuerung' +header: 'LED control' level: 1.20 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: QM --- -# SWE-020: LED-Steuerung +# SWE-020: LED control -Apply-aktiv: LED dauerleuchtend. Release: LED aus. Fehler: LED blinkt 4 Hz. Service-Mode: LED blinkt 2 Hz. +Apply active: LED solid. Release: LED off. Fault: LED blinks at 4 Hz. Service mode: LED blinks at 2 Hz. diff --git a/reqs/swe/SWE-021.md b/reqs/swe/SWE-021.md index 3546f3f..14e6a40 100644 --- a/reqs/swe/SWE-021.md +++ b/reqs/swe/SWE-021.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'CAN-Status-Frame' +header: 'CAN status frame' level: 1.21 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: QM --- -# SWE-021: CAN-Status-Frame +# SWE-021: CAN status frame -Status-Frame 0x3A0 mit 50 Hz: Byte 0 = Status (0=Released, 1=Applied, 2=Applying, 3=Releasing, 0xFF=Error), Byte 1-2 = Klemmkraft links, Byte 3-4 = Klemmkraft rechts. +Status frame 0x3A0 at 50 Hz: byte 0 = status (0=released, 1=applied, 2=applying, 3=releasing, 0xFF=error), byte 1-2 = left clamping force, byte 3-4 = right clamping force. diff --git a/reqs/swe/SWE-022.md b/reqs/swe/SWE-022.md index 428f424..8082d53 100644 --- a/reqs/swe/SWE-022.md +++ b/reqs/swe/SWE-022.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Stillstands-Erkennung aus Wheel Speeds' +header: 'Standstill detection from wheel speeds' level: 1.22 normative: true reviewed: null @@ -12,6 +12,6 @@ links: asil: B --- -# SWE-022: Stillstands-Erkennung aus Wheel Speeds +# SWE-022: Standstill detection from wheel speeds -Stillstand ist erkannt, wenn alle 4 Wheel-Speed-Signale fuer mindestens 200 ms unter 0.5 km/h liegen. +Standstill is detected when all 4 wheel-speed signals stay below 0.5 km/h for at least 200 ms. diff --git a/reqs/swe/SWE-023.md b/reqs/swe/SWE-023.md index acf1f48..93476c0 100644 --- a/reqs/swe/SWE-023.md +++ b/reqs/swe/SWE-023.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Wheel Speed Plausibilisierung' +header: 'Wheel-speed plausibilisation' level: 1.23 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: B --- -# SWE-023: Wheel Speed Plausibilisierung +# SWE-023: Wheel-speed plausibilisation -Spreizung der Wheel-Speed-Signale: bei Geradeaus-Fahrt darf die Differenz nicht > 3 km/h sein. Andernfalls Sensor-Fehler-DTC. +Spread of the wheel-speed signals: when driving straight, the difference must not exceed 3 km/h. Otherwise set a sensor fault DTC. diff --git a/reqs/swe/SWE-024.md b/reqs/swe/SWE-024.md index a2b674d..859d7c5 100644 --- a/reqs/swe/SWE-024.md +++ b/reqs/swe/SWE-024.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Inclinometer Tiefpass-Filter' +header: 'Inclinometer low-pass filter' level: 1.24 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: B --- -# SWE-024: Inclinometer Tiefpass-Filter +# SWE-024: Inclinometer low-pass filter -Das Roh-Neigungssignal muss mit einem Tiefpass 1. Ordnung (Zeitkonstante 200 ms) gefiltert werden, bevor es zur Hill-Hold-Bewertung verwendet wird. +The raw inclinometer signal must be filtered with a first-order low-pass (time constant 200 ms) before being used for hill-hold evaluation. diff --git a/reqs/swe/SWE-025.md b/reqs/swe/SWE-025.md index c1487dc..3bb5598 100644 --- a/reqs/swe/SWE-025.md +++ b/reqs/swe/SWE-025.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Switch-Debouncing' +header: 'Switch debouncing' level: 1.25 normative: true reviewed: null @@ -11,6 +11,6 @@ links: asil: QM --- -# SWE-025: Switch-Debouncing +# SWE-025: Switch debouncing -Der EPB-Schalter muss mit einer Entprell-Zeit von 50 ms entprellt werden. Stabiler Pegel = Eingangssignal fuer Apply-Controller. +The EPB switch must be debounced with a debounce time of 50 ms. Stable level = input signal for the apply controller. diff --git a/reqs/sys/SYS-001.md b/reqs/sys/SYS-001.md index 20689ac..177acd6 100644 --- a/reqs/sys/SYS-001.md +++ b/reqs/sys/SYS-001.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Halten der Parkbremse im Stillstand' +header: 'Holding the parking brake at standstill' level: 1.1 normative: true reviewed: null @@ -10,8 +10,8 @@ links: asil: D --- -# SYS-001: Halten der Parkbremse im Stillstand +# SYS-001: Holding the parking brake at standstill -Wenn die Parkbremse aktiviert ist und das Fahrzeug stillsteht, muss das EPB-System die mechanische Klemmkraft an beiden hinteren Bremssaetteln aufrecht erhalten, bis ein Loesen ausdruecklich angefordert wird. Sicherheitsziel: SG-01. +When the parking brake is engaged and the vehicle is at a standstill, the EPB system must maintain the mechanical clamping force on both rear callipers until a release is explicitly requested. Safety goal: SG-001. -**Verifikation:** SiL-Test mit Auf-/Ab-Hangelung, Klemmkraftmessung. +**Verification:** SiL test with up/down grade scenarios, clamping force measurement. diff --git a/reqs/sys/SYS-002.md b/reqs/sys/SYS-002.md index b22acae..6c25eac 100644 --- a/reqs/sys/SYS-002.md +++ b/reqs/sys/SYS-002.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Apply auf Fahrer-Anforderung' +header: 'Apply on driver request' level: 1.2 normative: true reviewed: null @@ -11,6 +11,6 @@ links: asil: D --- -# SYS-002: Apply auf Fahrer-Anforderung +# SYS-002: Apply on driver request -Bei Betaetigung des EPB-Schalters in Apply-Richtung muss das System innerhalb von 800 ms die Parkbremse anlegen, sofern die Voraussetzungen erfuellt sind (Stillstand oder Geschwindigkeit unter 5 km/h). Sicherheitsziel: SG-01. +On apply-direction actuation of the EPB switch, the system must engage the parking brake within 800 ms, provided the preconditions are met (standstill or vehicle speed below 5 km/h). Safety goal: SG-002. diff --git a/reqs/sys/SYS-003.md b/reqs/sys/SYS-003.md index 8ef1627..c7db3f2 100644 --- a/reqs/sys/SYS-003.md +++ b/reqs/sys/SYS-003.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Release auf Fahrer-Anforderung' +header: 'Release on driver request' level: 1.3 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: B --- -# SYS-003: Release auf Fahrer-Anforderung +# SYS-003: Release on driver request -Bei Betaetigung des EPB-Schalters in Release-Richtung muss das System die Parkbremse loesen, sofern die folgenden Voraussetzungen erfuellt sind: Motor laeuft, Fahrer betaetigt Bremspedal, Gang ist eingelegt. Maximalzeit fuer Loesen: 1500 ms. +On release-direction actuation of the EPB switch, the system must release the parking brake provided the following preconditions are met: engine running, driver pressing the brake pedal, a gear is engaged. Maximum release time: 1500 ms. diff --git a/reqs/sys/SYS-004.md b/reqs/sys/SYS-004.md index e141f9e..edf05a5 100644 --- a/reqs/sys/SYS-004.md +++ b/reqs/sys/SYS-004.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Auto-Apply bei Motor-Aus' +header: 'Auto-apply on engine off' level: 1.4 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: D --- -# SYS-004: Auto-Apply bei Motor-Aus +# SYS-004: Auto-apply on engine off -Wenn der Motor ausgeschaltet wird und das Fahrzeug stillsteht und keine Parkbremse aktiv ist, muss das System die Parkbremse spaetestens 2 s nach Erkennung Motor-Aus automatisch anlegen. Sicherheitsziel: SG-01. +When the engine is switched off and the vehicle is at a standstill, and the parking brake is not yet engaged, the system must automatically engage the parking brake at the latest 2 s after detecting engine-off. Safety goal: SG-001. diff --git a/reqs/sys/SYS-005.md b/reqs/sys/SYS-005.md index 401dcb5..cc68943 100644 --- a/reqs/sys/SYS-005.md +++ b/reqs/sys/SYS-005.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Hill-Hold am Berg' +header: 'Hill-hold on an incline' level: 1.5 normative: true reviewed: null @@ -11,6 +11,6 @@ links: asil: D --- -# SYS-005: Hill-Hold am Berg +# SYS-005: Hill-hold on an incline -Bei aktivem Hill-Hold (Fahrzeug steht am Hang mit Neigung > 5%, Fahrer betaetigt Bremspedal) uebernimmt das EPB-System die Bremskraft beim Loesen des Bremspedals und haelt diese, bis die Anfahrt erkannt wird. Sicherheitsziel: SG-01. +When hill-hold is active (vehicle on a slope with grade > 5%, driver pressing the brake pedal), the EPB system shall take over the brake force when the brake pedal is released and shall maintain it until drive-away is detected. Safety goal: SG-002. diff --git a/reqs/sys/SYS-006.md b/reqs/sys/SYS-006.md index 9ec0731..6673a53 100644 --- a/reqs/sys/SYS-006.md +++ b/reqs/sys/SYS-006.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Auto-Release beim Anfahren (Drive-Away-Assist)' +header: 'Auto-release on drive-away (Drive-Away Assist)' level: 1.6 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: B --- -# SYS-006: Auto-Release beim Anfahren (Drive-Away-Assist) +# SYS-006: Auto-release on drive-away (Drive-Away Assist) -Wenn die Parkbremse aktiv ist und der Fahrer Anfahrabsicht zeigt (Gaspedal-Betaetigung bei eingelegtem Gang), muss das System die Parkbremse innerhalb von 500 ms loesen. Voraussetzung: alle Sicherheitskriterien (Fahrertuer geschlossen, Sicherheitsgurt) erfuellt. +When the parking brake is engaged and the driver shows intent to drive away (throttle actuation with gear engaged), the system must release the parking brake within 500 ms. Precondition: all safety criteria (driver door closed, seatbelt fastened) are met. diff --git a/reqs/sys/SYS-007.md b/reqs/sys/SYS-007.md index c07fc7d..012749a 100644 --- a/reqs/sys/SYS-007.md +++ b/reqs/sys/SYS-007.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Aktor-Stromueberwachung' +header: 'Actuator current monitoring' level: 1.7 normative: true reviewed: null @@ -10,6 +10,6 @@ links: asil: B --- -# SYS-007: Aktor-Stromueberwachung +# SYS-007: Actuator current monitoring -Das System muss den Motorstrom jedes Aktors mit mindestens 1 kHz ueberwachen und bei Ueberschreitung von 8 A fuer mehr als 100 ms den Aktor abschalten und einen DTC setzen. Sicherheitsziel: SG-03. +The system must monitor the motor current of each actuator at at least 1 kHz and, on exceeding 8 A for more than 100 ms, shut down the actuator and set a DTC. Safety goal: SG-003. diff --git a/reqs/sys/SYS-008.md b/reqs/sys/SYS-008.md index a75665a..2d20551 100644 --- a/reqs/sys/SYS-008.md +++ b/reqs/sys/SYS-008.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Service-Modus fuer Werkstatt' +header: 'Service mode for the workshop' level: 1.8 normative: true reviewed: null @@ -9,6 +9,6 @@ links: [] asil: QM --- -# SYS-008: Service-Modus fuer Werkstatt +# SYS-008: Service mode for the workshop -Das System muss ueber UDS RoutineControl (Service 0x31) einen Service-Modus bereitstellen, in dem die Aktoren manuell in Wartungs-Position gefahren werden koennen (z.B. fuer Bremsbelag-Wechsel). +The system must provide a service mode via UDS RoutineControl (service 0x31) in which the actuators can be moved manually into maintenance position (e.g. for brake pad replacement). diff --git a/reqs/sys/SYS-009.md b/reqs/sys/SYS-009.md index 61caff9..2f6a14f 100644 --- a/reqs/sys/SYS-009.md +++ b/reqs/sys/SYS-009.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'UDS-Diagnose' +header: 'UDS diagnostics' level: 1.9 normative: true reviewed: null @@ -9,6 +9,6 @@ links: [] asil: QM --- -# SYS-009: UDS-Diagnose +# SYS-009: UDS diagnostics -Das System muss UDS-Diagnose nach ISO 14229 bereitstellen: ReadDTC (0x19), ReadDataByIdentifier (0x22), RoutineControl (0x31), ECUReset (0x11). Tester-Adresse 0x712, Antwort-Adresse 0x71A. +The system must provide UDS diagnostics per ISO 14229: ReadDTC (0x19), ReadDataByIdentifier (0x22), RoutineControl (0x31), ECUReset (0x11). Tester address 0x712, response address 0x71A. diff --git a/reqs/sys/SYS-010.md b/reqs/sys/SYS-010.md index 2e2baf9..eb8447b 100644 --- a/reqs/sys/SYS-010.md +++ b/reqs/sys/SYS-010.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'HMI-Statusanzeige' +header: 'HMI status display' level: 1.10 normative: true reviewed: null @@ -9,6 +9,6 @@ links: [] asil: QM --- -# SYS-010: HMI-Statusanzeige +# SYS-010: HMI status display -Der EPB-Status muss dem Fahrer signalisiert werden: LED am Schalter (an = Apply, aus = Release, blinkend = Fehler) sowie Text im Kombi-Display via CAN-Bus (Frame-ID 0x3A0, 50 Hz). +The EPB status must be signalled to the driver: LED on the switch (on = applied, off = released, blinking = error) and a text in the instrument cluster via CAN bus (frame ID 0x3A0, 50 Hz). diff --git a/safety/sg/SG-001.md b/safety/sg/SG-001.md index 8dd557d..819c0d1 100644 --- a/safety/sg/SG-001.md +++ b/safety/sg/SG-001.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Kein ungewolltes Loesen der Parkbremse im Stillstand' +header: 'No unintended release of the parking brake during standstill' level: 1.1 normative: true reviewed: null @@ -9,9 +9,9 @@ links: [] asil: D --- -# SG-001: Kein ungewolltes Loesen der Parkbremse im Stillstand +# SG-001: No unintended release of the parking brake during standstill -Die EPB darf sich im Stillstand des Fahrzeugs nicht ungewollt loesen. Abgeleitet aus HARA-Hazards H-01 (ungewolltes Loesen, Parkphase) und H-04 (Klemmkraftverlust im Hold). +The EPB shall not unintentionally release while the vehicle is at a standstill. Derived from HARA hazards H-01 (unintended release during parking) and H-04 (clamping force loss in hold state). **FTTI:** 5 s (H-01) / 30 s (H-04). -**Safe State:** APPLIED (Klemmkraft halten). +**Safe state:** APPLIED (maintain clamping force). diff --git a/safety/sg/SG-002.md b/safety/sg/SG-002.md index 2b2d0b1..42e07ec 100644 --- a/safety/sg/SG-002.md +++ b/safety/sg/SG-002.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Kein ungewolltes Festklemmen waehrend der Fahrt' +header: 'No unintended clamping while driving' level: 1.2 normative: true reviewed: null @@ -9,9 +9,9 @@ links: [] asil: D --- -# SG-002: Kein ungewolltes Festklemmen waehrend der Fahrt +# SG-002: No unintended clamping while driving -Die EPB darf nicht waehrend der Fahrt ungewollt festklemmen. Abgeleitet aus HARA-Hazard H-02. +The EPB shall not unintentionally clamp while the vehicle is moving. Derived from HARA hazard H-02. **FTTI:** 100 ms. -**Safe State:** Aktor stop (kein Apply einleiten). +**Safe state:** Actuator stop (do not initiate apply). diff --git a/safety/sg/SG-003.md b/safety/sg/SG-003.md index bd4b1ff..eac0fe5 100644 --- a/safety/sg/SG-003.md +++ b/safety/sg/SG-003.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Schutz gegen Aktor-Ueberlast' +header: 'Protection against actuator overload' level: 1.3 normative: true reviewed: null @@ -9,9 +9,9 @@ links: [] asil: A --- -# SG-003: Schutz gegen Aktor-Ueberlast +# SG-003: Protection against actuator overload -Das System muss Aktor-Motorschaeden durch Ueberstrom verhindern. Abgeleitet aus HARA-Hazard H-05. +The system shall prevent actuator motor damage due to overcurrent. Derived from HARA hazard H-05. **FTTI:** 100 ms. -**Safe State:** Aktor abschalten, DTC setzen. +**Safe state:** Disable actuator, set DTC. diff --git a/safety/sg/SG-004.md b/safety/sg/SG-004.md index 2c5f3e9..c93f6a1 100644 --- a/safety/sg/SG-004.md +++ b/safety/sg/SG-004.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Zuverlaessige Hill-Hold-Uebergabe' +header: 'Reliable hill-hold handover' level: 1.4 normative: true reviewed: null @@ -9,9 +9,9 @@ links: [] asil: C --- -# SG-004: Zuverlaessige Hill-Hold-Uebergabe +# SG-004: Reliable hill-hold handover -Beim Loslassen des Bremspedals an einem Hang muss die EPB die Bremskraft uebernehmen, bevor das Fahrzeug zu rollen beginnt. Abgeleitet aus HARA-Hazard H-06. +When the driver releases the brake pedal on an incline, the EPB shall take over the braking force before the vehicle starts rolling. Derived from HARA hazard H-06. **FTTI:** 500 ms. -**Safe State:** Apply einleiten. +**Safe state:** Initiate apply. diff --git a/safety/sg/SG-005.md b/safety/sg/SG-005.md index f5c7e3f..a59894e 100644 --- a/safety/sg/SG-005.md +++ b/safety/sg/SG-005.md @@ -1,7 +1,7 @@ --- active: true derived: false -header: 'Reaktion auf Fahreranforderung' +header: 'Response to driver requests' level: 1.5 normative: true reviewed: null @@ -9,8 +9,8 @@ links: [] asil: B --- -# SG-005: Reaktion auf Fahreranforderung +# SG-005: Response to driver requests -Das System muss in spezifizierter Zeit auf Fahrer-Apply- und Release-Anforderungen reagieren. Abgeleitet aus HARA-Hazards H-03 und H-07. +The system shall respond to driver apply and release requests within specified times. Derived from HARA hazards H-03 and H-07. -**Reaktionszeit:** Apply <= 800 ms, Release <= 1500 ms. +**Response time:** apply <= 800 ms, release <= 1500 ms. diff --git a/tools/generate_doorstop_items.py b/tools/generate_doorstop_items.py index 5f5c88b..971be34 100644 --- a/tools/generate_doorstop_items.py +++ b/tools/generate_doorstop_items.py @@ -2,8 +2,8 @@ """ Generate Doorstop-compatible Markdown items for the EPB demo. -Source of truth: the dict EPB_DATA below. -Outputs to: reqs/sys/, reqs/swe/, arch/sys/, arch/swe/ +Source of truth: the dicts below. +Outputs to: safety/sg/, reqs/sys/, reqs/swe/, arch/sys/, arch/swe/ Each output file uses Doorstop's Markdown mode (YAML frontmatter + body). @@ -18,325 +18,333 @@ REPO = Path(__file__).resolve().parent.parent # --------------------------------------------------------------------------- -# Safety Goals (ISO 26262, abgeleitet aus HARA) +# Safety Goals (ISO 26262, derived from HARA) # --------------------------------------------------------------------------- SG_GOALS = [ { "id": "SG-001", "asil": "D", - "title": "Kein ungewolltes Loesen der Parkbremse im Stillstand", + "title": "No unintended release of the parking brake during standstill", "text": ( - "Die EPB darf sich im Stillstand des Fahrzeugs nicht ungewollt loesen. " - "Abgeleitet aus HARA-Hazards H-01 (ungewolltes Loesen, Parkphase) und " - "H-04 (Klemmkraftverlust im Hold).\n\n" + "The EPB shall not unintentionally release while the vehicle is at " + "a standstill. Derived from HARA hazards H-01 (unintended release " + "during parking) and H-04 (clamping force loss in hold state).\n\n" "**FTTI:** 5 s (H-01) / 30 s (H-04).\n" - "**Safe State:** APPLIED (Klemmkraft halten)." + "**Safe state:** APPLIED (maintain clamping force)." ), }, { "id": "SG-002", "asil": "D", - "title": "Kein ungewolltes Festklemmen waehrend der Fahrt", + "title": "No unintended clamping while driving", "text": ( - "Die EPB darf nicht waehrend der Fahrt ungewollt festklemmen. " - "Abgeleitet aus HARA-Hazard H-02.\n\n" + "The EPB shall not unintentionally clamp while the vehicle is " + "moving. Derived from HARA hazard H-02.\n\n" "**FTTI:** 100 ms.\n" - "**Safe State:** Aktor stop (kein Apply einleiten)." + "**Safe state:** Actuator stop (do not initiate apply)." ), }, { "id": "SG-003", "asil": "A", - "title": "Schutz gegen Aktor-Ueberlast", + "title": "Protection against actuator overload", "text": ( - "Das System muss Aktor-Motorschaeden durch Ueberstrom verhindern. " - "Abgeleitet aus HARA-Hazard H-05.\n\n" + "The system shall prevent actuator motor damage due to overcurrent. " + "Derived from HARA hazard H-05.\n\n" "**FTTI:** 100 ms.\n" - "**Safe State:** Aktor abschalten, DTC setzen." + "**Safe state:** Disable actuator, set DTC." ), }, { "id": "SG-004", "asil": "C", - "title": "Zuverlaessige Hill-Hold-Uebergabe", + "title": "Reliable hill-hold handover", "text": ( - "Beim Loslassen des Bremspedals an einem Hang muss die EPB die " - "Bremskraft uebernehmen, bevor das Fahrzeug zu rollen beginnt. " - "Abgeleitet aus HARA-Hazard H-06.\n\n" + "When the driver releases the brake pedal on an incline, the EPB " + "shall take over the braking force before the vehicle starts " + "rolling. Derived from HARA hazard H-06.\n\n" "**FTTI:** 500 ms.\n" - "**Safe State:** Apply einleiten." + "**Safe state:** Initiate apply." ), }, { "id": "SG-005", "asil": "B", - "title": "Reaktion auf Fahreranforderung", + "title": "Response to driver requests", "text": ( - "Das System muss in spezifizierter Zeit auf Fahrer-Apply- und Release-" - "Anforderungen reagieren. Abgeleitet aus HARA-Hazards H-03 und H-07.\n\n" - "**Reaktionszeit:** Apply <= 800 ms, Release <= 1500 ms." + "The system shall respond to driver apply and release requests " + "within specified times. Derived from HARA hazards H-03 and H-07.\n\n" + "**Response time:** apply <= 800 ms, release <= 1500 ms." ), }, ] # --------------------------------------------------------------------------- -# System Requirements (linken nach oben auf SG) +# System Requirements (link upward to SG) # --------------------------------------------------------------------------- SYS_REQS = [ { "id": "SYS-001", "asil": "D", "links": ["SG-001"], - "title": "Halten der Parkbremse im Stillstand", + "title": "Holding the parking brake at standstill", "text": ( - "Wenn die Parkbremse aktiviert ist und das Fahrzeug stillsteht, " - "muss das EPB-System die mechanische Klemmkraft an beiden hinteren " - "Bremssaetteln aufrecht erhalten, bis ein Loesen ausdruecklich " - "angefordert wird. Sicherheitsziel: SG-01.\n\n" - "**Verifikation:** SiL-Test mit Auf-/Ab-Hangelung, Klemmkraftmessung." + "When the parking brake is engaged and the vehicle is at a " + "standstill, the EPB system must maintain the mechanical clamping " + "force on both rear callipers until a release is explicitly " + "requested. Safety goal: SG-001.\n\n" + "**Verification:** SiL test with up/down grade scenarios, " + "clamping force measurement." ), }, { "id": "SYS-002", "asil": "D", "links": ["SG-002", "SG-005"], - "title": "Apply auf Fahrer-Anforderung", + "title": "Apply on driver request", "text": ( - "Bei Betaetigung des EPB-Schalters in Apply-Richtung muss das " - "System innerhalb von 800 ms die Parkbremse anlegen, sofern die " - "Voraussetzungen erfuellt sind (Stillstand oder Geschwindigkeit " - "unter 5 km/h). Sicherheitsziel: SG-01." + "On apply-direction actuation of the EPB switch, the system must " + "engage the parking brake within 800 ms, provided the " + "preconditions are met (standstill or vehicle speed below 5 km/h). " + "Safety goal: SG-002." ), }, { "id": "SYS-003", "asil": "B", "links": ["SG-005"], - "title": "Release auf Fahrer-Anforderung", + "title": "Release on driver request", "text": ( - "Bei Betaetigung des EPB-Schalters in Release-Richtung muss das " - "System die Parkbremse loesen, sofern die folgenden Voraussetzungen " - "erfuellt sind: Motor laeuft, Fahrer betaetigt Bremspedal, Gang " - "ist eingelegt. Maximalzeit fuer Loesen: 1500 ms." + "On release-direction actuation of the EPB switch, the system " + "must release the parking brake provided the following " + "preconditions are met: engine running, driver pressing the brake " + "pedal, a gear is engaged. Maximum release time: 1500 ms." ), }, { "id": "SYS-004", "asil": "D", "links": ["SG-001"], - "title": "Auto-Apply bei Motor-Aus", + "title": "Auto-apply on engine off", "text": ( - "Wenn der Motor ausgeschaltet wird und das Fahrzeug stillsteht " - "und keine Parkbremse aktiv ist, muss das System die Parkbremse " - "spaetestens 2 s nach Erkennung Motor-Aus automatisch anlegen. " - "Sicherheitsziel: SG-01." + "When the engine is switched off and the vehicle is at a " + "standstill, and the parking brake is not yet engaged, the system " + "must automatically engage the parking brake at the latest 2 s " + "after detecting engine-off. Safety goal: SG-001." ), }, { "id": "SYS-005", "asil": "D", "links": ["SG-002", "SG-004"], - "title": "Hill-Hold am Berg", + "title": "Hill-hold on an incline", "text": ( - "Bei aktivem Hill-Hold (Fahrzeug steht am Hang mit Neigung > 5%, " - "Fahrer betaetigt Bremspedal) uebernimmt das EPB-System die " - "Bremskraft beim Loesen des Bremspedals und haelt diese, bis die " - "Anfahrt erkannt wird. Sicherheitsziel: SG-01." + "When hill-hold is active (vehicle on a slope with grade > 5%, " + "driver pressing the brake pedal), the EPB system shall take over " + "the brake force when the brake pedal is released and shall " + "maintain it until drive-away is detected. Safety goal: SG-002." ), }, { "id": "SYS-006", "asil": "B", "links": ["SG-004"], - "title": "Auto-Release beim Anfahren (Drive-Away-Assist)", + "title": "Auto-release on drive-away (Drive-Away Assist)", "text": ( - "Wenn die Parkbremse aktiv ist und der Fahrer Anfahrabsicht zeigt " - "(Gaspedal-Betaetigung bei eingelegtem Gang), muss das System die " - "Parkbremse innerhalb von 500 ms loesen. Voraussetzung: alle " - "Sicherheitskriterien (Fahrertuer geschlossen, Sicherheitsgurt) " - "erfuellt." + "When the parking brake is engaged and the driver shows intent " + "to drive away (throttle actuation with gear engaged), the " + "system must release the parking brake within 500 ms. " + "Precondition: all safety criteria (driver door closed, seatbelt " + "fastened) are met." ), }, { "id": "SYS-007", "asil": "B", "links": ["SG-003"], - "title": "Aktor-Stromueberwachung", + "title": "Actuator current monitoring", "text": ( - "Das System muss den Motorstrom jedes Aktors mit mindestens 1 kHz " - "ueberwachen und bei Ueberschreitung von 8 A fuer mehr als 100 ms " - "den Aktor abschalten und einen DTC setzen. Sicherheitsziel: SG-03." + "The system must monitor the motor current of each actuator at " + "at least 1 kHz and, on exceeding 8 A for more than 100 ms, " + "shut down the actuator and set a DTC. Safety goal: SG-003." ), }, { "id": "SYS-008", "asil": "QM", - "title": "Service-Modus fuer Werkstatt", + "title": "Service mode for the workshop", "text": ( - "Das System muss ueber UDS RoutineControl (Service 0x31) einen " - "Service-Modus bereitstellen, in dem die Aktoren manuell in " - "Wartungs-Position gefahren werden koennen (z.B. fuer Bremsbelag-" - "Wechsel)." + "The system must provide a service mode via UDS RoutineControl " + "(service 0x31) in which the actuators can be moved manually " + "into maintenance position (e.g. for brake pad replacement)." ), }, { "id": "SYS-009", "asil": "QM", - "title": "UDS-Diagnose", + "title": "UDS diagnostics", "text": ( - "Das System muss UDS-Diagnose nach ISO 14229 bereitstellen: " - "ReadDTC (0x19), ReadDataByIdentifier (0x22), RoutineControl (0x31), " - "ECUReset (0x11). Tester-Adresse 0x712, Antwort-Adresse 0x71A." + "The system must provide UDS diagnostics per ISO 14229: " + "ReadDTC (0x19), ReadDataByIdentifier (0x22), RoutineControl " + "(0x31), ECUReset (0x11). Tester address 0x712, response " + "address 0x71A." ), }, { "id": "SYS-010", "asil": "QM", - "title": "HMI-Statusanzeige", + "title": "HMI status display", "text": ( - "Der EPB-Status muss dem Fahrer signalisiert werden: LED am " - "Schalter (an = Apply, aus = Release, blinkend = Fehler) sowie " - "Text im Kombi-Display via CAN-Bus (Frame-ID 0x3A0, 50 Hz)." + "The EPB status must be signalled to the driver: LED on the " + "switch (on = applied, off = released, blinking = error) and a " + "text in the instrument cluster via CAN bus (frame ID 0x3A0, " + "50 Hz)." ), }, ] + # --------------------------------------------------------------------------- # Software Requirements (each links to one or more SYS reqs) # --------------------------------------------------------------------------- SWE_REQS = [ - # SYS-001 — Halten + # SYS-001 — hold {"id": "SWE-001", "asil": "D", "links": ["SYS-001"], - "title": "Apply-Controller haelt Klemmkraft", - "text": "Der Apply-Controller muss die Klemmkraft im Hold-Zustand alle 50 ms " - "verifizieren und bei Abweichung > 10% nachregeln."}, + "title": "Apply controller maintains clamping force", + "text": "The apply controller must verify the clamping force in the hold " + "state every 50 ms and re-apply when the deviation exceeds 10%."}, {"id": "SWE-002", "asil": "D", "links": ["SYS-001"], - "title": "Watchdog ueberwacht Apply-Controller", - "text": "Ein unabhaengiger Watchdog muss die Liveness des Apply-Controllers " - "mit 100 ms Timeout ueberwachen und bei Ausbleiben in den sicheren " - "Zustand (Apply) gehen."}, + "title": "Watchdog monitors the apply controller", + "text": "An independent watchdog must monitor the liveness of the apply " + "controller with a 100 ms timeout and, on failure to respond, " + "transition to the safe state (apply)."}, - # SYS-002 — Apply + # SYS-002 — apply {"id": "SWE-003", "asil": "D", "links": ["SYS-002"], - "title": "Schalter-Apply-Signal an Apply-Controller weiterleiten", - "text": "Das Software-Modul Switch-Debouncer muss ein entprelltes " - "Apply-Signal innerhalb von 50 ms an den Apply-Controller liefern."}, + "title": "Forward switch apply signal to the apply controller", + "text": "The Switch Debouncer software module must deliver a debounced " + "apply signal to the apply controller within 50 ms."}, {"id": "SWE-004", "asil": "D", "links": ["SYS-002"], - "title": "Klemmkraft-Erreichen bestaetigen", - "text": "Der Apply-Controller muss das Erreichen der Ziel-Klemmkraft via " - "Strommessung erkennen und ein Status-Flag setzen."}, + "title": "Confirm target clamping force reached", + "text": "The apply controller must detect that the target clamping force " + "has been reached via current measurement and set a status flag."}, - # SYS-003 — Release + # SYS-003 — release {"id": "SWE-005", "asil": "B", "links": ["SYS-003"], - "title": "Release-Voraussetzungen pruefen", - "text": "Vor jedem Release muss der Apply-Controller pruefen: Motor laeuft, " - "Bremspedal betaetigt, Gang ist eingelegt. Andernfalls Release abweisen."}, + "title": "Check release preconditions", + "text": "Before any release, the apply controller must verify: engine " + "running, brake pedal pressed, gear engaged. Otherwise reject " + "the release."}, {"id": "SWE-006", "asil": "B", "links": ["SYS-003"], - "title": "Aktoren in Release-Position fahren", - "text": "Der Actuator-Driver muss beide Aktoren parallel in Release-Position " - "fahren. Maximalzeit: 1200 ms. Bei Timeout DTC setzen."}, + "title": "Drive actuators into release position", + "text": "The Actuator Driver must drive both actuators in parallel into " + "the release position. Maximum time: 1200 ms. On timeout, set a " + "DTC."}, - # SYS-004 — Auto-Apply + # SYS-004 — auto-apply {"id": "SWE-007", "asil": "D", "links": ["SYS-004"], - "title": "Motor-Aus-Bedingung erkennen", - "text": "Der Safety-Manager muss erkennen: Motor-Status = aus, " - "Geschwindigkeit < 0.5 km/h. Auswertezyklus 50 ms."}, + "title": "Detect engine-off condition", + "text": "The Safety Manager must detect: engine status = off, vehicle " + "speed < 0.5 km/h. Sampling period 50 ms."}, {"id": "SWE-008", "asil": "D", "links": ["SYS-004"], - "title": "Auto-Apply nach 2 s Verzoegerung", - "text": "Ist die Motor-Aus-Bedingung 2 s stabil erfuellt und Parkbremse " - "noch nicht aktiv, muss der Safety-Manager Apply-Anforderung an " - "den Apply-Controller senden."}, + "title": "Auto-apply after 2 s delay", + "text": "If the engine-off condition is stable for 2 s and the parking " + "brake is not yet active, the Safety Manager must send an apply " + "request to the apply controller."}, - # SYS-005 — Hill-Hold + # SYS-005 — hill-hold {"id": "SWE-009", "asil": "D", "links": ["SYS-005"], - "title": "Hill-Hold-Aktivierungsbedingung", - "text": "Der Safety-Manager muss Hill-Hold aktivieren, wenn Neigung " - "(gefiltert) > 5%, Geschwindigkeit < 0.5 km/h und Bremspedal " - "betaetigt sind."}, + "title": "Hill-hold activation condition", + "text": "The Safety Manager must activate hill-hold when grade " + "(filtered) > 5%, vehicle speed < 0.5 km/h and the brake pedal " + "is pressed."}, {"id": "SWE-010", "asil": "D", "links": ["SYS-005"], - "title": "Hill-Hold-Uebergabe an Apply-Controller", - "text": "Wird das Bremspedal bei aktivem Hill-Hold losgelassen, muss der " - "Safety-Manager unmittelbar Apply-Anforderung an den Apply-" - "Controller senden, bevor das Fahrzeug zu rollen beginnen kann."}, + "title": "Hill-hold handover to the apply controller", + "text": "If the brake pedal is released while hill-hold is active, the " + "Safety Manager must immediately send an apply request to the " + "apply controller before the vehicle can start to roll."}, - # SYS-006 — Auto-Release + # SYS-006 — auto-release {"id": "SWE-011", "asil": "B", "links": ["SYS-006"], - "title": "Anfahrabsicht erkennen", - "text": "Anfahrabsicht ist erkannt, wenn: Gaspedal > 10%, Gang in Vorwaerts " - "oder Rueckwaerts, Motor laeuft."}, + "title": "Detect drive-away intent", + "text": "Drive-away intent is detected when: throttle > 10%, gear in " + "forward or reverse, engine running."}, {"id": "SWE-012", "asil": "B", "links": ["SYS-006"], - "title": "Sicherheits-Check vor Auto-Release", - "text": "Vor Auto-Release muessen erfuellt sein: Fahrertuer geschlossen, " - "Sicherheitsgurt angelegt. Andernfalls warnen und nicht loesen."}, + "title": "Safety check before auto-release", + "text": "Before auto-release, the following must be satisfied: driver " + "door closed, seatbelt fastened. Otherwise warn and do not " + "release."}, - # SYS-007 — Aktor-Strom + # SYS-007 — actuator current {"id": "SWE-013", "asil": "B", "links": ["SYS-007"], - "title": "Strommessung mit 1 kHz", - "text": "Der Actuator-Driver muss den Motorstrom jedes Aktors mit " - "mindestens 1 kHz abtasten. Genauigkeit +/- 100 mA."}, + "title": "Current sampling at 1 kHz", + "text": "The Actuator Driver must sample the motor current of each " + "actuator at at least 1 kHz. Accuracy +/- 100 mA."}, {"id": "SWE-014", "asil": "B", "links": ["SYS-007"], - "title": "Overcurrent-Cutoff", - "text": "Bei Motorstrom > 8 A laenger als 100 ms muss der Actuator-Driver " - "den Motor abschalten und einen DTC P0xxx setzen."}, + "title": "Overcurrent cutoff", + "text": "On motor current > 8 A for longer than 100 ms, the Actuator " + "Driver must shut down the motor and set DTC P0xxx."}, {"id": "SWE-015", "asil": "B", "links": ["SYS-007"], - "title": "Klemmkraft-Schaetzung aus Strom-Profil", - "text": "Der Actuator-Driver muss die erreichte Klemmkraft aus dem " - "Stromverlauf bei Apply schaetzen (Modell: F = k * I_peak)."}, + "title": "Clamping force estimation from current profile", + "text": "The Actuator Driver must estimate the achieved clamping force " + "from the current waveform during apply (model: F = k * I_peak)."}, - # SYS-008 — Service-Modus + # SYS-008 — service mode {"id": "SWE-016", "asil": "QM", "links": ["SYS-008"], - "title": "UDS RoutineControl 0x31 fuer Service-Release", - "text": "Service-Mode wird ueber UDS RoutineControl Service 0x31, " - "Routine-ID 0x0301 aktiviert. Bedingung: Fahrzeug muss stillstehen."}, + "title": "UDS RoutineControl 0x31 for service release", + "text": "Service mode is activated via UDS RoutineControl service 0x31, " + "routine ID 0x0301. Precondition: vehicle must be at standstill."}, {"id": "SWE-017", "asil": "QM", "links": ["SYS-008"], - "title": "Service-Mode-Indikator", - "text": "Im Service-Mode muss die EPB-LED am Schalter mit 2 Hz blinken."}, + "title": "Service mode indicator", + "text": "While in service mode, the EPB LED on the switch must blink " + "at 2 Hz."}, # SYS-009 — UDS {"id": "SWE-018", "asil": "QM", "links": ["SYS-009"], - "title": "UDS Service 0x19 ReadDTC", - "text": "Das System muss alle gespeicherten DTCs ueber Service 0x19 " - "(Subfunktion 0x02 reportDTCByStatusMask) ausgeben."}, + "title": "UDS service 0x19 ReadDTC", + "text": "The system must output all stored DTCs via service 0x19 " + "(sub-function 0x02 reportDTCByStatusMask)."}, {"id": "SWE-019", "asil": "QM", "links": ["SYS-009"], - "title": "UDS Service 0x22 ReadDataByIdentifier", - "text": "Folgende DIDs muessen lesbar sein: 0xF187 (SW-Version), " - "0x0301 (Klemmkraft links), 0x0302 (Klemmkraft rechts)."}, + "title": "UDS service 0x22 ReadDataByIdentifier", + "text": "The following DIDs must be readable: 0xF187 (SW version), " + "0x0301 (clamping force left), 0x0302 (clamping force right)."}, # SYS-010 — HMI {"id": "SWE-020", "asil": "QM", "links": ["SYS-010"], - "title": "LED-Steuerung", - "text": "Apply-aktiv: LED dauerleuchtend. Release: LED aus. Fehler: " - "LED blinkt 4 Hz. Service-Mode: LED blinkt 2 Hz."}, + "title": "LED control", + "text": "Apply active: LED solid. Release: LED off. Fault: LED blinks " + "at 4 Hz. Service mode: LED blinks at 2 Hz."}, {"id": "SWE-021", "asil": "QM", "links": ["SYS-010"], - "title": "CAN-Status-Frame", - "text": "Status-Frame 0x3A0 mit 50 Hz: Byte 0 = Status (0=Released, 1=Applied, " - "2=Applying, 3=Releasing, 0xFF=Error), Byte 1-2 = Klemmkraft links, " - "Byte 3-4 = Klemmkraft rechts."}, + "title": "CAN status frame", + "text": "Status frame 0x3A0 at 50 Hz: byte 0 = status (0=released, " + "1=applied, 2=applying, 3=releasing, 0xFF=error), byte 1-2 = " + "left clamping force, byte 3-4 = right clamping force."}, - # Sensorik & Plausibilisierung + # Sensors & plausibilisation {"id": "SWE-022", "asil": "B", "links": ["SYS-001", "SYS-002", "SYS-006"], - "title": "Stillstands-Erkennung aus Wheel Speeds", - "text": "Stillstand ist erkannt, wenn alle 4 Wheel-Speed-Signale fuer " - "mindestens 200 ms unter 0.5 km/h liegen."}, + "title": "Standstill detection from wheel speeds", + "text": "Standstill is detected when all 4 wheel-speed signals stay " + "below 0.5 km/h for at least 200 ms."}, {"id": "SWE-023", "asil": "B", "links": ["SYS-007"], - "title": "Wheel Speed Plausibilisierung", - "text": "Spreizung der Wheel-Speed-Signale: bei Geradeaus-Fahrt darf die " - "Differenz nicht > 3 km/h sein. Andernfalls Sensor-Fehler-DTC."}, + "title": "Wheel-speed plausibilisation", + "text": "Spread of the wheel-speed signals: when driving straight, the " + "difference must not exceed 3 km/h. Otherwise set a sensor " + "fault DTC."}, {"id": "SWE-024", "asil": "B", "links": ["SYS-005"], - "title": "Inclinometer Tiefpass-Filter", - "text": "Das Roh-Neigungssignal muss mit einem Tiefpass 1. Ordnung " - "(Zeitkonstante 200 ms) gefiltert werden, bevor es zur Hill-Hold-" - "Bewertung verwendet wird."}, + "title": "Inclinometer low-pass filter", + "text": "The raw inclinometer signal must be filtered with a first-" + "order low-pass (time constant 200 ms) before being used for " + "hill-hold evaluation."}, {"id": "SWE-025", "asil": "QM", "links": ["SYS-002", "SYS-003"], - "title": "Switch-Debouncing", - "text": "Der EPB-Schalter muss mit einer Entprell-Zeit von 50 ms " - "entprellt werden. Stabiler Pegel = Eingangssignal fuer " - "Apply-Controller."}, + "title": "Switch debouncing", + "text": "The EPB switch must be debounced with a debounce time of " + "50 ms. Stable level = input signal for the apply controller."}, ] + # --------------------------------------------------------------------------- # System Architecture Elements # --------------------------------------------------------------------------- @@ -349,28 +357,28 @@ SA_ELEMENTS = [ "title": "EPB ECU", "asil": "D", "text": textwrap.dedent(""" - ## Verantwortung + ## Responsibility - Zentrales Steuergeraet der elektrischen Parkbremse. Beinhaltet alle Software- - Komponenten und die elektronische Ansteuerung der Aktoren. + Central control unit of the electric parking brake. Contains all + software components and the electronic actuation of the actuators. - ## System-Kontext + ## System context ```plantuml @startuml node "EPB ECU" as ECU - node "Aktor links" as AL - node "Aktor rechts" as AR - node "Wheel Speed Sensoren (x4)" as WS + node "Actuator left" as AL + node "Actuator right" as AR + node "Wheel-speed sensors (x4)" as WS node "Inclinometer" as IN - node "EPB-Schalter + LED" as SW - node "CAN-Bus" as CAN - node "Kombi-Display" as DI - node "OBD-Tester" as OBD + node "EPB switch + LED" as SW + node "CAN bus" as CAN + node "Instrument cluster" as DI + node "OBD tester" as OBD - ECU --> AL : PWM, I-Mess - ECU --> AR : PWM, I-Mess - WS --> ECU : Pulse + ECU --> AL : PWM, I-meas + ECU --> AR : PWM, I-meas + WS --> ECU : pulses IN --> ECU : SPI SW --> ECU : GPIO ECU --> SW : LED @@ -380,124 +388,126 @@ SA_ELEMENTS = [ @enduml ``` - ## Schnittstellen + ## Interfaces - | Schnittstelle | Typ | Richtung | - |---------------|----------------|----------| - | Aktor L/R | PWM + Shunt | I/O | - | Wheel Speed | Hall-Pulse | In | - | Inclinometer | SPI | In | - | Schalter | GPIO debounced | In | - | LED | GPIO | Out | - | CAN | ISO 11898 | I/O | + | Interface | Type | Direction | + |---------------|------------------|-----------| + | Actuator L/R | PWM + shunt | I/O | + | Wheel speed | Hall pulses | in | + | Inclinometer | SPI | in | + | Switch | GPIO debounced | in | + | LED | GPIO | out | + | CAN | ISO 11898 | I/O | - ## Subkomponenten (Aufteilung auf SW) + ## Subcomponents (allocated to software) - Realisiert in Software: alle SWA-Elemente SWA-001..SWA-010. + Realised in software: all SWA elements SWA-001..SWA-010. - ## Nichtfunktionale Eigenschaften + ## Non-functional properties - - Worst-Case Reaktionszeit (Schalter → Aktor-Bewegung): 250 ms - - Flash-Bedarf: < 256 KB - - RAM-Bedarf: < 32 KB - - Stromaufnahme: < 200 mA (Standby) / < 30 A (Aktor-Spitze) + - Worst-case reaction time (switch to actuator motion): 250 ms + - Flash demand: < 256 KB + - RAM demand: < 32 KB + - Current: < 200 mA (standby) / < 30 A (actuator peak) """).strip(), }, { "id": "SA-002", "links": ["SYS-001", "SYS-002", "SYS-003", "SYS-007"], - "title": "Aktoren (Caliper-Motoren)", + "title": "Actuators (calliper motors)", "asil": "D", "text": textwrap.dedent(""" - ## Verantwortung + ## Responsibility - Zwei elektromechanische Aktoren an den hinteren Bremssaetteln klemmen - und loesen die Bremsbelaege. Geliefert (Annahme): kommerzielles Bauteil - eines Tier-1-Lieferanten. + Two electromechanical actuators on the rear callipers clamp and + release the brake pads. Supplied (assumption): commercial component + from a Tier-1 supplier. - ## Schnittstellen + ## Interfaces - | Schnittstelle | Typ | Bemerkung | - |---------------|--------------|-----------------------------------| - | Power | 12 V, PWM | bidirektional fuer Apply/Release | - | Strom-Shunt | Analog | wird in der ECU abgegriffen | + | Interface | Type | Notes | + |---------------|--------------|---------------------------------| + | Power | 12 V, PWM | bidirectional for apply/release | + | Current shunt | analog | sampled inside the ECU | - ## Nichtfunktionale Eigenschaften + ## Non-functional properties - - Max. Klemmkraft: 20 kN - - Apply-Zeit (0 → max): 600 ms - - Strom (nominal): 4 A - - Strom (Spitze): 30 A (kurzzeitig) - - Temperaturbereich: -40°C bis +85°C + - Max clamping force: 20 kN + - Apply time (0 → max): 600 ms + - Nominal current: 4 A + - Peak current: 30 A (brief) + - Temperature range: -40 °C to +85 °C """).strip(), }, { "id": "SA-003", "links": ["SYS-005", "SYS-006", "SYS-007"], - "title": "Sensor-Cluster", + "title": "Sensor cluster", "asil": "B", "text": textwrap.dedent(""" - ## Verantwortung + ## Responsibility - Zusammenfassung aller fuer die EPB benoetigten Eingangssignale: - Wheel-Speed-Sensoren (4x), Inclinometer (1x), EPB-Schalter, Bremspedal- - Status, Gear-Position, Door-Open, Seat-Belt — die letzten vier per CAN. + Summary of all input signals required by the EPB: wheel-speed + sensors (4x), inclinometer (1x), EPB switch, brake-pedal status, + gear position, door open, seatbelt — the last four via CAN. - ## Schnittstellen + ## Interfaces - | Sensor | Typ | Quelle | - |-----------------|------------------|--------------| - | Wheel Speed x4 | Hall-Pulse | direkt | - | Inclinometer | SPI 1 kHz | direkt | - | EPB-Schalter | GPIO | direkt | - | Bremspedal | CAN 0x100 | aus BCM | - | Gear | CAN 0x110 | aus TCU | - | Door / Belt | CAN 0x120 | aus BCM | + | Sensor | Type | Source | + |-----------------|--------------|------------| + | Wheel speed x4 | Hall pulses | direct | + | Inclinometer | SPI 1 kHz | direct | + | EPB switch | GPIO | direct | + | Brake pedal | CAN 0x100 | from BCM | + | Gear | CAN 0x110 | from TCU | + | Door / belt | CAN 0x120 | from BCM | - ## Nichtfunktionale Eigenschaften + ## Non-functional properties - - Wheel-Speed-Genauigkeit: +/- 0.1 km/h ab 1 km/h - - Inclinometer-Genauigkeit: +/- 0.5° - - Sampling-Frequenz Inclinometer: 100 Hz + - Wheel-speed accuracy: +/- 0.1 km/h above 1 km/h + - Inclinometer accuracy: +/- 0.5° + - Inclinometer sampling rate: 100 Hz """).strip(), }, { "id": "SA-004", "links": ["SYS-008", "SYS-010"], - "title": "HMI (Schalter, LED, Display)", + "title": "HMI (switch, LED, display)", "asil": "QM", "text": textwrap.dedent(""" - ## Verantwortung + ## Responsibility - Fahrer-Interaktion und -Information: Tippschalter mit integrierter LED, - Statusanzeige im Kombi-Display via CAN. + Driver interaction and information: tap switch with integrated LED, + status display in the instrument cluster via CAN. - ## Schnittstellen + ## Interfaces - | Element | Typ | Verhalten | - |---------------|----------|--------------------------------------------| - | Tippschalter | GPIO | Apply-Richtung / Release-Richtung | - | LED | GPIO | aus / an / blink 2 Hz / blink 4 Hz | - | Display | CAN 0x3A0 | 50 Hz Status-Frame | + | Element | Type | Behaviour | + |---------------|----------|-------------------------------------------| + | Tap switch | GPIO | apply direction / release direction | + | LED | GPIO | off / on / blink 2 Hz / blink 4 Hz | + | Display | CAN 0x3A0| 50 Hz status frame | """).strip(), }, { "id": "SA-005", "links": ["SYS-009", "SYS-010"], - "title": "CAN-Bus", + "title": "CAN bus", "asil": "QM", "text": textwrap.dedent(""" - ## Verantwortung + ## Responsibility - Kommunikations-Backbone fuer Eingangsdaten (Bremspedal, Gang, Tuer, Gurt), - Ausgabe (Status-Frame an Display) und Diagnose (UDS auf Tester-Adresse). + Communication backbone for input data (brake pedal, gear, door, + belt), output (status frame to the display) and diagnostics (UDS + on the tester address). - ## Schnittstellen + ## Interfaces - - Baudrate: 500 kbit/s, CAN 2.0B - - Empfangene Frames: 0x100 (Bremspedal), 0x110 (Gang), 0x120 (Door/Belt), - 0x712 (UDS-Request) - - Gesendete Frames: 0x3A0 (Status 50 Hz), 0x71A (UDS-Response) + - Baud rate: 500 kbit/s, CAN 2.0B + - Received frames: 0x100 (brake pedal), 0x110 (gear), + 0x120 (door/belt), 0x712 (UDS request) + - Sent frames: 0x3A0 (status 50 Hz), 0x71A (UDS response) """).strip(), }, ] + # --------------------------------------------------------------------------- # Software Architecture Elements # --------------------------------------------------------------------------- @@ -508,12 +518,12 @@ SWA_ELEMENTS = [ "links": ["SWE-007", "SWE-008", "SWE-009", "SWE-010", "SWE-011", "SWE-012"], "title": "Safety Manager", "text": textwrap.dedent(""" - ## Verantwortung + ## Responsibility - Hoechste Sicherheitsschicht. Erkennt Motor-Aus, aktiviert Hill-Hold, - triggert Auto-Apply. Lebenswichtige Logik mit redundanter Pruefung. + Highest safety layer. Detects engine-off, activates hill-hold, + triggers auto-apply. Life-critical logic with redundant checks. - ## Statische Sicht + ## Static view ```plantuml @startuml @@ -522,20 +532,20 @@ SWA_ELEMENTS = [ [Hill-Hold Logic] [Auto-Apply Logic] } - [Safety Manager] ..> [Apply Controller] : Apply-Anforderung + [Safety Manager] ..> [Apply Controller] : apply request [Wheel Speed Plausi] --> [Safety Manager] : v_vehicle [Inclinometer Filter] --> [Safety Manager] : grade @enduml ``` - ## Schnittstellen (Provided) + ## Provided interfaces ```c Status safety_mgr_init(void); void safety_mgr_step_50ms(const SafetyInputs* in); ``` - ## Dynamisches Verhalten + ## Dynamic behaviour ```plantuml @startuml @@ -549,19 +559,19 @@ SWA_ELEMENTS = [ @enduml ``` - ## Ressourcen + ## Resources - Stack: <= 256 B - - Worst-Case Timing: 200 us / Aufruf + - Worst-case timing: 200 us per call - ## Mapping auf Anforderungen + ## Mapping to requirements - | Anforderung | Wie abgedeckt | - |-------------|---------------| + | Requirement | How covered | + |-------------|-------------| | SWE-007 | engine_off + v<0.5 in step_50ms | - | SWE-008 | 2s-Filter und Trigger | - | SWE-009 | Hill-Hold-Aktivierung | - | SWE-010 | Brake-Released-Detektion | + | SWE-008 | 2 s filter and trigger | + | SWE-009 | hill-hold activation | + | SWE-010 | brake-released detection | """).strip(), }, { @@ -569,12 +579,13 @@ SWA_ELEMENTS = [ "links": ["SWE-001", "SWE-002", "SWE-003", "SWE-004", "SWE-005"], "title": "Apply Controller", "text": textwrap.dedent(""" - ## Verantwortung + ## Responsibility - Zentraler Controller fuer Apply, Hold und Release der Parkbremse. - ASIL-D-Kern der EPB-Software. Implementiert in `src/apply_controller.c`. + Central controller for apply, hold and release of the parking brake. + ASIL-D core of the EPB software. Implemented in + `src/apply_controller.c`. - ## Statische Sicht + ## Static view ```plantuml @startuml @@ -587,7 +598,7 @@ SWA_ELEMENTS = [ @enduml ``` - ## Schnittstellen (Provided) + ## Provided interfaces ```c Status apply_ctrl_init(void); @@ -595,7 +606,7 @@ SWA_ELEMENTS = [ EpbStatus apply_ctrl_get_status(void); ``` - ## Dynamisches Verhalten + ## Dynamic behaviour ```plantuml @startuml @@ -611,27 +622,27 @@ SWA_ELEMENTS = [ @enduml ``` - ## Ressourcen + ## Resources - Stack: <= 384 B - - Worst-Case Timing: 350 us / Aufruf + - Worst-case timing: 350 us per call - ## Designentscheidungen + ## Design decisions - | Entscheidung | Begruendung | - |--------------|-------------| - | Statische Allokation, kein Heap | Determinismus, MISRA C 21.3 | - | State Machine | Einfacher zu verifizieren, deterministisch | - | 50ms Step-Funktion | Synchron zur Inclinometer-Abtastung | + | Decision | Rationale | + |----------|-----------| + | Static allocation, no heap | Determinism, MISRA C 21.3 | + | State machine | Easier to verify, deterministic | + | 50 ms step function | Synchronous with inclinometer sample rate | - ## Mapping auf Anforderungen + ## Mapping to requirements - | 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 | + | Requirement | How covered | + |-------------|-------------| + | SWE-001 | Hold state with periodic clamping-force check | + | SWE-002 | Watchdog pet in step_50ms | + | SWE-003 | sw_apply input is evaluated immediately | + | SWE-004 | current-target detection via actuator-driver feedback | """).strip(), }, { @@ -639,13 +650,13 @@ SWA_ELEMENTS = [ "links": ["SWE-006", "SWE-013", "SWE-014", "SWE-015"], "title": "Actuator Driver", "text": textwrap.dedent(""" - ## Verantwortung + ## Responsibility - Low-Level-Ansteuerung der beiden Aktor-Motoren. PWM-Generierung, - Strom-Messung, Overcurrent-Cutoff, Klemmkraft-Schaetzung. - Implementiert in `src/actuator_driver.c`. + Low-level control of the two actuator motors. PWM generation, + current measurement, overcurrent cutoff, clamping-force estimation. + Implemented in `src/actuator_driver.c`. - ## Statische Sicht + ## Static view ```plantuml @startuml @@ -656,7 +667,7 @@ SWA_ELEMENTS = [ @enduml ``` - ## Schnittstellen (Provided) + ## Provided interfaces ```c Status actuator_init(void); @@ -664,36 +675,36 @@ SWA_ELEMENTS = [ void actuator_release(ActuatorId id, uint8_t pwm_percent); void actuator_stop(ActuatorId id); ActuatorStatus actuator_get_status(ActuatorId id); - void actuator_isr_1khz(void); // Strom-Sampling + void actuator_isr_1khz(void); // Current sampling ``` - ## Ressourcen + ## Resources - Stack: <= 256 B - - Worst-Case Timing: 50 us / ISR - - Static RAM: 64 B pro Aktor + - Worst-case timing: 50 us per ISR + - Static RAM: 64 B per actuator - ## Mapping auf Anforderungen + ## Mapping to requirements - | Anforderung | Wie abgedeckt | - |-------------|---------------| - | SWE-006 | actuator_release fuer beide Aktoren parallel | + | Requirement | How covered | + |-------------|-------------| + | SWE-006 | actuator_release for both actuators in parallel | | SWE-013 | actuator_isr_1khz | - | SWE-014 | Overcurrent-Detektor in ISR | - | SWE-015 | Peak-Current-Tracking + lineare Klemmkraft-Schaetzung | + | SWE-014 | overcurrent detector in ISR | + | SWE-015 | peak-current tracking + linear clamping-force estimate | """).strip(), }, { "id": "SWA-004", "asil": "B", "links": ["SWE-022", "SWE-023"], - "title": "Wheel Speed Plausibilisierung", + "title": "Wheel Speed Plausibilisation", "text": textwrap.dedent(""" - ## Verantwortung + ## Responsibility - Aufbereitung und Plausibilisierung der 4 Wheel-Speed-Signale. Erkennt - Stillstand und plausibilisiert untereinander. + Conditioning and plausibilisation of the four wheel-speed signals. + Detects standstill and cross-checks the wheels. - ## Schnittstellen (Provided) + ## Provided interfaces ```c Status wheel_speed_init(void); @@ -708,11 +719,12 @@ SWA_ELEMENTS = [ "links": ["SWE-024"], "title": "Inclinometer Filter", "text": textwrap.dedent(""" - ## Verantwortung + ## Responsibility - Tiefpass-Filterung des Inclinometer-Roh-Signals fuer die Hill-Hold-Bewertung. + Low-pass filtering of the raw inclinometer signal for hill-hold + evaluation. - ## Schnittstellen (Provided) + ## Provided interfaces ```c Status inclino_init(void); @@ -726,12 +738,13 @@ SWA_ELEMENTS = [ "links": ["SWE-025"], "title": "Switch Debouncer", "text": textwrap.dedent(""" - ## Verantwortung + ## Responsibility - Software-Entprellung des EPB-Schalters. Liefert stabiles Apply / Release - Signal an den Apply-Controller. Implementiert in `src/switch_debouncer.c`. + Software debouncing of the EPB switch. Provides a stable apply / + release signal to the apply controller. Implemented in + `src/switch_debouncer.c`. - ## Schnittstellen (Provided) + ## Provided interfaces ```c Status switch_init(void); @@ -739,11 +752,11 @@ SWA_ELEMENTS = [ SwitchState switch_get_state(void); ``` - ## Mapping auf Anforderungen + ## Mapping to requirements - | Anforderung | Wie abgedeckt | - |-------------|---------------| - | SWE-025 | 50ms Debounce-Logik | + | Requirement | How covered | + |-------------|-------------| + | SWE-025 | 50 ms debounce logic | """).strip(), }, { @@ -751,17 +764,17 @@ SWA_ELEMENTS = [ "links": ["SWE-020", "SWE-021"], "title": "Display Manager", "text": textwrap.dedent(""" - ## Verantwortung + ## Responsibility - Steuert LED am EPB-Schalter und CAN-Status-Frame an das Kombi-Display. - Empfaengt Status vom Apply-Controller. + Drives the LED on the EPB switch and the CAN status frame to the + instrument cluster. Receives status from the apply controller. - ## Schnittstellen (Provided) + ## Provided interfaces ```c Status display_init(void); void display_set_status(EpbStatus s); - void display_step_20ms(void); // 50 Hz CAN-Frame + void display_step_20ms(void); // 50 Hz CAN frame ``` """).strip(), }, @@ -770,11 +783,12 @@ SWA_ELEMENTS = [ "links": ["SWE-018", "SWE-019"], "title": "Diagnostic Manager", "text": textwrap.dedent(""" - ## Verantwortung + ## Responsibility - UDS-Diagnose nach ISO 14229: ReadDTC, ReadDataByIdentifier, RoutineControl. + UDS diagnostics per ISO 14229: ReadDTC, ReadDataByIdentifier, + RoutineControl. - ## Schnittstellen (Provided) + ## Provided interfaces ```c Status diag_init(void); @@ -788,10 +802,11 @@ SWA_ELEMENTS = [ "links": ["SWE-016", "SWE-017"], "title": "Service Mode", "text": textwrap.dedent(""" - ## Verantwortung + ## Responsibility - Service-Modus fuer Werkstatt. Wird ueber UDS RoutineControl 0x31, Routine-ID - 0x0301 aktiviert. Steuert Aktoren in Wartungsposition. + Service mode for the workshop. Activated via UDS RoutineControl + 0x31, routine ID 0x0301. Drives the actuators into maintenance + position. """).strip(), }, { @@ -799,12 +814,12 @@ SWA_ELEMENTS = [ "links": ["SWE-018", "SWE-019"], "title": "Logger", "text": textwrap.dedent(""" - ## Verantwortung + ## Responsibility - Logging fuer Entwicklung und Service. Ringpuffer im RAM (1 KB) sowie - Persistenz im EEPROM bei kritischen Ereignissen. + Logging for development and service. Ring buffer in RAM (1 KB) + plus persistence in EEPROM on critical events. - ## Schnittstellen (Provided) + ## Provided interfaces ```c Status log_init(void); @@ -814,6 +829,7 @@ SWA_ELEMENTS = [ }, ] + # --------------------------------------------------------------------------- # Generation # --------------------------------------------------------------------------- @@ -839,7 +855,7 @@ asil: {asil} def emit_links(links): if not links: return " []" - parts = ["\n - {}".format(l) for l in links] + parts = ["\n - {}".format(link) for link in links] return "".join(parts) @@ -867,7 +883,7 @@ def main(): write_items(SA_ELEMENTS, REPO / "arch" / "sys") write_items(SWA_ELEMENTS, REPO / "arch" / "swe") print("\nTotal: {} reqs/arch items.".format( - len(SYS_REQS) + len(SWE_REQS) + len(SA_ELEMENTS) + len(SWA_ELEMENTS) + len(SG_GOALS) + len(SYS_REQS) + len(SWE_REQS) + len(SA_ELEMENTS) + len(SWA_ELEMENTS) )) diff --git a/tools/generate_landing_page.py b/tools/generate_landing_page.py index 97cf81e..ebbf0ec 100644 --- a/tools/generate_landing_page.py +++ b/tools/generate_landing_page.py @@ -1,18 +1,20 @@ #!/usr/bin/env python3 """ -Erzeugt eine HTML-Startseite (Dashboard) fuer demo-epb. +Generate an HTML landing page (dashboard) for demo-epb. -Scant das Repo nach Word-Dokumenten, Reports, Code, Tests, Architektur, und -schreibt build/index.html mit klickbaren Links. +Scans the repo for Word documents, reports, code, tests, architecture, and +writes build/index.html with clickable links. -Run nach `make test && make coverage && make docs && make test-report && python3 tools/traceability.py publish docs/traceability && python3 tools/render_plantuml.py`. +Run after `make test && make coverage && make docs && make test-report && +python3 tools/traceability.py publish docs/traceability && +python3 tools/render_plantuml.py`. Output: - build/index.html — standalone, oeffnen mit Browser + build/index.html — standalone, open in a browser -Verwendung im Release-Bundle: - - Liegt bei demo-epb-vX.Y.Z/index.html - - Verlinkt alle anderen Bundle-Inhalte relativ +Use in the release bundle: + - Lives at demo-epb-vX.Y.Z/index.html + - Links to all other bundle contents using relative paths """ from __future__ import annotations @@ -66,20 +68,11 @@ def collect_docs(rel_dir: str, in_release: bool = False) -> list[tuple[str, str] if not d.exists(): return out for f in sorted(d.glob("*.docx")): - # In release bundle, paths are different; here we use relative-to-repo. href = os.path.relpath(f, REPO) - # If running for in_release context, paths need adjustment, but for now - # we always use repo-relative. out.append((f.stem, href)) return out -def status_for(path: Path) -> str: - if path.exists(): - return "ok" - return "missing" - - def kpi_card(label: str, value: str, sub: str = "", color: str = "#1f3864") -> str: return f"""
@@ -92,7 +85,7 @@ def kpi_card(label: str, value: str, sub: str = "", color: str = "#1f3864") -> s def doc_section(title: str, docs: list[tuple[str, str]], description: str = "") -> str: if not docs: - items = "
  • — keine Dokumente —
  • " + items = "
  • — no documents —
  • " else: items = "\n".join( f'
  • {html.escape(name)}
  • ' @@ -109,7 +102,7 @@ def doc_section(title: str, docs: list[tuple[str, str]], description: str = "") def report_link(name: str, href: str, exists: bool, desc: str) -> str: cls = "ok" if exists else "missing" - label = name + ("" if exists else " (nicht generiert — Coverage/Build laufen lassen)") + label = name + ("" if exists else " (not generated — run coverage/build)") if exists: return (f"
  • {html.escape(label)} " f"— {html.escape(desc)}
  • ") @@ -139,9 +132,9 @@ def main() -> int: ncs = collect_docs("docs/non-conformities") misra_r = collect_docs("misra/records") - # Reports — Links zeigen auf BUNDLE-Pfade (relative zum index.html im Deploy). - # Die CI-Pipeline deployt die Artefakte in genau diese Pfade, - # darum ist deren Existenz hier irrelevant — Links werden immer emittiert. + # Reports — links target BUNDLE paths (relative to index.html in deploy). + # The CI pipeline copies artifacts to exactly these paths, so the links + # always resolve in the deployed bundle. rep_paths = { "coverage": "coverage/index.html", "test": "reports/test-report.html", @@ -149,17 +142,11 @@ def main() -> int: "trace": "traceability/index.html", "cppcheck": "reports/cppcheck-report.xml", } - # Existence-Check zum Anzeigen "Generated?" — gegen den CI/lokalen Build-Pfad. - rep_cov_built = (REPO / "build" / "coverage-html" / "index.html").exists() - rep_test_built = (REPO / "build" / "test-report.html").exists() - rep_api_built = (REPO / "build" / "api-doc" / "html" / "index.html").exists() - rep_trace_built = (REPO / "docs" / "traceability" / "index.html").exists() - rep_cpp_built = (REPO / "build" / "cppcheck-report.xml").exists() html_body = f""" - + -demo-epb {html.escape(tag)} — Projekt-Dashboard +demo-epb {html.escape(tag)} — Project Dashboard
    -

    demo-epb — Elektrische Parkbremse

    -
    Version {html.escape(tag)} · Commit {html.escape(sha)} · Generiert {html.escape(now)}
    +

    demo-epb — Electric Parking Brake

    +
    Version {html.escape(tag)} · Commit {html.escape(sha)} · Generated {html.escape(now)}
    {kpi_card("Safety Goals", str(n_sg), "ASIL D/D/A/C/B", "#d62728")} {kpi_card("System Reqs", str(n_sys), f"in reqs/sys/")} {kpi_card("SW Reqs", str(n_swe), f"in reqs/swe/")} -{kpi_card("Arch-Elemente", f"{n_sa+n_swa}", f"{n_sa} SA + {n_swa} SWA")} -{kpi_card("Komponenten", f"{n_impl}", f"+ {n_stubs} Stubs", "#2ca02c")} -{kpi_card("Unit-Tests", str(n_tests), "Alle gruen", "#2ca02c")} +{kpi_card("Arch Elements", f"{n_sa+n_swa}", f"{n_sa} SA + {n_swa} SWA")} +{kpi_card("Components", f"{n_impl}", f"+ {n_stubs} stubs", "#2ca02c")} +{kpi_card("Unit tests", str(n_tests), "All green", "#2ca02c")}
    -
    - -
    -

    Plaene (Word)

    -
      """ - for name, href in plans: - if not href.startswith("docs/safety") and not href.startswith("docs/manuals"): - html_body += f"
    • {html.escape(name)}
    • \n" - html_body += "
    \n" - - html_body += doc_section("Funktionale Sicherheit (Word)", safety, - "HARA, Safety Case, FMEDA, Compliance, Verification, Tool-Qualification") + html_body += "
    " + html_body += doc_section("Plans (Word)", plans, + "Project Manual, PID, PM Plan, QA Plan, SWE Plan, Test Plan, CM Plan, RM Plan") + html_body += doc_section("Functional Safety (Word)", safety, + "HARA, Safety Case, FMEDA, Compliance, Verification, Tool Qualification") html_body += "
    " html_body += doc_section("Manuals (Word)", manuals, - "End-User + Werkstatt-Doku") + "End-user + workshop documentation") audit_docs = reviews + ncs + misra_r - html_body += doc_section("Audit-Artefakte (Word)", audit_docs, - "Reviews, Non-Conformities, MISRA-Deviation-Records") + html_body += doc_section("Audit Artifacts (Word)", audit_docs, + "Reviews, non-conformities, MISRA deviation records") html_body += "
    " - # Reports — Links immer setzen, Bundle-Pfade. - html_body += "

    Engineering-Reports (CI-generiert)

      \n" - html_body += report_link("Traceability-Matrix", rep_paths["trace"], True, - "SG -> SYS -> SA, SWE -> SWA -> Code+Test, bidirektional verifiziert") - html_body += report_link("Test-Summary", rep_paths["test"], True, - f"{n_tests} Unit-Tests mit Anforderungs-Mapping") + # Reports — always emit links, bundle-relative paths. + html_body += "

      Engineering Reports (CI-generated)

        \n" + html_body += report_link("Traceability Matrix", rep_paths["trace"], True, + "SG -> SYS -> SA, SWE -> SWA -> Code+Test, verified bidirectionally") + html_body += report_link("Test Summary", rep_paths["test"], True, + f"{n_tests} unit tests with requirement mapping") html_body += report_link("Coverage (gcov/lcov)", rep_paths["coverage"], True, - "Statement + Branch Coverage, klickbar bis Zeilen-Level") - html_body += report_link("API-Dokumentation (Doxygen)", rep_paths["api"], True, - "Alle Header + Funktionen, mit @arch/@reqs/@asil") - html_body += report_link("Cppcheck-Report (HTML)", "reports/cppcheck/index.html", True, - "Statische Analyse + MISRA-Findings, klickbar pro Datei") - html_body += report_link("Cppcheck-Report (XML, Roh)", rep_paths["cppcheck"], True, - "Maschinen-lesbares Format fuer eigene Tools") + "Statement + branch coverage, drill down to line level") + html_body += report_link("API Documentation (Doxygen)", rep_paths["api"], True, + "All headers + functions, with @arch/@reqs/@asil") + html_body += report_link("Cppcheck Report (HTML)", "reports/cppcheck/index.html", True, + "Static analysis + MISRA findings, clickable per file") + html_body += report_link("Cppcheck Report (XML, raw)", rep_paths["cppcheck"], True, + "Machine-readable format for your own tools") html_body += "
      " # Diagrams diagrams = sorted((REPO / "docs" / "diagrams").glob("*.svg")) if diagrams: - html_body += "

      Architektur-Diagramme (PlantUML)

        " + html_body += "

        Architecture Diagrams (PlantUML)

          " for d in diagrams: href = os.path.relpath(d, REPO) html_body += f"
        • {html.escape(d.stem)}
        • \n" @@ -260,24 +240,24 @@ footer {{ text-align: center; color: #888; padding: 30px; font-size: 13px; }} # Source code links html_body += """
          -

          Source-Code

          +

          Source Code

          """ html_body += f"""
          -

          Externe Links

          +

          External Links

          diff --git a/tools/generate_test_report.py b/tools/generate_test_report.py index 4d6b566..eca8f98 100644 --- a/tools/generate_test_report.py +++ b/tools/generate_test_report.py @@ -2,7 +2,7 @@ """ Erzeugt einen Test-Summary-Report aus dem Output unserer Unit-Tests. -Liest die Test-Output-Datei (build/test-output.txt) und erzeugt: +Reads the test-output file (build/test-output.txt) and produces: - build/test-report.md - build/test-report.html @@ -67,7 +67,7 @@ def main() -> int: output = TEST_OUTPUT.read_text() results = parse_output(output) if not results: - print("ERROR: keine Test-Suite im Output gefunden.") + print("ERROR: no test suite found in the output.") return 1 total = sum(r["total"] for r in results) @@ -77,11 +77,11 @@ def main() -> int: # Markdown md = [f"# demo-epb — Test Summary Report\n\n", - f"**Datum:** {now}\n\n", - f"**Gesamt:** {total} Tests, {passed} bestanden, {failed} fehlgeschlagen\n\n", + f"**Date:** {now}\n\n", + f"**Total:** {total} tests, {passed} passed, {failed} failed\n\n", f"**Status:** {'PASS' if failed == 0 else 'FAIL'}\n\n", - "## Pro Test-Suite\n\n", - "| Suite | Anzahl | Bestanden | Fehlgeschlagen | Anforderungen |\n", + "## Per Test Suite\n\n", + "| Suite | Count | Passed | Failed | Requirements |\n", "|-------|--------|-----------|-----------------|---------------|\n"] for r in results: reqs = ", ".join(reqs_for(r["binary"])) or "—" @@ -113,12 +113,12 @@ def main() -> int: ".pass-badge{background:#0a0}.fail-badge{background:#c00}", "", "

          demo-epb — Test Summary Report

          ", - f"

          Datum: {now}

          ", - f"

          Gesamt: {total} Tests, {passed} bestanden, {failed} fehlgeschlagen — " + f"

          Date: {now}

          ", + f"

          Total: {total} tests, {passed} passed, {failed} failed — " f"{badge_txt}

          ", - "

          Pro Test-Suite

          ", - "
    Test fileCovers SWA@reqs
    tests/unit/test_safety_manager.cSWA-001SWE-007 SWE-008 SWE-009 SWE-010 SWE-011 SWE-012
    tests/unit/test_apply_controller.cSWA-002SWE-001 SWE-002 SWE-003 SWE-004 SWE-005
    tests/unit/test_actuator_driver.cSWA-003SWE-006 SWE-013 SWE-014 SWE-015
    " - "", + "

    Per Test Suite

    ", + "
    SuiteAnzahlBestandenFehlgeschlagenAnforderungen
    " + "", ] for r in results: reqs = ", ".join(reqs_for(r["binary"])) or "—" diff --git a/tools/traceability.py b/tools/traceability.py index 90f457c..ed0a886 100644 --- a/tools/traceability.py +++ b/tools/traceability.py @@ -1,17 +1,17 @@ #!/usr/bin/env python3 """ -Traceability-Werkzeug fuer demo-epb. +Traceability tool for demo-epb. -Liest Markdown-Items aus safety/sg, reqs/sys, reqs/swe, arch/sys, arch/swe und -verifiziert die Traceability-Kette: +Reads Markdown items from safety/sg, reqs/sys, reqs/swe, arch/sys, arch/swe and +verifies the traceability chain: SG <-- SYS <-- SA <-- SWE <-- SWA <-- Code (@arch) <-- Tests (@reqs) Subcommands: - check Validiert Konsistenz, exit 1 bei Fehlern - publish DIR Schreibt HTML + JSON nach DIR/ + check Validates consistency, exits 1 on errors + publish DIR Writes HTML + JSON to DIR/ Run: python3 tools/traceability.py check @@ -160,27 +160,27 @@ def check_code_test_mapping(items: dict[str, Item]) -> list[str]: src = REPO / src_rel arch_tags, _ = extract_tags(src) if swa_id not in arch_tags: - errors.append(f"{src_rel}: header @arch enthaelt {swa_id} nicht " - f"(gefunden: {arch_tags or '—'})") + errors.append(f"{src_rel}: header @arch does not contain {swa_id} " + f"(found: {arch_tags or '—'})") # For each test, verify @reqs covers the SWE that the corresponding SWA links to for test_file, swa_id in IMPLEMENTED_TESTS.items(): test_path = REPO / "tests" / "unit" / test_file _, reqs_in_test = extract_tags(test_path) if not reqs_in_test: - errors.append(f"tests/unit/{test_file}: kein @reqs Tag im Header") + errors.append(f"tests/unit/{test_file}: no @reqs tag in header") continue swa = items.get(swa_id) if swa is None: - errors.append(f"tests/unit/{test_file}: referenziertes " - f"{swa_id} nicht gefunden") + errors.append(f"tests/unit/{test_file}: referenced " + f"{swa_id} not found") continue swa_swe = set(swa.links) test_swe = set(reqs_in_test) missing = swa_swe - test_swe if missing: - errors.append(f"tests/unit/{test_file}: deckt nicht alle SWE " - f"der {swa_id} ab — fehlend: {sorted(missing)}") + errors.append(f"tests/unit/{test_file}: does not cover all SWE of " + f"{swa_id} — missing: {sorted(missing)}") return errors @@ -241,7 +241,7 @@ def cmd_check(items: dict[str, Item]) -> int: for e in errors: print(f" - {e}") return 1 - print("OK — Traceability vollstaendig (SG → SYS → SA, SWE → SWA → Code+Test).") + print("OK — Traceability complete (SG → SYS → SA, SWE → SWA → Code+Test).") return 0 @@ -314,7 +314,7 @@ def cmd_publish(items: dict[str, Item], out_dir: Path) -> int: ".missing{color:#c00}", "", "

    demo-epb — Traceability Matrix

    ", - "

    Vollstaendige Kette: SG → SYS → SA, SWE → SWA → Code (@arch) + Test (@reqs)

    ", + "

    Complete chain: SG → SYS → SA, SWE → SWA → Code (@arch) + Test (@reqs)

    ", "

    ", ] for p, _, label in SOURCES: @@ -325,9 +325,9 @@ def cmd_publish(items: dict[str, Item], out_dir: Path) -> int: parts.append("

    SuiteCountPassedFailedRequirements
    ") parts.append( - "" - "" - "" + "" + "" + "" ) def cell_items(ids: list[str]) -> str: @@ -377,8 +377,8 @@ def cmd_publish(items: dict[str, Item], out_dir: Path) -> int: parts.append("
    Safety GoalSystem-RequirementSystem-ArchSoftware-ReqSoftware-ArchCodeTest
    Safety GoalSystem RequirementSystem ArchSoftware ReqSoftware ArchCodeTest
    ") # Code/Test details - parts.append("

    Code → Architektur

    ") - parts.append("") + parts.append("

    Code → Architecture

    ") + parts.append("
    Datei@arch@reqs
    ") for swa_id, src_rel in IMPLEMENTED_SWA.items(): arch, reqs = extract_tags(REPO / src_rel) parts.append( @@ -388,8 +388,8 @@ def cmd_publish(items: dict[str, Item], out_dir: Path) -> int: ) parts.append("
    File@arch@reqs
    ") - parts.append("

    Test → Anforderungen

    ") - parts.append("") + parts.append("

    Test → Requirements

    ") + parts.append("
    Test-DateiDecklt SWA@reqs
    ") for test_file, swa_id in IMPLEMENTED_TESTS.items(): _, reqs = extract_tags(REPO / "tests" / "unit" / test_file) parts.append(
    Test fileCovers SWA@reqs