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 MULTITIMEINORDER_init__(MULTITIMEINORDER *data__, BOOL retain) {
  __INIT_LOCATED(BOOL,__IX0_0,data__->NEXTSW,retain)
  __INIT_LOCATED_VALUE(data__->NEXTSW,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX0_1,data__->RESETSW,retain)
  __INIT_LOCATED_VALUE(data__->RESETSW,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_0,data__->ORDER1,retain)
  __INIT_LOCATED_VALUE(data__->ORDER1,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_1,data__->ORDER2,retain)
  __INIT_LOCATED_VALUE(data__->ORDER2,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_2,data__->ORDER3,retain)
  __INIT_LOCATED_VALUE(data__->ORDER3,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_3,data__->ORDER4,retain)
  __INIT_LOCATED_VALUE(data__->ORDER4,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX1_1,data__->NOORDER1,retain)
  __INIT_LOCATED_VALUE(data__->NOORDER1,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX2_0,data__->TIMEUP1,retain)
  __INIT_LOCATED_VALUE(data__->TIMEUP1,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX2_1,data__->TIMEUP2,retain)
  __INIT_LOCATED_VALUE(data__->TIMEUP2,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX2_2,data__->TIMEUP3,retain)
  __INIT_LOCATED_VALUE(data__->TIMEUP3,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX2_3,data__->TIMEUP4,retain)
  __INIT_LOCATED_VALUE(data__->TIMEUP4,__BOOL_LITERAL(FALSE))
  TON_init__(&data__->TON0,retain);
  TON_init__(&data__->TON1,retain);
  TON_init__(&data__->TON2,retain);
  TON_init__(&data__->TON3,retain);
}

// Code part
void MULTITIMEINORDER_body__(MULTITIMEINORDER *data__) {
  // Initialise TEMP variables

  __SET_LOCATED(data__->,NOORDER1,,(((!(__GET_LOCATED(data__->ORDER4,)) && !(__GET_LOCATED(data__->ORDER3,))) && !(__GET_LOCATED(data__->ORDER2,))) && !(__GET_LOCATED(data__->ORDER1,))));
  __SET_LOCATED(data__->,ORDER1,,((!(__GET_LOCATED(data__->RESETSW,)) && !(__GET_LOCATED(data__->TIMEUP1,))) && ((__GET_LOCATED(data__->NOORDER1,) || __GET_LOCATED(data__->ORDER1,)) || __GET_LOCATED(data__->TIMEUP4,))));
  __SET_VAR(data__->TON0.,IN,,((!(__GET_LOCATED(data__->RESETSW,)) && !(__GET_LOCATED(data__->TIMEUP1,))) && ((__GET_LOCATED(data__->NOORDER1,) || __GET_LOCATED(data__->ORDER1,)) || __GET_LOCATED(data__->TIMEUP4,))));
  __SET_VAR(data__->TON0.,PT,,__time_to_timespec(1, 0, 1, 0, 0, 0));
  TON_body__(&data__->TON0);
  __SET_LOCATED(data__->,TIMEUP1,,__GET_VAR(data__->TON0.Q,));
  __SET_LOCATED(data__->,ORDER2,,((!(__GET_LOCATED(data__->RESETSW,)) && !(__GET_LOCATED(data__->TIMEUP2,))) && (__GET_LOCATED(data__->ORDER2,) || __GET_LOCATED(data__->TIMEUP1,))));
  __SET_VAR(data__->TON1.,IN,,((!(__GET_LOCATED(data__->RESETSW,)) && !(__GET_LOCATED(data__->TIMEUP2,))) && (__GET_LOCATED(data__->ORDER2,) || __GET_LOCATED(data__->TIMEUP1,))));
  __SET_VAR(data__->TON1.,PT,,__time_to_timespec(1, 0, 2, 0, 0, 0));
  TON_body__(&data__->TON1);
  __SET_LOCATED(data__->,TIMEUP2,,__GET_VAR(data__->TON1.Q,));
  __SET_LOCATED(data__->,ORDER3,,((!(__GET_LOCATED(data__->RESETSW,)) && !(__GET_LOCATED(data__->TIMEUP3,))) && (__GET_LOCATED(data__->ORDER3,) || __GET_LOCATED(data__->TIMEUP2,))));
  __SET_VAR(data__->TON2.,IN,,((!(__GET_LOCATED(data__->RESETSW,)) && !(__GET_LOCATED(data__->TIMEUP3,))) && (__GET_LOCATED(data__->ORDER3,) || __GET_LOCATED(data__->TIMEUP2,))));
  __SET_VAR(data__->TON2.,PT,,__time_to_timespec(1, 0, 1.5, 0, 0, 0));
  TON_body__(&data__->TON2);
  __SET_LOCATED(data__->,TIMEUP3,,__GET_VAR(data__->TON2.Q,));
  __SET_LOCATED(data__->,ORDER4,,((!(__GET_LOCATED(data__->RESETSW,)) && !(__GET_LOCATED(data__->TIMEUP4,))) && (__GET_LOCATED(data__->ORDER4,) || __GET_LOCATED(data__->TIMEUP3,))));
  __SET_VAR(data__->TON3.,IN,,((!(__GET_LOCATED(data__->RESETSW,)) && !(__GET_LOCATED(data__->TIMEUP4,))) && (__GET_LOCATED(data__->ORDER4,) || __GET_LOCATED(data__->TIMEUP3,))));
  __SET_VAR(data__->TON3.,PT,,__time_to_timespec(1, 0, 2.5, 0, 0, 0));
  TON_body__(&data__->TON3);
  __SET_LOCATED(data__->,TIMEUP4,,__GET_VAR(data__->TON3.Q,));

  goto __end;

__end:
  return;
} // MULTITIMEINORDER_body__() 





