当前位置: 首页>>代码示例>>C++>>正文


C++ CV_EML_IF函数代码示例

本文整理汇总了C++中CV_EML_IF函数的典型用法代码示例。如果您正苦于以下问题:C++ CV_EML_IF函数的具体用法?C++ CV_EML_IF怎么用?C++ CV_EML_IF使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了CV_EML_IF函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: sf_c1_main

static void sf_c1_main(SFc1_mainInstanceStruct *chartInstance)
{
  real_T c1_hoistedGlobal;
  real_T c1_time;
  uint32_T c1_debug_family_var_map[4];
  real_T c1_nargin = 1.0;
  real_T c1_nargout = 1.0;
  real_T c1_y;
  real_T *c1_b_time;
  real_T *c1_b_y;
  c1_b_y = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
  c1_b_time = (real_T *)ssGetInputPortSignal(chartInstance->S, 0);
  _SFD_SYMBOL_SCOPE_PUSH(0U, 0U);
  _sfTime_ = (real_T)ssGetT(chartInstance->S);
  _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
  _SFD_DATA_RANGE_CHECK(*c1_b_time, 0U);
  _SFD_DATA_RANGE_CHECK(*c1_b_y, 1U);
  chartInstance->c1_sfEvent = CALL_EVENT;
  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
  c1_hoistedGlobal = *c1_b_time;
  c1_time = c1_hoistedGlobal;
  _SFD_SYMBOL_SCOPE_PUSH_EML(0U, 4U, 4U, c1_debug_family_names,
    c1_debug_family_var_map);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c1_nargin, 0U, c1_sf_marshallOut,
    c1_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c1_nargout, 1U, c1_sf_marshallOut,
    c1_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML(&c1_time, 2U, c1_sf_marshallOut);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c1_y, 3U, c1_sf_marshallOut,
    c1_sf_marshallIn);
  CV_EML_FCN(0, 0);
  _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 2);
  if (CV_EML_IF(0, 1, 0, c1_time < 200.0)) {
    _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 3);
    c1_y = 1000.0;
  } else {
    _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 4);
    if (CV_EML_IF(0, 1, 1, c1_time < 30.0)) {
      _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 5);
      c1_y = 20.0;
    } else {
      _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 6);
      if (CV_EML_IF(0, 1, 2, c1_time < 40.0)) {
        _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 7);
        c1_y = 100.0;
      } else {
        _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 9);
        c1_y = 1000.0;
      }
    }
  }

  _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, -9);
  _SFD_SYMBOL_SCOPE_POP();
  *c1_b_y = c1_y;
  _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
  _SFD_SYMBOL_SCOPE_POP();
  _SFD_CHECK_FOR_STATE_INCONSISTENCY(_mainMachineNumber_,
    chartInstance->chartNumber, chartInstance->instanceNumber);
}
开发者ID:JohnPicchi,项目名称:Dependable_Systems_Project,代码行数:60,代码来源:c1_main.c

示例2: _SFD_SYMBOL_SCOPE_PUSH

static void sf_gateway_c2_DYNctl_ver4_etud_nonlineaire
  (SFc2_DYNctl_ver4_etud_nonlineaireInstanceStruct *chartInstance)
{
  real_T c2_hoistedGlobal;
  real_T c2_b_angle;
  uint32_T c2_debug_family_var_map[4];
  real_T c2_nargin = 1.0;
  real_T c2_nargout = 1.0;
  real_T c2_b_f;
  boolean_T guard1 = false;
  _SFD_SYMBOL_SCOPE_PUSH(0U, 0U);
  _sfTime_ = sf_get_time(chartInstance->S);
  _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 1U, chartInstance->c2_sfEvent);
  _SFD_DATA_RANGE_CHECK(*chartInstance->c2_angle, 0U);
  chartInstance->c2_sfEvent = CALL_EVENT;
  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 1U, chartInstance->c2_sfEvent);
  c2_hoistedGlobal = *chartInstance->c2_angle;
  c2_b_angle = c2_hoistedGlobal;
  _SFD_SYMBOL_SCOPE_PUSH_EML(0U, 4U, 4U, c2_debug_family_names,
    c2_debug_family_var_map);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c2_nargin, 0U, c2_sf_marshallOut,
    c2_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c2_nargout, 1U, c2_sf_marshallOut,
    c2_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML(&c2_b_angle, 2U, c2_sf_marshallOut);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c2_b_f, 3U, c2_sf_marshallOut,
    c2_sf_marshallIn);
  CV_EML_FCN(0, 0);
  _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, 4);
  guard1 = false;
  if (CV_EML_COND(0, 1, 0, CV_RELATIONAL_EVAL(4U, 0U, 0, c2_b_angle,
        0.087266462599716474, -1, 5U, c2_b_angle >= 0.087266462599716474))) {
    guard1 = true;
  } else if (CV_EML_COND(0, 1, 1, CV_RELATIONAL_EVAL(4U, 0U, 1, c2_b_angle,
               -0.087266462599716474, -1, 3U, c2_b_angle <=
               -0.087266462599716474))) {
    guard1 = true;
  } else {
    CV_EML_MCDC(0, 1, 0, false);
    CV_EML_IF(0, 1, 0, false);
    _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, 7);
    c2_b_f = 0.0;
  }

  if (guard1 == true) {
    CV_EML_MCDC(0, 1, 0, true);
    CV_EML_IF(0, 1, 0, true);
    _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, 5);
    c2_b_f = 1.0;
  }

  _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, -7);
  _SFD_SYMBOL_SCOPE_POP();
  *chartInstance->c2_f = c2_b_f;
  _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 1U, chartInstance->c2_sfEvent);
  _SFD_SYMBOL_SCOPE_POP();
  _SFD_CHECK_FOR_STATE_INCONSISTENCY(_DYNctl_ver4_etud_nonlineaireMachineNumber_,
    chartInstance->chartNumber, chartInstance->instanceNumber);
  _SFD_DATA_RANGE_CHECK(*chartInstance->c2_f, 1U);
}
开发者ID:bmaxb,项目名称:projet_s4,代码行数:60,代码来源:c2_DYNctl_ver4_etud_nonlineaire.c

示例3: _SFD_SYMBOL_SCOPE_PUSH

