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 INTERVALTOGGLE_init__(INTERVALTOGGLE *data__, BOOL retain) {
  __INIT_LOCATED(BOOL,__IX0_0,data__->SW0,retain)
  __INIT_LOCATED_VALUE(data__->SW0,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_0,data__->TOGOUT0,retain)
  __INIT_LOCATED_VALUE(data__->TOGOUT0,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX2_0,data__->RESET0,retain)
  __INIT_LOCATED_VALUE(data__->RESET0,__BOOL_LITERAL(FALSE))
  R_TRIG_init__(&data__->R_TRIG1,retain);
  R_TRIG_init__(&data__->R_TRIG2,retain);
}

// Code part
void INTERVALTOGGLE_body__(INTERVALTOGGLE *data__) {
  // Initialise TEMP variables

  __SET_VAR(data__->R_TRIG1.,CLK,,__GET_LOCATED(data__->SW0,));
  R_TRIG_body__(&data__->R_TRIG1);
  __SET_LOCATED(data__->,RESET0,,(__GET_LOCATED(data__->TOGOUT0,) && __GET_VAR(data__->R_TRIG1.Q,)));
  __SET_VAR(data__->R_TRIG2.,CLK,,__GET_LOCATED(data__->SW0,));
  R_TRIG_body__(&data__->R_TRIG2);
  __SET_LOCATED(data__->,TOGOUT0,,(!(__GET_LOCATED(data__->RESET0,)) && (__GET_VAR(data__->R_TRIG2.Q,) || __GET_LOCATED(data__->TOGOUT0,))));

  goto __end;

__end:
  return;
} // INTERVALTOGGLE_body__() 





