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;
  for (c1_i6 = 0; c1_i6 < 17; c1_i6++) {
    chartInstance->c1_buf[c1_i6] = c1_dcv1[c1_i6];
  }

  _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 14);
  for (c1_i7 = 0; c1_i7 < 17; c1_i7++) {
    c1_b_hoistedGlobal[c1_i7] = chartInstance->c1_buf[c1_i7];
  }

  c1_dc0.re = 0.0;
  c1_dc0.im = 0.0;
  for (c1_i8 = 0; c1_i8 < 17; c1_i8++) {
    c1_b_b.re = c1_b[c1_i8];
    c1_b_b.im = 0.0;
    c1_c_hoistedGlobal.re = c1_b_hoistedGlobal[c1_i8].re * c1_b_b.re -
      c1_b_hoistedGlobal[c1_i8].im * c1_b_b.im;
    c1_c_hoistedGlobal.im = c1_b_hoistedGlobal[c1_i8].re * c1_b_b.im +
      c1_b_hoistedGlobal[c1_i8].im * c1_b_b.re;
    c1_dc0.re += c1_c_hoistedGlobal.re;
    c1_dc0.im += c1_c_hoistedGlobal.im;
  }

  c1_d_out = c1_dc0;
  _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, -14);
  sf_debug_symbol_scope_pop();
  c1_b_d_out->re = c1_d_out.re;
  c1_b_d_out->im = c1_d_out.im;
  _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
  sf_debug_check_for_state_inconsistency(_QPSK_Transmit_v5_w_FIFOMachineNumber_,
    chartInstance->chartNumber, chartInstance->instanceNumber);
}
Beispiel #2
0
static void c35_enter_atomic_stateCreatePawn(SFc35_Expriment_PoseInstanceStruct *
  chartInstance)
{
  uint32_T c35_debug_family_var_map[2];
  real_T c35_nargin = 0.0;
  real_T c35_nargout = 0.0;
  uint32_T c35_b_debug_family_var_map[9];
  real_T c35_maxarrsize;
  real_T c35_arr[58];
  real_T c35_ss;
  real_T c35_padsize;
  real_T c35_tt[1000];
  char_T c35_mystr[58];
  real_T c35_b_nargin = 1.0;
  real_T c35_b_nargout = 1.0;
  real_T c35_myarr256[1000];
  int32_T c35_i0;
  static char_T c35_cv0[58] = { 's', 'c', 'e', 'n', 'e', '.', 'g', 'e', 't', 'P',
    'a', 'w', 'n', '(', '\\', '\"', 'g', 'a', 'z', 'e', 'T', 'a', 'r', 'g', 'e',
    't', '\\', '\"', ')', '.', 's', 'e', 't', 'P', 'o', 's', 'i', 't', 'i', 'o',
    'n', '(', 'S', 'r', 'V', 'e', 'c', '(', '0', ',', '1', '.', '6', ',', '1',
    '0', ')', ')' };

  int32_T c35_i1;
  static real_T c35_dv0[58] = { 115.0, 99.0, 101.0, 110.0, 101.0, 46.0, 103.0,
    101.0, 116.0, 80.0, 97.0, 119.0, 110.0, 40.0, 92.0, 34.0, 103.0, 97.0, 122.0,
    101.0, 84.0, 97.0, 114.0, 103.0, 101.0, 116.0, 92.0, 34.0, 41.0, 46.0, 115.0,
    101.0, 116.0, 80.0, 111.0, 115.0, 105.0, 116.0, 105.0, 111.0, 110.0, 40.0,
    83.0, 114.0, 86.0, 101.0, 99.0, 40.0, 48.0, 44.0, 49.0, 46.0, 54.0, 44.0,
    49.0, 48.0, 41.0, 41.0 };

  int32_T c35_i2;
  int32_T c35_i3;
  int32_T c35_i4;
  int32_T c35_i5;
  real_T c35_b_myarr256[1000];
  _SFD_SYMBOL_SCOPE_PUSH_EML(0U, 2U, 2U, c35_debug_family_names,
    c35_debug_family_var_map);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c35_nargin, 0U, c35_sf_marshallOut,
    c35_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c35_nargout, 1U, c35_sf_marshallOut,
    c35_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_PUSH_EML(0U, 9U, 9U, c35_b_debug_family_names,
    c35_b_debug_family_var_map);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c35_maxarrsize, 0U, c35_sf_marshallOut,
    c35_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML(c35_arr, 1U, c35_d_sf_marshallOut);
  _SFD_SYMBOL_SCOPE_ADD_EML(&c35_ss, 2U, c35_sf_marshallOut);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c35_padsize, 3U, c35_sf_marshallOut,
    c35_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(c35_tt, 4U, c35_b_sf_marshallOut,
    c35_b_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML(c35_mystr, 5U, c35_c_sf_marshallOut);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c35_b_nargin, 6U, c35_sf_marshallOut,
    c35_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(&c35_b_nargout, 7U, c35_sf_marshallOut,
    c35_sf_marshallIn);
  _SFD_SYMBOL_SCOPE_ADD_EML_IMPORTABLE(c35_myarr256, 8U, c35_b_sf_marshallOut,
    c35_b_sf_marshallIn);
  for (c35_i0 = 0; c35_i0 < 58; c35_i0++) {
    c35_mystr[c35_i0] = c35_cv0[c35_i0];
  }

  CV_SCRIPT_FCN(0, 0);
  _SFD_SCRIPT_CALL(0U, chartInstance->c35_sfEvent, 3);
  _SFD_SCRIPT_CALL(0U, chartInstance->c35_sfEvent, 4);
  c35_maxarrsize = 1000.0;
  _SFD_SCRIPT_CALL(0U, chartInstance->c35_sfEvent, 6);
  for (c35_i1 = 0; c35_i1 < 58; c35_i1++) {
    c35_arr[c35_i1] = c35_dv0[c35_i1];
  }

  _SFD_SCRIPT_CALL(0U, chartInstance->c35_sfEvent, 7);
  c35_ss = 58.0;
  _SFD_SCRIPT_CALL(0U, chartInstance->c35_sfEvent, 8);
  c35_padsize = c35_maxarrsize - c35_ss;
  _SFD_SCRIPT_CALL(0U, chartInstance->c35_sfEvent, 9);
  for (c35_i2 = 0; c35_i2 < 1000; c35_i2++) {
    c35_tt[c35_i2] = 0.0;
  }

  _SFD_SCRIPT_CALL(0U, chartInstance->c35_sfEvent, 10);
  for (c35_i3 = 0; c35_i3 < 58; c35_i3++) {
    c35_tt[c35_i3] = c35_arr[c35_i3];
  }

  _SFD_SCRIPT_CALL(0U, chartInstance->c35_sfEvent, 11);
  for (c35_i4 = 0; c35_i4 < 1000; c35_i4++) {
    c35_myarr256[c35_i4] = c35_tt[c35_i4];
  }

  _SFD_SCRIPT_CALL(0U, chartInstance->c35_sfEvent, -11);
  _SFD_SYMBOL_SCOPE_POP();
  for (c35_i5 = 0; c35_i5 < 1000; c35_i5++) {
    c35_b_myarr256[c35_i5] = c35_myarr256[c35_i5];
  }

  c35_sendSBM(chartInstance, c35_b_myarr256);
  _SFD_SYMBOL_SCOPE_POP();
}