static void sf_gateway_c13_ARP_02_RPSs_Bdr_GK_BIS5
  (SFc13_ARP_02_RPSs_Bdr_GK_BIS5InstanceStruct *chartInstance)
{
  real_T c13_hoistedGlobal;
  real_T c13_win;
  uint32_T c13_debug_family_var_map[4];
  real_T c13_nargin = 1.0;
  real_T c13_nargout = 1.0;
  real_T c13_sat;
  real_T *c13_b_win;
  real_T *c13_b_sat;
  c13_b_sat = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
  c13_b_win = (real_T *)ssGetInputPortSignal(chartInstance->S, 0);
  _SFD_SYMBOL_SCOPE_PUSH(0U, 0U);
  _sfTime_ = sf_get_time(chartInstance->S);
  _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 9U, chartInstance->c13_sfEvent);
  _SFD_DATA_RANGE_CHECK(*c13_b_win, 0U);
  chartInstance->c13_sfEvent = CALL_EVENT;
  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 9U, chartInstance->c13_sfEvent);
  c13_hoistedGlobal = *c13_b_win;
  c13_win = c13_hoistedGlobal;
  _SFD_SYMBOL_SCOPE_PUSH_EML(0U, 4U, 4U, c13_debug_family_names,
    c13_debug_family_var_map);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c13_nargin, 0U, c13_sf_marshallOut,
    c13_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c13_nargout, 1U, c13_sf_marshallOut,
    c13_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML(&c13_win, 2U, c13_sf_marshallOut);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c13_sat, 3U, c13_sf_marshallOut,
    c13_sf_marshallIn);
  CV_EML_FCN(0, 0);
  _SFD_EML_CALL(0U, chartInstance->c13_sfEvent, 8);
  if (CV_EML_IF(0, 1, 0, c13_win == 2.0)) {
    _SFD_EML_CALL(0U, chartInstance->c13_sfEvent, 9);
    c13_sat = 1.0;
  } else {
    _SFD_EML_CALL(0U, chartInstance->c13_sfEvent, 10);
    if (CV_EML_IF(0, 1, 1, c13_win == 1.0)) {
      _SFD_EML_CALL(0U, chartInstance->c13_sfEvent, 11);
      c13_sat = -1.0;
    } else {
      _SFD_EML_CALL(0U, chartInstance->c13_sfEvent, 13);
      c13_sat = 0.0;
    }
  }

  _SFD_EML_CALL(0U, chartInstance->c13_sfEvent, -13);
  _SFD_SYMBOL_SCOPE_POP();
  *c13_b_sat = c13_sat;
  _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 9U, chartInstance->c13_sfEvent);
  _SFD_SYMBOL_SCOPE_POP();
  _SFD_CHECK_FOR_STATE_INCONSISTENCY(_ARP_02_RPSs_Bdr_GK_BIS5MachineNumber_,
    chartInstance->chartNumber, chartInstance->instanceNumber);
  _SFD_DATA_RANGE_CHECK(*c13_b_sat, 1U);
}
开发者ID:maryamsab,项目名称:realact,代码行数:55,代码来源:c13_ARP_02_RPSs_Bdr_GK_BIS5.c

示例4: sf_gateway_c3_NMPC_Controller

static void sf_gateway_c3_NMPC_Controller(SFc3_NMPC_ControllerInstanceStruct
  *chartInstance)
{
  real_T c3_hoistedGlobal;
  real_T c3_b_u;
  uint32_T c3_debug_family_var_map[4];
  real_T c3_nargin = 1.0;
  real_T c3_nargout = 1.0;
  real_T c3_b_etaLat;
  _SFD_SYMBOL_SCOPE_PUSH(0U, 0U);
  _sfTime_ = sf_get_time(chartInstance->S);
  _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 2U, chartInstance->c3_sfEvent);
  _SFD_DATA_RANGE_CHECK(*chartInstance->c3_u, 0U);
  chartInstance->c3_sfEvent = CALL_EVENT;
  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 2U, chartInstance->c3_sfEvent);
  c3_hoistedGlobal = *chartInstance->c3_u;
  c3_b_u = c3_hoistedGlobal;
  _SFD_SYMBOL_SCOPE_PUSH_EML(0U, 4U, 4U, c3_debug_family_names,
    c3_debug_family_var_map);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c3_nargin, 0U, c3_sf_marshallOut,
    c3_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c3_nargout, 1U, c3_sf_marshallOut,
    c3_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML(&c3_b_u, 2U, c3_sf_marshallOut);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c3_b_etaLat, 3U, c3_sf_marshallOut,
    c3_sf_marshallIn);
  CV_EML_FCN(0, 0);
  _SFD_EML_CALL(0U, chartInstance->c3_sfEvent, 3);
  c3_b_etaLat = c3_b_u;
  _SFD_EML_CALL(0U, chartInstance->c3_sfEvent, 5);
  if (CV_EML_IF(0, 1, 0, CV_RELATIONAL_EVAL(4U, 0U, 0, c3_b_u,
        3.1415926535897931, -1, 4U, c3_b_u > 3.1415926535897931))) {
    _SFD_EML_CALL(0U, chartInstance->c3_sfEvent, 6);
    c3_b_etaLat = c3_b_u - 6.2831853071795862;
  }

  _SFD_EML_CALL(0U, chartInstance->c3_sfEvent, 9);
  if (CV_EML_IF(0, 1, 1, CV_RELATIONAL_EVAL(4U, 0U, 1, c3_b_u,
        -3.1415926535897931, -1, 2U, c3_b_u < -3.1415926535897931))) {
    _SFD_EML_CALL(0U, chartInstance->c3_sfEvent, 10);
    c3_b_etaLat = c3_b_u + 6.2831853071795862;
  }

  _SFD_EML_CALL(0U, chartInstance->c3_sfEvent, -10);
  _SFD_SYMBOL_SCOPE_POP();
  *chartInstance->c3_etaLat = c3_b_etaLat;
  _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 2U, chartInstance->c3_sfEvent);
  _SFD_SYMBOL_SCOPE_POP();
  _SFD_CHECK_FOR_STATE_INCONSISTENCY(_NMPC_ControllerMachineNumber_,
    chartInstance->chartNumber, chartInstance->instanceNumber);
  _SFD_DATA_RANGE_CHECK(*chartInstance->c3_etaLat, 1U);
}
开发者ID:tharunprasanth,项目名称:DG_sim,代码行数:52,代码来源:c3_NMPC_Controller.c

