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 TMINTPLS_init__(TMINTPLS *data__, BOOL retain) {
  __INIT_LOCATED(BOOL,__IX0_0,data__->TMSW0,retain)
  __INIT_LOCATED_VALUE(data__->TMSW0,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX0_1,data__->TMSW1,retain)
  __INIT_LOCATED_VALUE(data__->TMSW1,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX0_2,data__->TMSW2,retain)
  __INIT_LOCATED_VALUE(data__->TMSW2,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_0,data__->TMOUT0,retain)
  __INIT_LOCATED_VALUE(data__->TMOUT0,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_1,data__->TMOUT1,retain)
  __INIT_LOCATED_VALUE(data__->TMOUT1,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_2,data__->TMOUT2,retain)
  __INIT_LOCATED_VALUE(data__->TMOUT2,__BOOL_LITERAL(FALSE))
  TON_init__(&data__->TON0,retain);
  TP_init__(&data__->TP0,retain);
  TOF_init__(&data__->TOF0,retain);
}

// Code part
void TMINTPLS_body__(TMINTPLS *data__) {
  // Initialise TEMP variables

  __SET_VAR(data__->TON0.,IN,,__GET_LOCATED(data__->TMSW0,));
  __SET_VAR(data__->TON0.,PT,,__time_to_timespec(1, 0, 1, 0, 0, 0));
  TON_body__(&data__->TON0);
  __SET_LOCATED(data__->,TMOUT0,,__GET_VAR(data__->TON0.Q,));
  __SET_VAR(data__->TP0.,IN,,__GET_LOCATED(data__->TMSW1,));
  __SET_VAR(data__->TP0.,PT,,__time_to_timespec(1, 1000, 0, 0, 0, 0));
  TP_body__(&data__->TP0);
  __SET_LOCATED(data__->,TMOUT1,,__GET_VAR(data__->TP0.Q,));
  __SET_VAR(data__->TOF0.,IN,,__GET_LOCATED(data__->TMSW2,));
  __SET_VAR(data__->TOF0.,PT,,__time_to_timespec(1, 0, 0, 0.017, 0, 0));
  TOF_body__(&data__->TOF0);
  __SET_LOCATED(data__->,TMOUT2,,__GET_VAR(data__->TOF0.Q,));

  goto __end;

__end:
  return;
} // TMINTPLS_body__() 





