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

Apply/Hold/Release State Machine. Mehr ...

#include <stddef.h>
#include "apply_controller.h"
#include "actuator_driver.h"

gehe zum Quellcode dieser Datei

Datenstrukturen

struct  ApplyCtx
 

Funktionen

static void enter_state (EpbState new_state)
 
static bool release_preconditions_ok (const ApplyInputs *in)
 
static bool apply_request_present (const ApplyInputs *in)
 
static bool release_request_present (const ApplyInputs *in)
 
static uint16_t min_force (const ApplyInputs *in)
 
EpbStatus apply_ctrl_init (void)
 
void apply_ctrl_step_50ms (const ApplyInputs *in)
 50 ms step function. Mehr ...
 
EpbState apply_ctrl_get_state (void)
 
EpbStatus apply_ctrl_last_error (void)
 
uint32_t apply_ctrl_get_step_count (void)
 

Variablen

static ApplyCtx s_ctx
 

Ausführliche Beschreibung

Apply/Hold/Release State Machine.

Architecture-Element:
SWA-002
Requirements:
SWE-001 SWE-002 SWE-003 SWE-004

ASIL: D. This is the safety-critical core logic. Changes require a technical review with 2 approvals.

Definiert in Datei apply_controller.c.

Dokumentation der Funktionen

◆ apply_ctrl_get_state()

EpbState apply_ctrl_get_state ( void  )

Definiert in Zeile 140 der Datei apply_controller.c.

Benutzt s_ctx und ApplyCtx::state.

◆ apply_ctrl_get_step_count()

uint32_t apply_ctrl_get_step_count ( void  )

Definiert in Zeile 150 der Datei apply_controller.c.

Benutzt s_ctx und ApplyCtx::step_count.

◆ apply_ctrl_init()

◆ apply_ctrl_last_error()

EpbStatus apply_ctrl_last_error ( void  )

Definiert in Zeile 145 der Datei apply_controller.c.

Benutzt ApplyCtx::last_error und s_ctx.

◆ apply_ctrl_step_50ms()

◆ apply_request_present()

static bool apply_request_present ( const ApplyInputs in)
static

◆ enter_state()

static void enter_state ( EpbState  new_state)
static

Definiert in Zeile 25 der Datei apply_controller.c.

Benutzt s_ctx, ApplyCtx::state und ApplyCtx::step_in_state.

Wird benutzt von apply_ctrl_step_50ms().

◆ min_force()

static uint16_t min_force ( const ApplyInputs in)
static

Definiert in Zeile 49 der Datei apply_controller.c.

Benutzt ApplyInputs::left_force_n und ApplyInputs::right_force_n.

Wird benutzt von apply_ctrl_step_50ms().

◆ release_preconditions_ok()

static bool release_preconditions_ok ( const ApplyInputs in)
static

◆ release_request_present()

static bool release_request_present ( const ApplyInputs in)
static

Definiert in Zeile 44 der Datei apply_controller.c.

Benutzt ApplyInputs::sw_state und SWITCH_RELEASE.

Wird benutzt von apply_ctrl_step_50ms().

Variablen-Dokumentation

◆ s_ctx