示例5: sf_c22_BuckBoost1

static void sf_c22_BuckBoost1(SFc22_BuckBoost1InstanceStruct *chartInstance)
{
  real_T c22_hoistedGlobal;
  real_T c22_b_hoistedGlobal;
  real_T c22_Carrier;
  real_T c22_Duty;
  uint32_T c22_debug_family_var_map[6];
  real_T c22_Err1;
  real_T c22_nargin = 2.0;
  real_T c22_nargout = 1.0;
  real_T c22_PWM;
  real_T *c22_b_PWM;
  real_T *c22_b_Carrier;
  real_T *c22_b_Duty;
  c22_b_Duty = (real_T *)ssGetInputPortSignal(chartInstance->S, 1);
  c22_b_Carrier = (real_T *)ssGetInputPortSignal(chartInstance->S, 0);
  c22_b_PWM = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
  _sfTime_ = (real_T)ssGetT(chartInstance->S);
  _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 3U, chartInstance->c22_sfEvent);
  _SFD_DATA_RANGE_CHECK(*c22_b_PWM, 0U);
  _SFD_DATA_RANGE_CHECK(*c22_b_Carrier, 1U);
  _SFD_DATA_RANGE_CHECK(*c22_b_Duty, 2U);
  chartInstance->c22_sfEvent = CALL_EVENT;
  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 3U, chartInstance->c22_sfEvent);
  c22_hoistedGlobal = *c22_b_Carrier;
  c22_b_hoistedGlobal = *c22_b_Duty;
  c22_Carrier = c22_hoistedGlobal;
  c22_Duty = c22_b_hoistedGlobal;
  sf_debug_symbol_scope_push_eml(0U, 6U, 6U, c22_debug_family_names,
    c22_debug_family_var_map);
  sf_debug_symbol_scope_add_eml_importable(&c22_Err1, 0U, c22_sf_marshallOut,
    c22_sf_marshallIn);
  sf_debug_symbol_scope_add_eml_importable(&c22_nargin, 1U, c22_sf_marshallOut,
    c22_sf_marshallIn);
  sf_debug_symbol_scope_add_eml_importable(&c22_nargout, 2U, c22_sf_marshallOut,
    c22_sf_marshallIn);
  sf_debug_symbol_scope_add_eml(&c22_Carrier, 3U, c22_sf_marshallOut);
  sf_debug_symbol_scope_add_eml(&c22_Duty, 4U, c22_sf_marshallOut);
  sf_debug_symbol_scope_add_eml_importable(&c22_PWM, 5U, c22_sf_marshallOut,
    c22_sf_marshallIn);
  CV_EML_FCN(0, 0);
  _SFD_EML_CALL(0U, chartInstance->c22_sfEvent, 3);
  c22_Err1 = c22_Duty - c22_Carrier;
  _SFD_EML_CALL(0U, chartInstance->c22_sfEvent, 5);
  if (CV_EML_IF(0, 1, 0, c22_Err1 > 0.0)) {
    _SFD_EML_CALL(0U, chartInstance->c22_sfEvent, 6);
    c22_PWM = 1.0;
  } else {
    _SFD_EML_CALL(0U, chartInstance->c22_sfEvent, 8);
    c22_PWM = 0.0;
  }

  _SFD_EML_CALL(0U, chartInstance->c22_sfEvent, -8);
  sf_debug_symbol_scope_pop();
  *c22_b_PWM = c22_PWM;
  _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 3U, chartInstance->c22_sfEvent);
  sf_debug_check_for_state_inconsistency(_BuckBoost1MachineNumber_,
    chartInstance->chartNumber, chartInstance->instanceNumber);
}
开发者ID:harriwijaya,项目名称:sys_id_cond_mon,代码行数:59,代码来源:c22_BuckBoost1.c

示例6: sf_c2_linearproto

static void sf_c2_linearproto(SFc2_linearprotoInstanceStruct *chartInstance)
{
  real_T c2_hoistedGlobal;
  real_T c2_x;
  uint32_T c2_debug_family_var_map[4];
  real_T c2_nargin = 1.0;
  real_T c2_nargout = 1.0;
  real_T c2_y;
  real_T c2_b;
  real_T c2_b_y;
  real_T c2_u;
  const mxArray *c2_c_y = NULL;
  real_T *c2_b_x;
  real_T *c2_d_y;
  c2_d_y = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
  c2_b_x = (real_T *)ssGetInputPortSignal(chartInstance->S, 0);
  _sfTime_ = (real_T)ssGetT(chartInstance->S);
  _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 0U, chartInstance->c2_sfEvent);
  _SFD_DATA_RANGE_CHECK(*c2_b_x, 0U);
  _SFD_DATA_RANGE_CHECK(*c2_d_y, 1U);
  chartInstance->c2_sfEvent = CALL_EVENT;
  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 0U, chartInstance->c2_sfEvent);
  c2_hoistedGlobal = *c2_b_x;
  c2_x = c2_hoistedGlobal;
  _SFD_SYMBOL_SCOPE_PUSH_EML(0U, 4U, 4U, c2_debug_family_names,
    c2_debug_family_var_map);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c2_nargin, 0U, c2_sf_marshallOut,
    c2_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c2_nargout, 1U, c2_sf_marshallOut,
    c2_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML(&c2_x, 2U, c2_sf_marshallOut);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c2_y, 3U, c2_sf_marshallOut,
    c2_sf_marshallIn);
  CV_EML_FCN(0, 0);
  _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, 4);
  if (CV_EML_IF(0, 1, 0, c2_x < 0.9)) {
    _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, 6);
    c2_b = c2_x;
    c2_b_y = 13.8125 * c2_b;
    c2_y = c2_b_y - 9.93;
    sf_mex_printf("%s =\\n", "y");
    c2_u = c2_y;
    c2_c_y = NULL;
    sf_mex_assign(&c2_c_y, sf_mex_create("y", &c2_u, 0, 0U, 0U, 0U, 0), FALSE);
    sf_mex_call_debug("disp", 0U, 1U, 14, c2_c_y);
  } else {
    _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, 9);
    c2_y = 2.5;
  }

  _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, -9);
  _SFD_SYMBOL_SCOPE_POP();
  *c2_d_y = c2_y;
  _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 0U, chartInstance->c2_sfEvent);
  _SFD_CHECK_FOR_STATE_INCONSISTENCY(_linearprotoMachineNumber_,
    chartInstance->chartNumber, chartInstance->instanceNumber);
}
开发者ID:ryangrnr,项目名称:3rd-Year-Project,代码行数:57,代码来源:c2_linearproto.c

