#ifndef __Controller_ObjMod_h__
#define __Controller_ObjMod_h__
#include <applstdef_emC.h>





struct MeasPrep_ProgrSimpleExmplA_t;
struct PIDf_Ctrl_emC_t;
typedef struct Controller_ObjMod_t {
  union { ObjectJc object; } base;

  float W[2];

  float xs[2];

  float yctrl[2];

  float Y[2];

  /**...Comment.
   * @acclevel=22.
   */
  struct MeasPrep_ProgrSimpleExmplA_t * xMeas;

  /**...Comment.
   * @acclevel=22.
   */
  struct PIDf_Ctrl_emC_t * pid2;
} Controller_ObjMod_s;

extern_C ClassJc const refl_Controller_ObjMod;

void ctor_Controller_ObjMod(Controller_ObjMod_s* thiz);


/**Write data to DataStruct. 
 * Note: The Simulink coder cannot decide whether it is a scalar, vector or pointer
 * Therefore all arguments are unique given as address (pointer) 
 */

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


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


inline void get_W_Controller_ObjMod(Controller_ObjMod_s* thiz, float* W) {
  memcpy(W, thiz->W, sizeof(thiz->W));//float
}

inline void get_xs_Controller_ObjMod(Controller_ObjMod_s* thiz, float* xs) {
  memcpy(xs, thiz->xs, sizeof(thiz->xs));//float
}

inline void get_yctrl_Controller_ObjMod(Controller_ObjMod_s* thiz, float* yctrl) {
  memcpy(yctrl, thiz->yctrl, sizeof(thiz->yctrl));//float
}

inline void get_Y_Controller_ObjMod(Controller_ObjMod_s* thiz, float* Y) {
  memcpy(Y, thiz->Y, sizeof(thiz->Y));//float
}

inline void get_xMeas_Controller_ObjMod(Controller_ObjMod_s* thiz, uint32* xMeas) {
  //In the simulink data a handle is stored, in the generated struct it is a really pointer. Convert it:
  *xMeas = HANDLE_Handle2Ptr(thiz->xMeas);
}

inline void get_pid2_Controller_ObjMod(Controller_ObjMod_s* thiz, uint32* pid2) {
  //In the simulink data a handle is stored, in the generated struct it is a really pointer. Convert it:
  *pid2 = HANDLE_Handle2Ptr(thiz->pid2);
}
#endif  //__Controller_ObjMod_h__
