//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/ParamOptimizer_ObjMod.h> 


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


void ctor_ParamOptimizer_ObjMod(ParamOptimizer_ObjMod_s* thiz) {
  STACKTRC_ENTRY("ctor_ParamOptimizer_ObjMod");
    CTOR_ObjectJc(&thiz->base.object, thiz, sizeof(*thiz), refl_ParamOptimizer_ObjMod, 0);
  STACKTRC_RETURN;
} //ctor_...


bool init__ParamOptimizer_ObjMod(ParamOptimizer_ObjMod_s* thiz, float const* tune_fY12, uint32 const* par_PID) {

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



void step__ParamOptimizer_ObjMod(ParamOptimizer_ObjMod_s* thiz, float const* f_Y12, float const* reserve, float const* Ystim, bool const* checkEn) {

  thiz->f_Y12 = *f_Y12;
  thiz->reserve = *reserve;
  memcpy(thiz->Ystim, Ystim, sizeof(thiz->Ystim));//float
  thiz->checkEn = *checkEn;
}