示例7: sf_gateway_c24_DemoSmile_KS

static void sf_gateway_c24_DemoSmile_KS(SFc24_DemoSmile_KSInstanceStruct
  *chartInstance)
{
  real_T c24_hoistedGlobal;
  real_T c24_u;
  uint32_T c24_debug_family_var_map[5];
  real_T c24_smile;
  real_T c24_nargin = 1.0;
  real_T c24_nargout = 1.0;
  real_T c24_y;
  real_T *c24_b_u;
  real_T *c24_b_y;
  c24_b_y = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
  c24_b_u = (real_T *)ssGetInputPortSignal(chartInstance->S, 0);
  _SFD_SYMBOL_SCOPE_PUSH(0U, 0U);
  _sfTime_ = sf_get_time(chartInstance->S);
  _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 15U, chartInstance->c24_sfEvent);
  _SFD_DATA_RANGE_CHECK(*c24_b_u, 0U);
  chartInstance->c24_sfEvent = CALL_EVENT;
  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 15U, chartInstance->c24_sfEvent);
  c24_hoistedGlobal = *c24_b_u;
  c24_u = c24_hoistedGlobal;
  _SFD_SYMBOL_SCOPE_PUSH_EML(0U, 5U, 5U, c24_debug_family_names,
    c24_debug_family_var_map);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c24_smile, 0U, c24_sf_marshallOut,
    c24_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c24_nargin, 1U, c24_sf_marshallOut,
    c24_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c24_nargout, 2U, c24_sf_marshallOut,
    c24_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML(&c24_u, 3U, c24_sf_marshallOut);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c24_y, 4U, c24_sf_marshallOut,
    c24_sf_marshallIn);
  CV_EML_FCN(0, 0);
  _SFD_EML_CALL(0U, chartInstance->c24_sfEvent, 3);
  if (CV_EML_IF(0, 1, 0, c24_u > 0.5)) {
    _SFD_EML_CALL(0U, chartInstance->c24_sfEvent, 4);
    c24_smile = 1.0;
  } else {
    _SFD_EML_CALL(0U, chartInstance->c24_sfEvent, 6);
    c24_smile = 0.0;
  }

  _SFD_EML_CALL(0U, chartInstance->c24_sfEvent, 8);
  c24_y = c24_smile;
  _SFD_EML_CALL(0U, chartInstance->c24_sfEvent, -8);
  _SFD_SYMBOL_SCOPE_POP();
  *c24_b_y = c24_y;
  _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 15U, chartInstance->c24_sfEvent);
  _SFD_SYMBOL_SCOPE_POP();
  _SFD_CHECK_FOR_STATE_INCONSISTENCY(_DemoSmile_KSMachineNumber_,
    chartInstance->chartNumber, chartInstance->instanceNumber);
  _SFD_DATA_RANGE_CHECK(*c24_b_y, 1U);
}
开发者ID:maryamsab,项目名称:realact,代码行数:54,代码来源:c24_DemoSmile_KS.c

示例8: sf_c6_adcs_v15_integral_Power_no_charge_in_detumb

static void sf_c6_adcs_v15_integral_Power_no_charge_in_detumb(void)
{
  int32_T c6_previousEvent;
  real_T c6_a;
  real_T c6_b;
  real_T c6_nargout = 1.0;
  real_T c6_nargin = 2.0;
  real_T c6_c;
  real_T c6_y;
  real_T *c6_b_a;
  real_T *c6_b_y;
  real_T *c6_b_b;
  c6_b_y = (real_T *)ssGetOutputPortSignal(chartInstance.S, 1);
  c6_b_a = (real_T *)ssGetInputPortSignal(chartInstance.S, 0);
  c6_b_b = (real_T *)ssGetInputPortSignal(chartInstance.S, 1);
  _sfTime_ = (real_T)ssGetT(chartInstance.S);
  _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG,4);
  _SFD_DATA_RANGE_CHECK(*c6_b_a, 0U);
  _SFD_DATA_RANGE_CHECK(*c6_b_y, 1U);
  _SFD_DATA_RANGE_CHECK(*c6_b_b, 2U);
  c6_previousEvent = _sfEvent_;
  _sfEvent_ = CALL_EVENT;
  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG,4);
  c6_a = *c6_b_a;
  c6_b = *c6_b_b;
  sf_debug_symbol_scope_push(6U, 0U);
  sf_debug_symbol_scope_add("nargout", &c6_nargout, c6_sf_marshall);
  sf_debug_symbol_scope_add("nargin", &c6_nargin, c6_sf_marshall);
  sf_debug_symbol_scope_add("c", &c6_c, c6_sf_marshall);
  sf_debug_symbol_scope_add("y", &c6_y, c6_sf_marshall);
  sf_debug_symbol_scope_add("b", &c6_b, c6_sf_marshall);
  sf_debug_symbol_scope_add("a", &c6_a, c6_sf_marshall);
  CV_EML_FCN(0, 0);
  _SFD_EML_CALL(0,4);
  c6_c = 1.0 - c6_a;
  _SFD_EML_CALL(0,6);
  c6_y = c6_c + c6_b;
  _SFD_EML_CALL(0,7);
  if (CV_EML_IF(0, 0, c6_y > 1.0)) {
    _SFD_EML_CALL(0,8);
    c6_y = 1.0;
  }

  _SFD_EML_CALL(0,-8);
  sf_debug_symbol_scope_pop();
  *c6_b_y = c6_y;
  _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG,4);
  _sfEvent_ = c6_previousEvent;
  sf_debug_check_for_state_inconsistency
    (_adcs_v15_integral_Power_no_charge_in_detumbMachineNumber_,
     chartInstance.chartNumber,
     chartInstance.instanceNumber);
}
开发者ID:avnishks,项目名称:pratham,代码行数:53,代码来源:c6_adcs_v15_integral_Power_no_charge_in_detumb.c

