void LOGGER_init__(LOGGER *data__, BOOL retain) {
  __INIT_VAR(data__->EN,__BOOL_LITERAL(TRUE),retain)
  __INIT_VAR(data__->ENO,__BOOL_LITERAL(TRUE),retain)
  __INIT_VAR(data__->TRIG,__BOOL_LITERAL(FALSE),retain)
  __INIT_VAR(data__->MSG,__STRING_LITERAL(0,""),retain)
  __INIT_VAR(data__->LEVEL,LOGLEVEL__INFO,retain)
  __INIT_VAR(data__->TRIG0,__BOOL_LITERAL(FALSE),retain)
}

// Code part
void LOGGER_body__(LOGGER *data__) {
  // Control execution
  if (!__GET_VAR(data__->EN)) {
    __SET_VAR(data__->,ENO,,__BOOL_LITERAL(FALSE));
    return;
  }
  else {
    __SET_VAR(data__->,ENO,,__BOOL_LITERAL(TRUE));
  }
  // Initialise TEMP variables

  if ((__GET_VAR(data__->TRIG,) && !(__GET_VAR(data__->TRIG0,)))) {
    #define GetFbVar(var,...) __GET_VAR(data__->var,__VA_ARGS__)
    #define SetFbVar(var,val,...) __SET_VAR(data__->,var,__VA_ARGS__,val)

   LogMessage(GetFbVar(LEVEL),(char*)GetFbVar(MSG, .body),GetFbVar(MSG, .len));
  
    #undef GetFbVar
    #undef SetFbVar
;
  };
  __SET_VAR(data__->,TRIG0,,__GET_VAR(data__->TRIG,));

  goto __end;

__end:
  return;
} // LOGGER_body__() 





void JUDGE_HOLD_init__(JUDGE_HOLD *data__, BOOL retain) {
  __INIT_LOCATED(BOOL,__IX0_0,data__->HOLDSW,retain)
  __INIT_LOCATED_VALUE(data__->HOLDSW,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX0_1,data__->RESETSW,retain)
  __INIT_LOCATED_VALUE(data__->RESETSW,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX0_2,data__->STATESW,retain)
  __INIT_LOCATED_VALUE(data__->STATESW,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_0,data__->INHOLD,retain)
  __INIT_LOCATED_VALUE(data__->INHOLD,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_1,data__->JUDGE1,retain)
  __INIT_LOCATED_VALUE(data__->JUDGE1,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_2,data__->JUDGE2,retain)
  __INIT_LOCATED_VALUE(data__->JUDGE2,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX2_0,data__->FALLASSIST,retain)
  __INIT_LOCATED_VALUE(data__->FALLASSIST,__BOOL_LITERAL(FALSE))
  F_TRIG_init__(&data__->F_TRIG1,retain);
  R_TRIG_init__(&data__->R_TRIG1,retain);
  R_TRIG_init__(&data__->R_TRIG2,retain);
}

// Code part
void JUDGE_HOLD_body__(JUDGE_HOLD *data__) {
  // Initialise TEMP variables

  __SET_LOCATED(data__->,INHOLD,,(!(__GET_LOCATED(data__->RESETSW,)) && (__GET_LOCATED(data__->HOLDSW,) || __GET_LOCATED(data__->INHOLD,))));
  __SET_VAR(data__->F_TRIG1.,CLK,,__GET_LOCATED(data__->INHOLD,));
  F_TRIG_body__(&data__->F_TRIG1);
  __SET_LOCATED(data__->,FALLASSIST,,__GET_VAR(data__->F_TRIG1.Q,));
  __SET_VAR(data__->R_TRIG1.,CLK,,__GET_LOCATED(data__->INHOLD,));
  R_TRIG_body__(&data__->R_TRIG1);
  __SET_LOCATED(data__->,JUDGE1,,(!(__GET_LOCATED(data__->FALLASSIST,)) && (__GET_LOCATED(data__->JUDGE1,) || (__GET_LOCATED(data__->STATESW,) && __GET_VAR(data__->R_TRIG1.Q,)))));
  __SET_VAR(data__->R_TRIG2.,CLK,,__GET_LOCATED(data__->INHOLD,));
  R_TRIG_body__(&data__->R_TRIG2);
  __SET_LOCATED(data__->,JUDGE2,,(!(__GET_LOCATED(data__->FALLASSIST,)) && (__GET_LOCATED(data__->JUDGE2,) || (!(__GET_LOCATED(data__->STATESW,)) && __GET_VAR(data__->R_TRIG2.Q,)))));

  goto __end;

__end:
  return;
} // JUDGE_HOLD_body__() 





