static void sf_c1_EVdemo_6(SFc1_EVdemo_6InstanceStruct *chartInstance)
{
  boolean_T c1_temp;
  boolean_T c1_b_temp;
  boolean_T c1_out;
  boolean_T c1_b_out;
  boolean_T c1_c_temp;
  boolean_T c1_d_temp;
  boolean_T c1_c_out;
  boolean_T c1_d_out;
  real32_T *c1_spd_err;
  real32_T *c1_spd_ref_rate;
  uint8_T *c1_Mode;
  real32_T *c1_veh_spd;
  boolean_T *c1_BrakeSet;
  c1_spd_ref_rate = (real32_T *)ssGetInputPortSignal(chartInstance->S, 2);
  c1_BrakeSet = (boolean_T *)ssGetOutputPortSignal(chartInstance->S, 2);
  c1_veh_spd = (real32_T *)ssGetInputPortSignal(chartInstance->S, 1);
  c1_spd_err = (real32_T *)ssGetInputPortSignal(chartInstance->S, 0);
  c1_Mode = (uint8_T *)ssGetOutputPortSignal(chartInstance->S, 1);
  c1_set_sim_state_side_effects_c1_EVdemo_6(chartInstance);
  _SFD_SYMBOL_SCOPE_PUSH(0U, 0U);
  _sfTime_ = (real_T)ssGetT(chartInstance->S);
  _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
  chartInstance->c1_sfEvent = CALL_EVENT;
  if (chartInstance->c1_temporalCounter_i1 < 127U) {
    chartInstance->c1_temporalCounter_i1 = (uint8_T)(int16_T)
      (chartInstance->c1_temporalCounter_i1 + 1);
  }

  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
  if (chartInstance->c1_is_active_c1_EVdemo_6 == 0U) {
    _SFD_CC_CALL(CHART_ENTER_ENTRY_FUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
    chartInstance->c1_is_active_c1_EVdemo_6 = 1U;
    _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
    _SFD_CT_CALL(TRANSITION_ACTIVE_TAG, 0U, chartInstance->c1_sfEvent);
    chartInstance->c1_is_c1_EVdemo_6 = c1_IN_Stop;
    _SFD_CS_CALL(STATE_ACTIVE_TAG, 2U, chartInstance->c1_sfEvent);
    chartInstance->c1_tp_Stop = 1U;
  } else {
    switch (chartInstance->c1_is_c1_EVdemo_6) {
     case c1_IN_Accel:
      CV_CHART_EVAL(0, 0, 1);
      _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG, 4U,
                   chartInstance->c1_sfEvent);
      c1_temp = (_SFD_CCP_CALL(4U, 0, *c1_spd_err < -0.25F != 0U,
                  chartInstance->c1_sfEvent) != 0);
      if (c1_temp) {
        c1_temp = (_SFD_CCP_CALL(4U, 1, *c1_spd_ref_rate < 0.0F != 0U,
                    chartInstance->c1_sfEvent) != 0);
      }

      c1_b_temp = c1_temp;
      if (c1_b_temp) {
        c1_b_temp = (_SFD_CCP_CALL(4U, 2, (int16_T)
          chartInstance->c1_temporalCounter_i1 >= 120 != 0U,
          chartInstance->c1_sfEvent) != 0);
      }

      c1_out = (CV_TRANSITION_EVAL(4U, (int32_T)c1_b_temp) != 0);
      if (c1_out) {
        _SFD_CT_CALL(TRANSITION_ACTIVE_TAG, 4U, chartInstance->c1_sfEvent);
        chartInstance->c1_tp_Accel = 0U;
        _SFD_CS_CALL(STATE_INACTIVE_TAG, 0U, chartInstance->c1_sfEvent);
        chartInstance->c1_is_c1_EVdemo_6 = c1_IN_Decel;
        _SFD_CS_CALL(STATE_ACTIVE_TAG, 1U, chartInstance->c1_sfEvent);
        chartInstance->c1_temporalCounter_i1 = 0U;
        chartInstance->c1_tp_Decel = 1U;
      } else {
        _SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG, 0U,
                     chartInstance->c1_sfEvent);
        *c1_Mode = 1U;
      }

      _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
      break;

     case c1_IN_Decel:
      CV_CHART_EVAL(0, 0, 2);
      _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG, 2U,
                   chartInstance->c1_sfEvent);
      c1_b_out = (CV_TRANSITION_EVAL(2U, (int32_T)_SFD_CCP_CALL(2U, 0, (real_T)
        *c1_veh_spd < 0.05 != 0U, chartInstance->c1_sfEvent)) != 0);
      if (c1_b_out) {
        _SFD_CT_CALL(TRANSITION_ACTIVE_TAG, 2U, chartInstance->c1_sfEvent);
        chartInstance->c1_tp_Decel = 0U;
        _SFD_CS_CALL(STATE_INACTIVE_TAG, 1U, chartInstance->c1_sfEvent);
        chartInstance->c1_is_c1_EVdemo_6 = c1_IN_Stop;
        _SFD_CS_CALL(STATE_ACTIVE_TAG, 2U, chartInstance->c1_sfEvent);
        chartInstance->c1_tp_Stop = 1U;
      } else {
        _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG, 3U,
                     chartInstance->c1_sfEvent);
        c1_c_temp = (_SFD_CCP_CALL(3U, 0, *c1_spd_err > 0.25F != 0U,
          chartInstance->c1_sfEvent) != 0);
        if (c1_c_temp) {
          c1_c_temp = (_SFD_CCP_CALL(3U, 1, *c1_spd_ref_rate > 0.0F != 0U,
            chartInstance->c1_sfEvent) != 0);
        }

        c1_d_temp = c1_c_temp;
        if (c1_d_temp) {
          c1_d_temp = (_SFD_CCP_CALL(3U, 2, (int16_T)
            chartInstance->c1_temporalCounter_i1 >= 120 != 0U,
            chartInstance->c1_sfEvent) != 0);
        }

        c1_c_out = (CV_TRANSITION_EVAL(3U, (int32_T)c1_d_temp) != 0);
        if (c1_c_out) {
          _SFD_CT_CALL(TRANSITION_ACTIVE_TAG, 3U, chartInstance->c1_sfEvent);
          chartInstance->c1_tp_Decel = 0U;
          _SFD_CS_CALL(STATE_INACTIVE_TAG, 1U, chartInstance->c1_sfEvent);
          chartInstance->c1_is_c1_EVdemo_6 = c1_IN_Accel;
          _SFD_CS_CALL(STATE_ACTIVE_TAG, 0U, chartInstance->c1_sfEvent);
          chartInstance->c1_temporalCounter_i1 = 0U;
          chartInstance->c1_tp_Accel = 1U;
        } else {
          _SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG, 1U,
                       chartInstance->c1_sfEvent);
          *c1_Mode = 2U;
        }
      }

      _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG, 1U, chartInstance->c1_sfEvent);
      break;

     case c1_IN_Stop:
      CV_CHART_EVAL(0, 0, 3);
      _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG, 1U,
                   chartInstance->c1_sfEvent);
      c1_d_out = (CV_TRANSITION_EVAL(1U, (int32_T)_SFD_CCP_CALL(1U, 0,
        *c1_spd_err > 0.0F != 0U, chartInstance->c1_sfEvent)) != 0);
      if (c1_d_out) {
        _SFD_CT_CALL(TRANSITION_ACTIVE_TAG, 1U, chartInstance->c1_sfEvent);
        *c1_BrakeSet = FALSE;
        chartInstance->c1_tp_Stop = 0U;
        _SFD_CS_CALL(STATE_INACTIVE_TAG, 2U, chartInstance->c1_sfEvent);
        chartInstance->c1_is_c1_EVdemo_6 = c1_IN_Accel;
        _SFD_CS_CALL(STATE_ACTIVE_TAG, 0U, chartInstance->c1_sfEvent);
        chartInstance->c1_temporalCounter_i1 = 0U;
        chartInstance->c1_tp_Accel = 1U;
      } else {
        _SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG, 2U,
                     chartInstance->c1_sfEvent);
        *c1_Mode = 0U;
        *c1_BrakeSet = TRUE;
      }

      _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG, 2U, chartInstance->c1_sfEvent);
      break;

     default:
      CV_CHART_EVAL(0, 0, 0);
      chartInstance->c1_is_c1_EVdemo_6 = c1_IN_NO_ACTIVE_CHILD;
      _SFD_CS_CALL(STATE_INACTIVE_TAG, 0U, chartInstance->c1_sfEvent);
      break;
    }
  }

  _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
  _SFD_SYMBOL_SCOPE_POP();
  _SFD_CHECK_FOR_STATE_INCONSISTENCY(_EVdemo_6MachineNumber_,
    chartInstance->chartNumber, chartInstance->instanceNumber);
}
static void sf_c7_Pedal_Interpretation_exe(void)
{
  uint8_T c7_previousEvent;
  real_T *c7_TDPre;
  real_T *c7_Activate;
  c7_TDPre = (real_T *)ssGetOutputPortSignal(chartInstance.S, 1);
  c7_Activate = (real_T *)ssGetInputPortSignal(chartInstance.S, 0);
  _sfTime_ = (real_T)ssGetT(chartInstance.S);
  _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG,3);
  _SFD_DATA_RANGE_CHECK(*c7_Activate, 0U);
  _SFD_DATA_RANGE_CHECK(*c7_TDPre, 1U);
  c7_previousEvent = _sfEvent_;
  _sfEvent_ = CALL_EVENT;
  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG,3);
  if (chartInstance.c7_temporalCounter_i1 < 1023) {
    chartInstance.c7_temporalCounter_i1 = (uint16_T)
      (chartInstance.c7_temporalCounter_i1 + 1);
  }

  if (chartInstance.c7_is_active_c7_Pedal_Interpretation_exe == 0) {
    _SFD_CC_CALL(CHART_ENTER_ENTRY_FUNCTION_TAG,3);
    chartInstance.c7_is_active_c7_Pedal_Interpretation_exe = 1U;
    _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG,3);
    _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,0);
    _SFD_CT_CALL(TRANSITION_ACTIVE_TAG,0);
    chartInstance.c7_is_c7_Pedal_Interpretation_exe = (uint8_T)c7_IN_wait;
    _SFD_CS_CALL(STATE_ACTIVE_TAG,5);
    chartInstance.c7_temporalCounter_i1 = 0U;
    chartInstance.c7_tp_wait = 1U;
    *c7_TDPre = 2.0;
    _SFD_DATA_RANGE_CHECK(*c7_TDPre, 1U);
  } else {
    switch (chartInstance.c7_is_c7_Pedal_Interpretation_exe) {
     case c7_IN_Precondition1:
      CV_CHART_EVAL(3,0,1);
      _SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,0);
      switch (chartInstance.c7_is_Precondition1) {
       case c7_IN_Init1:
        CV_STATE_EVAL(0,0,1);
        _SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,1);
        _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,2);
        if (CV_TRANSITION_EVAL(2U, (_SFD_CCP_CALL(2,0,((1)!=0)) != 0) &&
                               (_SFD_CCP_CALL(2,1,
               ((chartInstance.c7_temporalCounter_i1 >= 50)!=0))
              != 0)) != 0) {
          _SFD_CT_CALL(TRANSITION_ACTIVE_TAG,2);
          _SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,1);
          chartInstance.c7_tp_Init1 = 0U;
          _SFD_CS_CALL(STATE_INACTIVE_TAG,1);
          _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,1);
          chartInstance.c7_is_Precondition1 = (uint8_T)c7_IN_TDataPre1;
          _SFD_CS_CALL(STATE_ACTIVE_TAG,3);
          chartInstance.c7_temporalCounter_i1 = 0U;
          chartInstance.c7_tp_TDataPre1 = 1U;
          *c7_TDPre = 1.0;
          _SFD_DATA_RANGE_CHECK(*c7_TDPre, 1U);
        }

        _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,1);
        break;

       case c7_IN_Stabilise1:
        CV_STATE_EVAL(0,0,2);
        _SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,2);
        _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,3);
        if (CV_TRANSITION_EVAL(3U, (_SFD_CCP_CALL(3,0,((1)!=0)) != 0) &&
                               (_SFD_CCP_CALL(3,1,
               ((chartInstance.c7_temporalCounter_i1 >= 50)!=0))
              != 0)) != 0) {
          _SFD_CT_CALL(TRANSITION_ACTIVE_TAG,3);
          _SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,2);
          chartInstance.c7_tp_Stabilise1 = 0U;
          chartInstance.c7_is_Precondition1 = (uint8_T)c7_IN_NO_ACTIVE_CHILD;
          _SFD_CS_CALL(STATE_INACTIVE_TAG,2);
          _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,2);
          _SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,0);
          chartInstance.c7_tp_Precondition1 = 0U;
          _SFD_CS_CALL(STATE_INACTIVE_TAG,0);
          _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,0);
          chartInstance.c7_is_c7_Pedal_Interpretation_exe = (uint8_T)c7_IN_stop;
          _SFD_CS_CALL(STATE_ACTIVE_TAG,4);
          chartInstance.c7_tp_stop = 1U;
        }

        _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,2);
        break;

       case c7_IN_TDataPre1:
        CV_STATE_EVAL(0,0,3);
        _SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,3);
        _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,4);
        if (CV_TRANSITION_EVAL(4U, (_SFD_CCP_CALL(4,0,((1)!=0)) != 0) &&
                               (_SFD_CCP_CALL(4,1,
               ((chartInstance.c7_temporalCounter_i1 >= 100)!=0))
              != 0)) != 0) {
          _SFD_CT_CALL(TRANSITION_ACTIVE_TAG,4);
          _SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,3);
          chartInstance.c7_tp_TDataPre1 = 0U;
          _SFD_CS_CALL(STATE_INACTIVE_TAG,3);
          _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,3);
          chartInstance.c7_is_Precondition1 = (uint8_T)c7_IN_Stabilise1;
          _SFD_CS_CALL(STATE_ACTIVE_TAG,2);
          chartInstance.c7_temporalCounter_i1 = 0U;
          chartInstance.c7_tp_Stabilise1 = 1U;
          *c7_TDPre = 1.0;
          _SFD_DATA_RANGE_CHECK(*c7_TDPre, 1U);
        }

        _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,3);
        break;

       default:
        CV_STATE_EVAL(0,0,0);
        chartInstance.c7_is_Precondition1 = (uint8_T)c7_IN_NO_ACTIVE_CHILD;
        _SFD_CS_CALL(STATE_INACTIVE_TAG,1);
        break;
      }

      _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,0);
      break;

     case c7_IN_stop:
      CV_CHART_EVAL(3,0,2);
      _SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,4);
      _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,5);
      _SFD_CT_CALL(TRANSITION_ACTIVE_TAG,5);
      _SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,4);
      chartInstance.c7_tp_stop = 0U;
      _SFD_CS_CALL(STATE_INACTIVE_TAG,4);
      _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,4);
      chartInstance.c7_is_c7_Pedal_Interpretation_exe = (uint8_T)
        c7_IN_Precondition1;
      _SFD_CS_CALL(STATE_ACTIVE_TAG,0);
      chartInstance.c7_tp_Precondition1 = 1U;
      _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,1);
      _SFD_CT_CALL(TRANSITION_ACTIVE_TAG,1);
      chartInstance.c7_is_Precondition1 = (uint8_T)c7_IN_Init1;
      _SFD_CS_CALL(STATE_ACTIVE_TAG,1);
      chartInstance.c7_temporalCounter_i1 = 0U;
      chartInstance.c7_tp_Init1 = 1U;
      *c7_TDPre = 1.0;
      _SFD_DATA_RANGE_CHECK(*c7_TDPre, 1U);
      _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,4);
      break;

     case c7_IN_wait:
      CV_CHART_EVAL(3,0,3);
      _SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,5);
      _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,6);
      if (CV_TRANSITION_EVAL(6U, (_SFD_CCP_CALL(6,0,((1)!=0)) != 0) &&
                             (_SFD_CCP_CALL(6,1,
             ((chartInstance.c7_temporalCounter_i1 >= 800)!=0))
            != 0)) != 0) {
        _SFD_CT_CALL(TRANSITION_ACTIVE_TAG,6);
        _SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,5);
        chartInstance.c7_tp_wait = 0U;
        chartInstance.c7_is_c7_Pedal_Interpretation_exe = (uint8_T)
          c7_IN_NO_ACTIVE_CHILD;
        _SFD_CS_CALL(STATE_INACTIVE_TAG,5);
        _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,5);
        chartInstance.c7_is_c7_Pedal_Interpretation_exe = (uint8_T)
          c7_IN_Precondition1;
        _SFD_CS_CALL(STATE_ACTIVE_TAG,0);
        chartInstance.c7_tp_Precondition1 = 1U;
        _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,1);
        _SFD_CT_CALL(TRANSITION_ACTIVE_TAG,1);
        chartInstance.c7_is_Precondition1 = (uint8_T)c7_IN_Init1;
        _SFD_CS_CALL(STATE_ACTIVE_TAG,1);
        chartInstance.c7_temporalCounter_i1 = 0U;
        chartInstance.c7_tp_Init1 = 1U;
        *c7_TDPre = 1.0;
        _SFD_DATA_RANGE_CHECK(*c7_TDPre, 1U);
      }

      _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,5);
      break;

     default:
      CV_CHART_EVAL(3,0,0);
      chartInstance.c7_is_c7_Pedal_Interpretation_exe = (uint8_T)
        c7_IN_NO_ACTIVE_CHILD;
      _SFD_CS_CALL(STATE_INACTIVE_TAG,0);
      break;
    }
  }

  _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG,3);
  _sfEvent_ = c7_previousEvent;
  sf_debug_check_for_state_inconsistency(_Pedal_Interpretation_exeMachineNumber_,
    chartInstance.chartNumber, chartInstance.
    instanceNumber);
}
static void sf_c2_Pedal_Interpretation_exe(void)
{
  uint8_T c2_previousEvent;
  real_T *c2_TestCase;
  real_T *c2_variant;
  c2_TestCase = (real_T *)ssGetOutputPortSignal(chartInstance.S, 1);
  c2_variant = (real_T *)ssGetOutputPortSignal(chartInstance.S, 2);
  _sfTime_ = (real_T)ssGetT(chartInstance.S);
  _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG,0);
  _SFD_DATA_RANGE_CHECK(*c2_TestCase, 0U);
  _SFD_DATA_RANGE_CHECK(*c2_variant, 1U);
  c2_previousEvent = _sfEvent_;
  _sfEvent_ = CALL_EVENT;
  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG,0);
  if (chartInstance.c2_temporalCounter_i1 < 2047) {
    chartInstance.c2_temporalCounter_i1 = (uint16_T)
      (chartInstance.c2_temporalCounter_i1 + 1);
  }

  if (chartInstance.c2_is_active_c2_Pedal_Interpretation_exe == 0) {
    _SFD_CC_CALL(CHART_ENTER_ENTRY_FUNCTION_TAG,0);
    chartInstance.c2_is_active_c2_Pedal_Interpretation_exe = 1U;
    _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG,0);
    _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,0);
    _SFD_CT_CALL(TRANSITION_ACTIVE_TAG,0);
    *c2_variant = 1.0;
    _SFD_DATA_RANGE_CHECK(*c2_variant, 1U);
    chartInstance.c2_is_c2_Pedal_Interpretation_exe = (uint8_T)c2_IN_TestCase1;
    _SFD_CS_CALL(STATE_ACTIVE_TAG,0);
    chartInstance.c2_temporalCounter_i1 = 0U;
    chartInstance.c2_tp_TestCase1 = 1U;
    *c2_TestCase = 1.0;
    _SFD_DATA_RANGE_CHECK(*c2_TestCase, 0U);
  } else {
    switch (chartInstance.c2_is_c2_Pedal_Interpretation_exe) {
     case c2_IN_TestCase1:
      CV_CHART_EVAL(0,0,1);
      _SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,0);
      _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,1);
      if (CV_TRANSITION_EVAL(1U, (_SFD_CCP_CALL(1,0,((1)!=0)) != 0) &&
                             (_SFD_CCP_CALL(1,1,
             ((chartInstance.c2_temporalCounter_i1 >= 400)!=0))
            != 0)) != 0) {
        _SFD_CT_CALL(TRANSITION_ACTIVE_TAG,1);
        _SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,0);
        chartInstance.c2_tp_TestCase1 = 0U;
        _SFD_CS_CALL(STATE_INACTIVE_TAG,0);
        _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,0);
        chartInstance.c2_is_c2_Pedal_Interpretation_exe = (uint8_T)
          c2_IN_TestCase2;
        _SFD_CS_CALL(STATE_ACTIVE_TAG,1);
        chartInstance.c2_temporalCounter_i1 = 0U;
        chartInstance.c2_tp_TestCase2 = 1U;
        *c2_TestCase = 2.0;
        _SFD_DATA_RANGE_CHECK(*c2_TestCase, 0U);
      }

      _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,0);
      break;

     case c2_IN_TestCase2:
      CV_CHART_EVAL(0,0,2);
      _SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,1);
      _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,2);
      if (CV_TRANSITION_EVAL(2U, (_SFD_CCP_CALL(2,0,((1)!=0)) != 0) &&
                             (_SFD_CCP_CALL(2,1,
             ((chartInstance.c2_temporalCounter_i1 >= 400)!=0))
            != 0)) != 0) {
        _SFD_CT_CALL(TRANSITION_ACTIVE_TAG,2);
        _SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,1);
        chartInstance.c2_tp_TestCase2 = 0U;
        _SFD_CS_CALL(STATE_INACTIVE_TAG,1);
        _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,1);
        chartInstance.c2_is_c2_Pedal_Interpretation_exe = (uint8_T)
          c2_IN_TestCase3;
        _SFD_CS_CALL(STATE_ACTIVE_TAG,2);
        chartInstance.c2_temporalCounter_i1 = 0U;
        chartInstance.c2_tp_TestCase3 = 1U;
        *c2_TestCase = 3.0;
        _SFD_DATA_RANGE_CHECK(*c2_TestCase, 0U);
      }

      _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,1);
      break;

     case c2_IN_TestCase3:
      CV_CHART_EVAL(0,0,3);
      _SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,2);
      _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,3);
      if (CV_TRANSITION_EVAL(3U, (_SFD_CCP_CALL(3,0,((1)!=0)) != 0) &&
                             (_SFD_CCP_CALL(3,1,
             ((chartInstance.c2_temporalCounter_i1 >= 200)!=0))
            != 0)) != 0) {
        _SFD_CT_CALL(TRANSITION_ACTIVE_TAG,3);
        _SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,2);
        chartInstance.c2_tp_TestCase3 = 0U;
        _SFD_CS_CALL(STATE_INACTIVE_TAG,2);
        _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,2);
        chartInstance.c2_is_c2_Pedal_Interpretation_exe = (uint8_T)
          c2_IN_TestCase4;
        _SFD_CS_CALL(STATE_ACTIVE_TAG,3);
        chartInstance.c2_temporalCounter_i1 = 0U;
        chartInstance.c2_tp_TestCase4 = 1U;
        *c2_TestCase = 4.0;
        _SFD_DATA_RANGE_CHECK(*c2_TestCase, 0U);
      }

      _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,2);
      break;

     case c2_IN_TestCase4:
      CV_CHART_EVAL(0,0,4);
      _SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,3);
      _SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,4);
      if (CV_TRANSITION_EVAL(4U, (_SFD_CCP_CALL(4,0,((1)!=0)) != 0) &&
                             (_SFD_CCP_CALL(4,1,
             ((chartInstance.c2_temporalCounter_i1 >= 1200)!=0))
            != 0)) != 0) {
        _SFD_CT_CALL(TRANSITION_ACTIVE_TAG,4);
        *c2_variant = *c2_variant + 1.0;
        _SFD_DATA_RANGE_CHECK(*c2_variant, 1U);
        _SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,3);
        chartInstance.c2_tp_TestCase4 = 0U;
        _SFD_CS_CALL(STATE_INACTIVE_TAG,3);
        _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,3);
        chartInstance.c2_is_c2_Pedal_Interpretation_exe = (uint8_T)
          c2_IN_TestCase1;
        _SFD_CS_CALL(STATE_ACTIVE_TAG,0);
        chartInstance.c2_temporalCounter_i1 = 0U;
        chartInstance.c2_tp_TestCase1 = 1U;
        *c2_TestCase = 1.0;
        _SFD_DATA_RANGE_CHECK(*c2_TestCase, 0U);
      }

      _SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,3);
      break;

     default:
      CV_CHART_EVAL(0,0,0);
      chartInstance.c2_is_c2_Pedal_Interpretation_exe = (uint8_T)
        c2_IN_NO_ACTIVE_CHILD;
      _SFD_CS_CALL(STATE_INACTIVE_TAG,0);
      break;
    }
  }

  _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG,0);
  _sfEvent_ = c2_previousEvent;
  sf_debug_check_for_state_inconsistency(_Pedal_Interpretation_exeMachineNumber_,
    chartInstance.chartNumber, chartInstance.
    instanceNumber);
}