示例9: _SFD_SYMBOL_SCOPE_PUSH

static void sf_gateway_c19_Demo_GazeFWaveIdleRand
  (SFc19_Demo_GazeFWaveIdleRandInstanceStruct *chartInstance)
{
  real_T c19_hoistedGlobal;
  real_T c19_state;
  uint32_T c19_debug_family_var_map[4];
  real_T c19_nargin = 1.0;
  real_T c19_nargout = 1.0;
  real_T c19_stateOver;
  real_T *c19_b_state;
  real_T *c19_b_stateOver;
  c19_b_stateOver = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
  c19_b_state = (real_T *)ssGetInputPortSignal(chartInstance->S, 0);
  _SFD_SYMBOL_SCOPE_PUSH(0U, 0U);
  _sfTime_ = sf_get_time(chartInstance->S);
  _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 12U, chartInstance->c19_sfEvent);
  _SFD_DATA_RANGE_CHECK(*c19_b_state, 0U);
  chartInstance->c19_sfEvent = CALL_EVENT;
  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 12U, chartInstance->c19_sfEvent);
  c19_hoistedGlobal = *c19_b_state;
  c19_state = c19_hoistedGlobal;
  _SFD_SYMBOL_SCOPE_PUSH_EML(0U, 4U, 4U, c19_debug_family_names,
    c19_debug_family_var_map);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c19_nargin, 0U, c19_sf_marshallOut,
    c19_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c19_nargout, 1U, c19_sf_marshallOut,
    c19_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML(&c19_state, 2U, c19_sf_marshallOut);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c19_stateOver, 3U, c19_sf_marshallOut,
    c19_sf_marshallIn);
  CV_EML_FCN(0, 0);
  _SFD_EML_CALL(0U, chartInstance->c19_sfEvent, 13);
  if (CV_EML_IF(0, 1, 0, c19_state == 3.0)) {
    _SFD_EML_CALL(0U, chartInstance->c19_sfEvent, 15);
    c19_stateOver = 1.0;
  } else {
    _SFD_EML_CALL(0U, chartInstance->c19_sfEvent, 17);
    c19_stateOver = 0.0;
  }

  _SFD_EML_CALL(0U, chartInstance->c19_sfEvent, -17);
  _SFD_SYMBOL_SCOPE_POP();
  *c19_b_stateOver = c19_stateOver;
  _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 12U, chartInstance->c19_sfEvent);
  _SFD_SYMBOL_SCOPE_POP();
  _SFD_CHECK_FOR_STATE_INCONSISTENCY(_Demo_GazeFWaveIdleRandMachineNumber_,
    chartInstance->chartNumber, chartInstance->instanceNumber);
  _SFD_DATA_RANGE_CHECK(*c19_b_stateOver, 1U);
}
开发者ID:maryamsab,项目名称:realact,代码行数:49,代码来源:c19_Demo_GazeFWaveIdleRand.c

示例10: sf_c17_ekffedepre

static void sf_c17_ekffedepre(SFc17_ekffedepreInstanceStruct *chartInstance)
{
  real_T c17_hoistedGlobal;
  real_T c17_u;
  uint32_T c17_debug_family_var_map[4];
  real_T c17_nargin = 1.0;
  real_T c17_nargout = 1.0;
  real_T c17_y;
  real_T *c17_b_u;
  real_T *c17_b_y;
  c17_b_y = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
  c17_b_u = (real_T *)ssGetInputPortSignal(chartInstance->S, 0);
  _sfTime_ = (real_T)ssGetT(chartInstance->S);
  _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 16U, chartInstance->c17_sfEvent);
  _SFD_DATA_RANGE_CHECK(*c17_b_u, 0U);
  _SFD_DATA_RANGE_CHECK(*c17_b_y, 1U);
  chartInstance->c17_sfEvent = CALL_EVENT;
  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 16U, chartInstance->c17_sfEvent);
  c17_hoistedGlobal = *c17_b_u;
  c17_u = c17_hoistedGlobal;
  sf_debug_symbol_scope_push_eml(0U, 4U, 4U, c17_debug_family_names,
    c17_debug_family_var_map);
  sf_debug_symbol_scope_add_eml_importable(&c17_nargin, 0U, c17_sf_marshallOut,
    c17_sf_marshallIn);
  sf_debug_symbol_scope_add_eml_importable(&c17_nargout, 1U, c17_sf_marshallOut,
    c17_sf_marshallIn);
  sf_debug_symbol_scope_add_eml(&c17_u, 2U, c17_sf_marshallOut);
  sf_debug_symbol_scope_add_eml_importable(&c17_y, 3U, c17_sf_marshallOut,
    c17_sf_marshallIn);
  CV_EML_FCN(0, 0);
  _SFD_EML_CALL(0U, chartInstance->c17_sfEvent, 4);
  if (CV_EML_IF(0, 0, c17_u > 1.5)) {
    _SFD_EML_CALL(0U, chartInstance->c17_sfEvent, 5);
    c17_y = 0.85;
  } else {
    _SFD_EML_CALL(0U, chartInstance->c17_sfEvent, 7);
    c17_y = 0.0;
  }

  _SFD_EML_CALL(0U, chartInstance->c17_sfEvent, -7);
  sf_debug_symbol_scope_pop();
  *c17_b_y = c17_y;
  _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 16U, chartInstance->c17_sfEvent);
  sf_debug_check_for_state_inconsistency(_ekffedepreMachineNumber_,
    chartInstance->chartNumber, chartInstance->instanceNumber);
}
开发者ID:lovewubo,项目名称:foxg20_ahrs_1xx,代码行数:46,代码来源:c17_ekffedepre.c

示例11: sf_c2_function_call_test

