#ifndef _RTW_HEADER_WS_h_
#define _RTW_HEADER_WS_h_
#ifndef _WS_COMMON_INCLUDES_
# define _WS_COMMON_INCLUDES_
#include <stdlib.h>
#include <stddef.h>
#include <math.h>
#include <string.h>
#include "rtwtypes.h"
#endif

#include "WS_types.h"

#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm)        ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val)   ((rtm)->errorStatus = (val))
#endif

#ifndef rtmGetStopRequested
# define rtmGetStopRequested(rtm)      ((void*) 0)
#endif

typedef struct {
  real_T Fcn;
} rtB_SubsystemY_WS;

typedef struct {
  real_T Divide;
  real_T Divide1;
  real_T Fcn_a;
  real_T Fcn_c;
  real_T Switch8;
  real_T Sum;
  real_T Fcn_i;
  real_T Sum1;
  real_T Switch1;
  real_T Fcn10;
  real_T Switch;
  real_T Switch1_g;
  real_T Fcn3;
  real_T Fcn7;
  real_T Sum2;
  real_T Fcn1;
  real_T Sum3;
  real_T Switch_d;
  real_T Switch6;
  real_T Fcn_e;
  real_T Switch2;
  real_T Fcn12;
  real_T Switch_g;
  real_T Switch1_c;
  real_T Fcn13;
  real_T Fcn2;
  real_T Switch_c;
  real_T Switch1_m;
  real_T Fcn1_i;
  real_T Fcn8;
  real_T Switch_ck;
  real_T Switch1_d;
  real_T Fcn9;
  real_T Sum_k;
  real_T Fcn4;
  real_T Fcn_h;
  real_T Sum_d;
  real_T Gain;
  real_T Fcn5;
  real_T Sum1_m;
  real_T Fcn6;
  real_T Gain1;
  real_T Switch5;
  real_T Fcn10_j;
  real_T Switch_b;
  real_T Switch1_h;
  real_T Fcn3_c;
  real_T Fcn7_h;
  real_T Switch3;
  real_T Switch10;
  real_T Switch11;
  real_T Fcn12_o;
  real_T Switch_k;
  real_T Switch1_j;
  real_T Fcn13_n;
  real_T Fcn2_d;
  real_T Switch_o;
  real_T Switch1_ml;
  real_T Fcn1_m;
  real_T Fcn8_j;
  real_T Switch_gw;
  real_T Switch1_a;
  real_T Fcn9_i;
  real_T Sum_n;
  real_T Fcn4_c;
  real_T Sum1_e;
  real_T Gain_o;
  real_T Fcn5_b;
  real_T Sum1_g;
  real_T Fcn6_e;
  real_T Fcn_eu;
  real_T Gain1_e;
  real_T Switch7;
  real_T Gain3;
  real_T Switch4;
  real_T Gain_a;
  real_T Gain2;
  real_T Fcn1_h;
  real_T Xdata;
  real_T XEdata;
  real_T Ydata;
  real_T YEdata;
  real_T Zdata;
  real_T ZEdata;
  real_T Times_H;
  real_T XLdata;
  real_T XELdata;
  real_T YLdata;
  real_T YELdata;
  real_T ZLdata;
  real_T ZELdata;
  real_T Lcounter;
  real_T Timer_x;
  real_T Timer_y;
  real_T Timer_zr;
  real_T Timer_zl;
  real_T R1data;
  real_T R1Edata;
  real_T R2data;
  real_T R2Edata;
  real_T R3data;
  real_T R3Edata;
  real_T R3Ldata;
  real_T R3LEdata;
  real_T flag_data;
  real_T Timer_r1;
  real_T Switch9;
  real_T Switch8_d;
  real_T Gain2_c;
  rtB_SubsystemY_WS SubsystemZ;
  rtB_SubsystemY_WS SubsystemY;
} BlockIO_WS;

typedef struct {
  CSc1_WS_ChartStruct Chart2;
} D_Work_WS;

typedef struct {
  real_T tim_c;
  real_T side_dat;
  real_T hohaba_mm;
  real_T keridashi;
  real_T speed;
  real_T hosuu_dat;
  real_T koshi_h;
  real_T leg_hight;
  real_T kick_hight;
  real_T up_hight;
  real_T r_side;
  real_T l_side;
  real_T koshi_bend;
  real_T arm_bend;
  real_T kokan;
  real_T end_condition;
  real_T rl_cont;
  real_T fr_cont;
  real_T ybalance;
  real_T leg_leng;
  real_T xbalance;
  real_T kasoku;
  real_T koshi_kickup;
  real_T jump;
  real_T speed_m;
  real_T initial_kick;
  real_T shoki_y;
} ExternalInputs_WS;

typedef struct {
  real_T angle_dat[17];
  real_T w_flag;
  real_T hosuu;
} ExternalOutputs_WS;

struct RT_MODEL_WS {
  const char_T *errorStatus;
};

extern BlockIO_WS WS_B;
extern D_Work_WS WS_DWork;
extern ExternalInputs_WS WS_U;
extern ExternalOutputs_WS WS_Y;
extern void WS_initialize(boolean_T firstTime);
extern void WS_step(void);
extern void WS_terminate(void);
extern RT_MODEL_WS *WS_M;

#endif

