#include <srcC_Model/Component_C_Sfn.h>


#ifdef __USE_REFLECTION__
  #include <srcC_Model/Component_C_Sfn.crefl> 
#endif



Component_C_Sfn* ctor_Component_C (ObjectJc* othiz, float Tstep ){
  Component_C_Sfn* thiz = (Component_C_Sfn*)othiz;
  initReflection_ObjectJc(othiz, othiz, sizeof(Component_C_Sfn), &reflection_Component_C_Sfn, -1);
  thiz->model.dwork = &thiz->dwork;
  thiz->model.inputs = &thiz->inputs;
  thiz->model.outputs = &thiz->outputs;
  thiz->model.errorStatus = "";
  Component_C_initialize(&thiz->model);
  return thiz;
}

bool init_Component_C (Component_C_Sfn* thiz, struct Device_ObjMod_t* device){
  handle_Handle2Ptr(device, &thiz->inputs.myDevice);
  if (thiz->inputs.myDevice == 0) return false;
  else {
    Component_C_step1(&thiz->model);
    return true;
  }
}

void step_Component_C (Component_C_Sfn* thiz, float out_y[2]){
  Component_C_step0(&thiz->model);
  if(out_y !=null) {
    memcpy(out_y, thiz->outputs.Out1, 2 * sizeof(float));
  }
}