static void sf_c2_function_call_test(void)
{
  uint8_T c2_previousEvent;
  real_T c2_b_a;
  real_T c2_b_b;
  real_T c2_b_y;
  _sfTime_ = (real_T)ssGetT(chartInstance.S);
  _SFD_DATA_RANGE_CHECK(*c2_a(), 2U);
  _SFD_DATA_RANGE_CHECK(*c2_y(), 1U);
  _SFD_DATA_RANGE_CHECK(*c2_b(), 0U);
  c2_previousEvent = _sfEvent_;
  _sfEvent_ = CALL_EVENT;
  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG,0);
  c2_b_a = *c2_a();
  c2_b_b = *c2_b();
  sf_debug_push_symbol_scope(3U, 0U);
  sf_debug_symbol_scope_add_symbol("y", 0, 0U, 0U, 0U, 0U, 1.0, 0, 0.0, 0U, 0,
   0U, 0, &c2_b_y, 0);
  sf_debug_symbol_scope_add_symbol("b", 0, 0U, 0U, 0U, 0U, 1.0, 0, 0.0, 0U, 0,
   0U, 0, &c2_b_b, 0);
  sf_debug_symbol_scope_add_symbol("a", 0, 0U, 0U, 0U, 0U, 1.0, 0, 0.0, 0U, 0,
   0U, 0, &c2_b_a, 0);
  CV_EML_FCN(0, 0);
  _SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,4);
  if(CV_EML_IF(0, 0, c2_b_a != c2_b_b)) {
    /*  This block supports an embeddable subset of the MATLAB language. */
    /*  See the help menu for details.  */
    _SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,4);
    c2_b_y = 1.0;
  } else {
    _SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,5);
    c2_b_y = 0.0;
  }
  _SFD_EML_CALL(STATE_DURING_DURING_ACTION_TAG,0,-5);
  sf_debug_pop_symbol_scope();
  *c2_y() = c2_b_y;
  _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG,0);
  _sfEvent_ = c2_previousEvent;
  sf_debug_check_for_state_inconsistency(_function_call_testMachineNumber_,
   chartInstance.chartNumber, chartInstance.instanceNumber);
}
开发者ID:Bazs,项目名称:mpc-robot,代码行数:41,代码来源:c2_function_call_test.c

示例12: sf_gateway_c3_RaspPiPilot

static void sf_gateway_c3_RaspPiPilot(SFc3_RaspPiPilotInstanceStruct
  *chartInstance)
{
  uint32_T c3_debug_family_var_map[3];
  real_T c3_nargin = 0.0;
  real_T c3_nargout = 1.0;
  uint8_T c3_result;
  uint8_T *c3_b_result;
  c3_b_result = (uint8_T *)ssGetOutputPortSignal(chartInstance->S, 1);
  _SFD_SYMBOL_SCOPE_PUSH(0U, 0U);
  _sfTime_ = sf_get_time(chartInstance->S);
  _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 2U, chartInstance->c3_sfEvent);
  chartInstance->c3_sfEvent = CALL_EVENT;
  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 2U, chartInstance->c3_sfEvent);
  _SFD_SYMBOL_SCOPE_PUSH_EML(0U, 3U, 3U, c3_debug_family_names,
    c3_debug_family_var_map);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c3_nargin, 0U, c3_b_sf_marshallOut,
    c3_b_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c3_nargout, 1U, c3_b_sf_marshallOut,
    c3_b_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c3_result, 2U, c3_sf_marshallOut,
    c3_sf_marshallIn);
  CV_EML_FCN(0, 0);
  _SFD_EML_CALL(0U, chartInstance->c3_sfEvent, 2);
  c3_result = 0U;
  _SFD_EML_CALL(0U, chartInstance->c3_sfEvent, 3);
  CV_EML_COND(0, 1, 0, true);
  CV_EML_MCDC(0, 1, 0, false);
  CV_EML_IF(0, 1, 0, false);
  _SFD_EML_CALL(0U, chartInstance->c3_sfEvent, -4);
  _SFD_SYMBOL_SCOPE_POP();
  *c3_b_result = c3_result;
  _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 2U, chartInstance->c3_sfEvent);
  _SFD_SYMBOL_SCOPE_POP();
  _SFD_CHECK_FOR_STATE_INCONSISTENCY(_RaspPiPilotMachineNumber_,
    chartInstance->chartNumber, chartInstance->instanceNumber);
  _SFD_DATA_RANGE_CHECK((real_T)*c3_b_result, 0U);
}
开发者ID:omcaree,项目名称:AutonomousQuadcopter,代码行数:38,代码来源:c3_RaspPiPilot.c

示例13: sf_c3_car_model


//.........这里部分代码省略.........
  sf_debug_symbol_scope_add_eml(&c3_s_Ry_denum, c3_d_sf_marshall, 15U);
  sf_debug_symbol_scope_add_eml(&c3_s_Ry, c3_d_sf_marshall, 16U);
  sf_debug_symbol_scope_add_eml(&c3_nargin, c3_d_sf_marshall, 17U);
  sf_debug_symbol_scope_add_eml(&c3_nargout, c3_d_sf_marshall, 18U);
  sf_debug_symbol_scope_add_eml(&c3_X, c3_c_sf_marshall, 19U);
  sf_debug_symbol_scope_add_eml(&c3_u, c3_b_sf_marshall, 20U);
  sf_debug_symbol_scope_add_eml(&c3_s, c3_sf_marshall, 21U);
  CV_EML_FCN(0, 0);

  /*  l_F = param.l_F; */
  /*  l_R = param.l_R; */
  _SFD_EML_CALL(0,7);
  c3_l_F = 1.1;
  _SFD_EML_CALL(0,8);
  c3_l_R = 1.6;
  _SFD_EML_CALL(0,10);
  c3_Vx = c3_X[0];
  _SFD_EML_CALL(0,11);
  c3_Vy = c3_X[1];
  _SFD_EML_CALL(0,12);
  c3_r = c3_X[2];
  _SFD_EML_CALL(0,13);
  c3_psi = c3_X[3];
  _SFD_EML_CALL(0,15);
  c3_f_Fx = c3_u[0];
  _SFD_EML_CALL(0,16);
  c3_f_Rx = c3_u[1];
  _SFD_EML_CALL(0,17);
  c3_delta = c3_u[2];
  _SFD_EML_CALL(0,20);
  if (CV_EML_COND(0, 0, c3_Vx == 0.0)) {
    if (CV_EML_COND(0, 1, c3_Vy == 0.0)) {
      CV_EML_MCDC(0, 0, TRUE);
      CV_EML_IF(0, 0, TRUE);
      _SFD_EML_CALL(0,21);
      c3_beta = 0.0;
      goto label_1;
    }
  }

  CV_EML_MCDC(0, 0, FALSE);
  CV_EML_IF(0, 0, FALSE);
  _SFD_EML_CALL(0,23);
  c3_A = c3_Vy;
  c3_B = c3_Vx;
  c3_x = c3_A;
  c3_y = c3_B;
  c3_b_x = c3_x;
  c3_b_y = c3_y;
  c3_c_x = c3_b_x;
  c3_c_y = c3_b_y;
  c3_d_y = c3_c_x / c3_c_y;
  c3_d_x = c3_d_y;
  c3_beta = c3_d_x;
  c3_e_x = c3_beta;
  c3_beta = c3_e_x;
  c3_beta = muDoubleScalarAtan(c3_beta);
 label_1:
  ;
  _SFD_EML_CALL(0,26);
  c3_f_x = c3_mpower(chartInstance, c3_Vx) + c3_mpower(chartInstance, c3_Vy);
  c3_V = c3_f_x;
  if (c3_V < 0.0) {
    c3_eml_error(chartInstance);
  }
