Traceability Report for HighBeamAssist

Table of Contents

  1. Eliminated / Virtual Blocks
  2. Traceable Simulink Blocks / Stateflow Objects / MATLAB Functions

Eliminated / Virtual Blocks

Block NameComment
<S1>/ModeIn

Inport

<S1>/RPort_Distance_val

Inport

<S1>/RPort_VehicleSpeed_val

Inport

<S1>/RPort_LightIntensity_val

Inport

<S1>/function

TriggerPort

<S1>/PPort_Lamps_val

Outport

<S2>/RPort_Mode_val

Inport

<S2>/RPort_KeySW_state

Inport

<S2>/function

TriggerPort

<S2>/ModeOut

Outport

<S3>:1

EMChart eliminated by optimization

Traceable Simulink Blocks / Stateflow Objects / MATLAB Functions

Subsystem: HighBeamAssist/Headlamp Logic

Object NameCode Location
<S1>/MATLAB FunctionHighBeamAssist.c:59, 65, 66, 67, 68, 71, 72, 73, 76, 77, 78, 79, 80, 81, 83, 84, 87, 88, 93, 94, 98

MATLAB Function: HighBeamAssist/Headlamp Logic/MATLAB Function

ScriptCode Location
1
function Lamps = fcn(ModeIn, Distance ...
3
if ModeIn == HeadlampModes.Highbeam
4
    Lamps = [false, true];
5
elseif ModeIn == HeadlampModes.Lowbeam
6
    Lamps = [true, false];
7
elseif ModeIn == HeadlampModes.Auto
8
    if (VehicleSpeed > 40)
9
        if (Distance > 10) && (Intens ...
10
            Lamps = [false, true];
11
        else
12
            Lamps = [true, false];
13
        end
14
    else
15
        Lamps = [true, false];
16
    end
17
else
18
    Lamps = [false, false];
19
end
20