demo-epb  v1.0
Elektrische Parkbremse - slohmaier Dev Process Demo
safety_manager.c-Dateireferenz

Safety Manager — Hill-Hold, Auto-Apply, Drive-Away-Assist. Mehr ...

#include <stddef.h>
#include "safety_manager.h"

gehe zum Quellcode dieser Datei

Datenstrukturen

struct  SafetyCtx
 

Funktionen

static void enter (SafetyState s)
 
static bool standstill (const SafetyInputs *in)
 
static bool grade_steep (const SafetyInputs *in)
 
static bool drive_intent (const SafetyInputs *in)
 
static bool drive_away_safety_ok (const SafetyInputs *in)
 
EpbStatus safety_mgr_init (void)
 
void safety_mgr_step_50ms (const SafetyInputs *in)
 
bool safety_mgr_apply_requested (void)
 
bool safety_mgr_release_requested (void)
 
SafetyState safety_mgr_get_state (void)
 

Variablen

static SafetyCtx s_ctx
 

Ausführliche Beschreibung

Safety Manager — Hill-Hold, Auto-Apply, Drive-Away-Assist.

Architecture-Element:
SWA-001
Requirements:
SWE-007 SWE-008 SWE-009 SWE-010 SWE-011 SWE-012

ASIL: D. Diese Komponente entscheidet, wann der Apply Controller eine Apply- oder Release-Anforderung erhaelt (Hill-Hold-Uebergabe, Auto-Apply bei Motor-Aus, Drive-Away-Assist). Aenderungen erfordern Technical Review mit 2 Approvals.

Definiert in Datei safety_manager.c.

Dokumentation der Funktionen

◆ drive_away_safety_ok()

static bool drive_away_safety_ok ( const SafetyInputs in)
static
Requirements:
SWE-012 (Sicherheits-Check vor Auto-Release)

Definiert in Zeile 60 der Datei safety_manager.c.

Benutzt SafetyInputs::door_closed und SafetyInputs::seatbelt_fastened.

Wird benutzt von safety_mgr_step_50ms().

◆ drive_intent()

static bool drive_intent ( const SafetyInputs in)
static
Requirements:
SWE-011 (Anfahrabsicht erkennen)

Definiert in Zeile 50 der Datei safety_manager.c.

Benutzt SafetyInputs::engine_running, SafetyInputs::gas_pedal_percent, SafetyInputs::gear_in_drive und SAFETY_DRIVE_INTENT_GAS_PCT.

Wird benutzt von safety_mgr_step_50ms().

◆ enter()

static void enter ( SafetyState  s)
static

Definiert in Zeile 26 der Datei safety_manager.c.

Benutzt s_ctx, SafetyCtx::state und SafetyCtx::ticks_in_state.

Wird benutzt von safety_mgr_step_50ms().

◆ grade_steep()

static bool grade_steep ( const SafetyInputs in)
static

Definiert in Zeile 37 der Datei safety_manager.c.

Benutzt SafetyInputs::grade_percent und SAFETY_HILLHOLD_GRADE_PCT.

Wird benutzt von safety_mgr_step_50ms().

◆ safety_mgr_apply_requested()

bool safety_mgr_apply_requested ( void  )

Definiert in Zeile 172 der Datei safety_manager.c.

Benutzt SafetyCtx::apply_requested und s_ctx.

◆ safety_mgr_get_state()

SafetyState safety_mgr_get_state ( void  )

Definiert in Zeile 182 der Datei safety_manager.c.

Benutzt s_ctx und SafetyCtx::state.

◆ safety_mgr_init()

◆ safety_mgr_release_requested()

bool safety_mgr_release_requested ( void  )

Definiert in Zeile 177 der Datei safety_manager.c.

Benutzt SafetyCtx::release_requested und s_ctx.

◆ safety_mgr_step_50ms()

◆ standstill()

static bool standstill ( const SafetyInputs in)
static

Definiert in Zeile 32 der Datei safety_manager.c.

Benutzt SAFETY_STANDSTILL_KMH und SafetyInputs::vehicle_speed_kmh.

Wird benutzt von safety_mgr_step_50ms().

Variablen-Dokumentation

◆ s_ctx