开发者ID:geniuskpj,项目名称:term-project-ae6511,代码行数:66,代码来源:c3_car_model.c

示例14: _SFD_CC_CALL

static void sf_c1_QPSK_Transmit_v5_w_FIFO
  (SFc1_QPSK_Transmit_v5_w_FIFOInstanceStruct *chartInstance)
{
  real_T c1_hoistedGlobal;
  real_T c1_d_in;
  uint32_T c1_debug_family_var_map[7];
  real_T c1_OS_RATE;
  real_T c1_f[17];
  real_T c1_nargin = 1.0;
  real_T c1_nargout = 1.0;
  creal_T c1_d_out;
  uint32_T c1_b_debug_family_var_map[3];
  real_T c1_y[17];
  real_T c1_b_nargin = 0.0;
  real_T c1_b_nargout = 1.0;
  int32_T c1_i2;
  static real_T c1_b[17] = { 0.006690562067, -0.00576859381, -0.011827354519,
    0.020586915021, 0.016726405168, -0.053692342207, -0.020253031546,
    0.196043589067, 0.33682241319, 0.196043589067, -0.020253031546,
    -0.053692342207, 0.016726405168, 0.020586915021, -0.011827354519,
    -0.00576859381, 0.006690562067 };

  int32_T c1_i3;
  int32_T c1_i4;
  int32_T c1_i5;
  creal_T c1_dcv1[17];
  int32_T c1_i6;
  int32_T c1_i7;
  creal_T c1_b_hoistedGlobal[17];
  creal_T c1_dc0;
  int32_T c1_i8;
  creal_T c1_b_b;
  creal_T c1_c_hoistedGlobal;
  real_T *c1_b_d_in;
  creal_T *c1_b_d_out;
  c1_b_d_out = (creal_T *)ssGetOutputPortSignal(chartInstance->S, 1);
  c1_b_d_in = (real_T *)ssGetInputPortSignal(chartInstance->S, 0);
  _sfTime_ = (real_T)ssGetT(chartInstance->S);
  _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
  _SFD_DATA_RANGE_CHECK(*c1_b_d_in, 0U);
  chartInstance->c1_sfEvent = CALL_EVENT;
  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
  c1_hoistedGlobal = *c1_b_d_in;
  c1_d_in = c1_hoistedGlobal;
  sf_debug_symbol_scope_push_eml(0U, 7U, 7U, c1_debug_family_names,
    c1_debug_family_var_map);
  sf_debug_symbol_scope_add_eml(&c1_OS_RATE, 0U, c1_c_sf_marshallOut);
  sf_debug_symbol_scope_add_eml(c1_f, 1U, c1_d_sf_marshallOut);
  sf_debug_symbol_scope_add_eml_importable(&c1_nargin, 2U, c1_c_sf_marshallOut,
    c1_c_sf_marshallIn);
  sf_debug_symbol_scope_add_eml_importable(&c1_nargout, 3U, c1_c_sf_marshallOut,
    c1_c_sf_marshallIn);
  sf_debug_symbol_scope_add_eml(&c1_d_in, 4U, c1_c_sf_marshallOut);
  sf_debug_symbol_scope_add_eml_importable(&c1_d_out, 5U, c1_b_sf_marshallOut,
    c1_b_sf_marshallIn);
  sf_debug_symbol_scope_add_eml_importable(chartInstance->c1_buf, 6U,
    c1_sf_marshallOut, c1_sf_marshallIn);
  CV_EML_FCN(0, 0);
  _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 3);
  _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 5);
  c1_OS_RATE = 8.0;
  _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 6);
  sf_debug_symbol_scope_push_eml(0U, 3U, 3U, c1_b_debug_family_names,
    c1_b_debug_family_var_map);
  sf_debug_symbol_scope_add_eml_importable(c1_y, 0U, c1_d_sf_marshallOut,
    c1_d_sf_marshallIn);
  sf_debug_symbol_scope_add_eml_importable(&c1_b_nargin, 1U, c1_c_sf_marshallOut,
    c1_c_sf_marshallIn);
  sf_debug_symbol_scope_add_eml_importable(&c1_b_nargout, 2U,
    c1_c_sf_marshallOut, c1_c_sf_marshallIn);
  CV_SCRIPT_FCN(0, 0);
  _SFD_SCRIPT_CALL(0U, chartInstance->c1_sfEvent, 3);
  for (c1_i2 = 0; c1_i2 < 17; c1_i2++) {
    c1_y[c1_i2] = c1_b[c1_i2];
  }

  _SFD_SCRIPT_CALL(0U, chartInstance->c1_sfEvent, -3);
  sf_debug_symbol_scope_pop();
  for (c1_i3 = 0; c1_i3 < 17; c1_i3++) {
    c1_f[c1_i3] = c1_b[c1_i3];
  }

  _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 8);
  if (CV_EML_IF(0, 1, 0, !chartInstance->c1_buf_not_empty)) {
    _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 9);
    for (c1_i4 = 0; c1_i4 < 17; c1_i4++) {
      chartInstance->c1_buf[c1_i4].re = 0.0;
      chartInstance->c1_buf[c1_i4].im = 0.0;
    }

    chartInstance->c1_buf_not_empty = TRUE;
  }

  _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 12);
  for (c1_i5 = 0; c1_i5 < 16; c1_i5++) {
    c1_dcv1[c1_i5] = chartInstance->c1_buf[c1_i5 + 1];
  }

  c1_dcv1[16].re = c1_d_in;
  c1_dcv1[16].im = 0.0;
