예제 #1
0
static void set_sim_state_c1_newtons_cradle(SFc1_newtons_cradleInstanceStruct
  *chartInstance, const mxArray *c1_st)
{
  c1_emlrt_marshallIn(chartInstance, sf_mex_dup(c1_st));
  chartInstance->c1_doSetSimStateSideEffects = 1U;
  sf_mex_destroy(&c1_st);
}
예제 #2
0
static void set_sim_state_c1_my_demo_ref(SFc1_my_demo_refInstanceStruct
  *chartInstance, const mxArray *c1_st)
{
  const mxArray *c1_u;
  real_T *c1_stop;
  real_T *c1_x_g;
  real_T *c1_y_g;
  c1_stop = (real_T *)ssGetOutputPortSignal(chartInstance->S, 3);
  c1_y_g = (real_T *)ssGetOutputPortSignal(chartInstance->S, 2);
  c1_x_g = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
  chartInstance->c1_doneDoubleBufferReInit = TRUE;
  c1_u = sf_mex_dup(c1_st);
  *c1_stop = c1_c_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell(c1_u,
    0)), "stop");
  *c1_x_g = c1_c_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell(c1_u,
    1)), "x_g");
  *c1_y_g = c1_c_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell(c1_u,
    2)), "y_g");
  chartInstance->c1_i = c1_emlrt_marshallIn(chartInstance, sf_mex_dup
    (sf_mex_getcell(c1_u, 3)), "i");
  chartInstance->c1_is_active_c1_my_demo_ref = c1_g_emlrt_marshallIn
    (chartInstance, sf_mex_dup(sf_mex_getcell(c1_u, 4)),
     "is_active_c1_my_demo_ref");
  sf_mex_destroy(&c1_u);
  c1_update_debugger_state_c1_my_demo_ref(chartInstance);
  sf_mex_destroy(&c1_st);
}
static void set_sim_state_c1_QPSK_Transmit_v5_w_FIFO
  (SFc1_QPSK_Transmit_v5_w_FIFOInstanceStruct *chartInstance, const mxArray
   *c1_st)
{
  const mxArray *c1_u;
  creal_T c1_dcv0[17];
  int32_T c1_i1;
  creal_T *c1_d_out;
  c1_d_out = (creal_T *)ssGetOutputPortSignal(chartInstance->S, 1);
  chartInstance->c1_doneDoubleBufferReInit = TRUE;
  c1_u = sf_mex_dup(c1_st);
  *c1_d_out = c1_c_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell
    (c1_u, 0)), "d_out");
  c1_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell(c1_u, 1)), "buf",
                      c1_dcv0);
  for (c1_i1 = 0; c1_i1 < 17; c1_i1++) {
    chartInstance->c1_buf[c1_i1] = c1_dcv0[c1_i1];
  }

  chartInstance->c1_is_active_c1_QPSK_Transmit_v5_w_FIFO = c1_h_emlrt_marshallIn
    (chartInstance, sf_mex_dup(sf_mex_getcell(c1_u, 2)),
     "is_active_c1_QPSK_Transmit_v5_w_FIFO");
  sf_mex_destroy(&c1_u);
  c1_update_debugger_state_c1_QPSK_Transmit_v5_w_FIFO(chartInstance);
  sf_mex_destroy(&c1_st);
}
static void set_sim_state_c1_motor_control_with_off_the_shelf_SVPWM
  (SFc1_motor_control_with_off_the_shelf_SVPWMInstanceStruct *chartInstance,
   const mxArray *c1_st)
{
  const mxArray *c1_u;
  real_T *c1_Vd;
  real_T *c1_Vq;
  c1_Vq = (real_T *)ssGetOutputPortSignal(chartInstance->S, 2);
  c1_Vd = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
  chartInstance->c1_doneDoubleBufferReInit = TRUE;
  c1_u = sf_mex_dup(c1_st);
  *c1_Vd = c1_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell(c1_u, 0)),
    "Vd");
  *c1_Vq = c1_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell(c1_u, 1)),
    "Vq");
  chartInstance->c1_is_active_c1_motor_control_with_off_the_shelf_SVPWM =
    c1_d_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell(c1_u, 2)),
    "is_active_c1_motor_control_with_off_the_shelf_SVPWM");
  sf_mex_destroy(&c1_u);
  c1_update_debugger_state_c1_motor_control_with_off_the_shelf_SVP(chartInstance);
  sf_mex_destroy(&c1_st);
}
static void set_sim_state_c1_main(SFc1_mainInstanceStruct *chartInstance, const
  mxArray *c1_st)
{
  const mxArray *c1_u;
  real_T *c1_y;
  c1_y = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
  chartInstance->c1_doneDoubleBufferReInit = TRUE;
  c1_u = sf_mex_dup(c1_st);
  *c1_y = c1_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell(c1_u, 0)),
    "y");
  chartInstance->c1_is_active_c1_main = c1_d_emlrt_marshallIn(chartInstance,
    sf_mex_dup(sf_mex_getcell(c1_u, 1)), "is_active_c1_main");
  sf_mex_destroy(&c1_u);
  c1_update_debugger_state_c1_main(chartInstance);
  sf_mex_destroy(&c1_st);
}
static void set_sim_state_c1_TTR_RobustMPC_RTmdl
  (SFc1_TTR_RobustMPC_RTmdlInstanceStruct *chartInstance, const mxArray *c1_st)
{
  const mxArray *c1_u;
  real_T *c1_u_ctrl_out;
  c1_u_ctrl_out = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
  chartInstance->c1_doneDoubleBufferReInit = TRUE;
  c1_u = sf_mex_dup(c1_st);
  *c1_u_ctrl_out = c1_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell
    (c1_u, 0)), "u_ctrl_out");
  chartInstance->c1_is_active_c1_TTR_RobustMPC_RTmdl = c1_d_emlrt_marshallIn
    (chartInstance, sf_mex_dup(sf_mex_getcell(c1_u, 1)),
     "is_active_c1_TTR_RobustMPC_RTmdl");
  sf_mex_destroy(&c1_u);
  c1_update_debugger_state_c1_TTR_RobustMPC_RTmdl(chartInstance);
  sf_mex_destroy(&c1_st);
}
static void c1_sf_marshallIn(void *chartInstanceVoid, const mxArray
  *c1_mxArrayInData, const char_T *c1_varName, void *c1_outData)
{
  const mxArray *c1_b_sfEvent;
  const char_T *c1_identifier;
  emlrtMsgIdentifier c1_thisId;
  int32_T c1_y;
  SFc1_EVdemo_6InstanceStruct *chartInstance;
  chartInstance = (SFc1_EVdemo_6InstanceStruct *)chartInstanceVoid;
  c1_b_sfEvent = sf_mex_dup(c1_mxArrayInData);
  c1_identifier = c1_varName;
  c1_thisId.fIdentifier = c1_identifier;
  c1_thisId.fParent = NULL;
  c1_y = c1_emlrt_marshallIn(chartInstance, sf_mex_dup(c1_b_sfEvent), &c1_thisId);
  sf_mex_destroy(&c1_b_sfEvent);
  *(int32_T *)c1_outData = c1_y;
  sf_mex_destroy(&c1_mxArrayInData);
}
static void c1_sf_marshallIn(void *chartInstanceVoid, const mxArray
  *c1_mxArrayInData, const char_T *c1_varName, void *c1_outData)
{
  const mxArray *c1_sf_internal_predicateOutput;
  const char_T *c1_identifier;
  emlrtMsgIdentifier c1_thisId;
  boolean_T c1_y;
  SFc1_Engine_Vehicle_CVT_RS_System2InstanceStruct *chartInstance;
  chartInstance = (SFc1_Engine_Vehicle_CVT_RS_System2InstanceStruct *)
    chartInstanceVoid;
  c1_sf_internal_predicateOutput = sf_mex_dup(c1_mxArrayInData);
  c1_identifier = c1_varName;
  c1_thisId.fIdentifier = c1_identifier;
  c1_thisId.fParent = NULL;
  c1_y = c1_emlrt_marshallIn(chartInstance, sf_mex_dup
    (c1_sf_internal_predicateOutput), &c1_thisId);
  sf_mex_destroy(&c1_sf_internal_predicateOutput);
  *(boolean_T *)c1_outData = c1_y;
  sf_mex_destroy(&c1_mxArrayInData);
}
static void set_sim_state_c1_VrSubsystem(SFc1_VrSubsystemInstanceStruct
  *chartInstance, const mxArray *c1_st)
{
  const mxArray *c1_b_u;
  real_T c1_dv0[128];
  int32_T c1_i0;
  chartInstance->c1_doneDoubleBufferReInit = true;
  c1_b_u = sf_mex_dup(c1_st);
  c1_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell("y", c1_b_u, 0)),
                      "y", c1_dv0);
  for (c1_i0 = 0; c1_i0 < 128; c1_i0++) {
    (*chartInstance->c1_y)[c1_i0] = c1_dv0[c1_i0];
  }

  chartInstance->c1_is_active_c1_VrSubsystem = c1_e_emlrt_marshallIn
    (chartInstance, sf_mex_dup(sf_mex_getcell("is_active_c1_VrSubsystem", c1_b_u,
       1)), "is_active_c1_VrSubsystem");
  sf_mex_destroy(&c1_b_u);
  c1_update_debugger_state_c1_VrSubsystem(chartInstance);
  sf_mex_destroy(&c1_st);
}
예제 #10
0
static void set_sim_state_c1_MON_sl_after_replacement3
  (SFc1_MON_sl_after_replacement3InstanceStruct *chartInstance, const mxArray
   *c1_st)
{
  const mxArray *c1_u;
  chartInstance->c1_doneDoubleBufferReInit = true;
  c1_u = sf_mex_dup(c1_st);
  *chartInstance->c1_r = c1_emlrt_marshallIn(chartInstance, sf_mex_dup
    (sf_mex_getcell("r", c1_u, 0)), "r");
  chartInstance->c1_is_active_c1_MON_sl_after_replacement3 =
    c1_c_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell(
    "is_active_c1_MON_sl_after_replacement3", c1_u, 1)),
    "is_active_c1_MON_sl_after_replacement3");
  sf_mex_assign(&chartInstance->c1_setSimStateSideEffectsInfo,
                c1_e_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell(
    "setSimStateSideEffectsInfo", c1_u, 2)), "setSimStateSideEffectsInfo"), true);
  sf_mex_destroy(&c1_u);
  chartInstance->c1_doSetSimStateSideEffects = 1U;
  c1_update_debugger_state_c1_MON_sl_after_replacement3(chartInstance);
  sf_mex_destroy(&c1_st);
}
예제 #11
0
static void set_sim_state_c1_Qmod(SFc1_QmodInstanceStruct *chartInstance, const
  mxArray *c1_st)
{
  const mxArray *c1_u;
  real_T c1_dv0[3];
  int32_T c1_i1;
  real_T (*c1_y)[3];
  c1_y = (real_T (*)[3])ssGetOutputPortSignal(chartInstance->S, 1);
  chartInstance->c1_doneDoubleBufferReInit = TRUE;
  c1_u = sf_mex_dup(c1_st);
  c1_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell(c1_u, 0)), "y",
                      c1_dv0);
  for (c1_i1 = 0; c1_i1 < 3; c1_i1++) {
    (*c1_y)[c1_i1] = c1_dv0[c1_i1];
  }

  chartInstance->c1_is_active_c1_Qmod = c1_e_emlrt_marshallIn(chartInstance,
    sf_mex_dup(sf_mex_getcell(c1_u, 1)), "is_active_c1_Qmod");
  sf_mex_destroy(&c1_u);
  c1_update_debugger_state_c1_Qmod(chartInstance);
  sf_mex_destroy(&c1_st);
}