//This file is generated by the Sfunction 'step_DataStructMng_Inspc_SfH' in Simulink Runtime. 
//The source to generate it is programmed in 'emc/source/Inspc/DataStruct_Inspc.c' made by Hartmut Schorrig, Version 2018-11 
//The content is controlled by the parameter of the Sfunction in its Simulink environment of the calling model. 
//Especially the name of the struct is the parameter 'Name Type' in this SFblock. 
//Do not modify. 
#include <genSrcInspc/Controller_ObjMod.h> 


#ifdef DEF_REFLECTION_FULL
  #include <genSrcInspc/Controller_ObjMod.crefl>
#elif !defined(DEFINED_refl_Test_Ctrl) && !defined(DEF_REFLECTION_NO)  //may defined in the *.refloffs.c file
  ClassJc const refl_Controller_ObjMod = INIZ_ClassJc(refl_Controller_ObjMod, "Controller_ObjMod");
#endif


void ctor_Controller_ObjMod(Controller_ObjMod_s* thiz) {
  STACKTRC_ENTRY("ctor_Controller_ObjMod");
    CTOR_ObjectJc(&thiz->base.object, thiz, sizeof(*thiz), refl_Controller_ObjMod, 0);
  STACKTRC_RETURN;
} //ctor_...


bool init__Controller_ObjMod(Controller_ObjMod_s* thiz, uint32 const* xMeas, uint32 const* pid2) {

  bool bInit = true;
  //In the simulink data a handle is stored, in the generated struct it is a really pointer. Convert it:
  thiz->xMeas = PTR_Handle2Ptr( *xMeas, struct MeasPrep_ProgrSimpleExmplA_t);
  bInit &= (thiz->xMeas !=null);
  //In the simulink data a handle is stored, in the generated struct it is a really pointer. Convert it:
  thiz->pid2 = PTR_Handle2Ptr( *pid2, struct PIDf_Ctrl_emC_t);
  bInit &= (thiz->pid2 !=null);
  return bInit;
}



void step__Controller_ObjMod(Controller_ObjMod_s* thiz, float const* W, float const* xs, float const* yctrl, float const* Y) {

  memcpy(thiz->W, W, sizeof(thiz->W));//float
  memcpy(thiz->xs, xs, sizeof(thiz->xs));//float
  memcpy(thiz->yctrl, yctrl, sizeof(thiz->yctrl));//float
  memcpy(thiz->Y, Y, sizeof(thiz->Y));//float
}