//.........这里部分代码省略.........
开发者ID:gnanjundiah,项目名称:capstone,代码行数:101,代码来源:c1_QPSK_Transmit_v5_w_FIFO.c

示例15: sf_c1_my_demo_ref

static void sf_c1_my_demo_ref(SFc1_my_demo_refInstanceStruct *chartInstance)
{
  int32_T c1_i0;
  real_T c1_hoistedGlobal;
  real_T c1_b_hoistedGlobal;
  real_T c1_x;
  real_T c1_y;
  int32_T c1_i1;
  real_T c1_fpath[170];
  uint32_T c1_debug_family_var_map[13];
  real_T c1_dmin;
  real_T c1_xx[85];
  real_T c1_yy[85];
  real_T c1_d;
  real_T c1_nargin = 3.0;
  real_T c1_nargout = 3.0;
  real_T c1_x_g;
  real_T c1_y_g;
  real_T c1_stop;
  int32_T c1_i2;
  int32_T c1_i3;
  real_T c1_c_hoistedGlobal;
  real_T c1_d_hoistedGlobal;
  real_T c1_b_x;
  real_T c1_c_x;
  real_T *c1_b_x_g;
  real_T *c1_b_y_g;
  real_T *c1_d_x;
  real_T *c1_b_y;
  real_T *c1_b_stop;
  real_T (*c1_b_fpath)[170];
  boolean_T guard1 = FALSE;
  boolean_T guard2 = FALSE;
  c1_b_stop = (real_T *)ssGetOutputPortSignal(chartInstance->S, 3);
  c1_b_fpath = (real_T (*)[170])ssGetInputPortSignal(chartInstance->S, 2);
  c1_b_y = (real_T *)ssGetInputPortSignal(chartInstance->S, 1);
  c1_d_x = (real_T *)ssGetInputPortSignal(chartInstance->S, 0);
  c1_b_y_g = (real_T *)ssGetOutputPortSignal(chartInstance->S, 2);
  c1_b_x_g = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
  _sfTime_ = (real_T)ssGetT(chartInstance->S);
  _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
  _SFD_DATA_RANGE_CHECK(*c1_b_x_g, 0U);
  _SFD_DATA_RANGE_CHECK(*c1_b_y_g, 1U);
  _SFD_DATA_RANGE_CHECK(*c1_d_x, 2U);
  _SFD_DATA_RANGE_CHECK(*c1_b_y, 3U);
  for (c1_i0 = 0; c1_i0 < 170; c1_i0++) {
    _SFD_DATA_RANGE_CHECK((*c1_b_fpath)[c1_i0], 4U);
  }

  _SFD_DATA_RANGE_CHECK(*c1_b_stop, 5U);
  chartInstance->c1_sfEvent = CALL_EVENT;
  _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
  c1_hoistedGlobal = *c1_d_x;
  c1_b_hoistedGlobal = *c1_b_y;
  c1_x = c1_hoistedGlobal;
  c1_y = c1_b_hoistedGlobal;
  for (c1_i1 = 0; c1_i1 < 170; c1_i1++) {
    c1_fpath[c1_i1] = (*c1_b_fpath)[c1_i1];
  }

  sf_debug_symbol_scope_push_eml(0U, 13U, 13U, c1_debug_family_names,
    c1_debug_family_var_map);
  sf_debug_symbol_scope_add_eml_importable(&c1_dmin, 0U, c1_b_sf_marshallOut,
    c1_b_sf_marshallIn);
  sf_debug_symbol_scope_add_eml_importable(c1_xx, 1U, c1_d_sf_marshallOut,
    c1_c_sf_marshallIn);
  sf_debug_symbol_scope_add_eml_importable(c1_yy, 2U, c1_d_sf_marshallOut,
    c1_c_sf_marshallIn);
  sf_debug_symbol_scope_add_eml_importable(&c1_d, 3U, c1_b_sf_marshallOut,
    c1_b_sf_marshallIn);
  sf_debug_symbol_scope_add_eml_importable(&c1_nargin, 4U, c1_b_sf_marshallOut,
    c1_b_sf_marshallIn);
  sf_debug_symbol_scope_add_eml_importable(&c1_nargout, 5U, c1_b_sf_marshallOut,
    c1_b_sf_marshallIn);
  sf_debug_symbol_scope_add_eml(&c1_x, 6U, c1_b_sf_marshallOut);
  sf_debug_symbol_scope_add_eml(&c1_y, 7U, c1_b_sf_marshallOut);
  sf_debug_symbol_scope_add_eml(c1_fpath, 8U, c1_c_sf_marshallOut);
  sf_debug_symbol_scope_add_eml_importable(&c1_x_g, 9U, c1_b_sf_marshallOut,
    c1_b_sf_marshallIn);
  sf_debug_symbol_scope_add_eml_importable(&c1_y_g, 10U, c1_b_sf_marshallOut,
    c1_b_sf_marshallIn);
  sf_debug_symbol_scope_add_eml_importable(&c1_stop, 11U, c1_b_sf_marshallOut,
    c1_b_sf_marshallIn);
  sf_debug_symbol_scope_add_eml_importable(&chartInstance->c1_i, 12U,
    c1_sf_marshallOut, c1_sf_marshallIn);
  CV_EML_FCN(0, 0);
  _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 6);
  _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 7);
  if (CV_EML_IF(0, 1, 0, !chartInstance->c1_i_not_empty)) {
    _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 8);
    chartInstance->c1_i = 1.0;
    chartInstance->c1_i_not_empty = TRUE;
  }

  _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 12);
  c1_stop = 0.0;
  _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 13);
  c1_dmin = 0.1;
  _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 26);
  for (c1_i2 = 0; c1_i2 < 85; c1_i2++) {
//.........这里部分代码省略.........
开发者ID:OneTwoSteph,项目名称:Work,代码行数:101,代码来源:c1_my_demo_ref.c


注:本文中的CV_EML_IF函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。