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 WATASUP_init__(WATASUP *data__, BOOL retain) {
  __INIT_LOCATED(BOOL,__IX0_0,data__->SSLEVEL,retain)
  __INIT_LOCATED_VALUE(data__->SSLEVEL,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_0,data__->PUMPOUT,retain)
  __INIT_LOCATED_VALUE(data__->PUMPOUT,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX2_0,data__->STABLEON,retain)
  __INIT_LOCATED_VALUE(data__->STABLEON,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX2_1,data__->STSBLEOFF,retain)
  __INIT_LOCATED_VALUE(data__->STSBLEOFF,__BOOL_LITERAL(FALSE))
  TON_init__(&data__->TON0,retain);
  TON_init__(&data__->TON1,retain);
}

// Code part
void WATASUP_body__(WATASUP *data__) {
  // Initialise TEMP variables

  __SET_VAR(data__->TON0.,IN,,__GET_LOCATED(data__->SSLEVEL,));
  __SET_VAR(data__->TON0.,PT,,__time_to_timespec(1, 0, 2, 0, 0, 0));
  TON_body__(&data__->TON0);
  __SET_LOCATED(data__->,STABLEON,,__GET_VAR(data__->TON0.Q,));
  __SET_VAR(data__->TON1.,IN,,!(__GET_LOCATED(data__->SSLEVEL,)));
  __SET_VAR(data__->TON1.,PT,,__time_to_timespec(1, 0, 2, 0, 0, 0));
  TON_body__(&data__->TON1);
  __SET_LOCATED(data__->,STSBLEOFF,,__GET_VAR(data__->TON1.Q,));
  __SET_LOCATED(data__->,PUMPOUT,,(!(__GET_LOCATED(data__->STSBLEOFF,)) && (__GET_LOCATED(data__->PUMPOUT,) || __GET_LOCATED(data__->STABLEON,))));

  goto __end;

__end:
  return;
} // WATASUP_body__() 





