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 MOTORTEST_init__(MOTORTEST *data__, BOOL retain) {
  __INIT_LOCATED(BOOL,__QX0_3,data__->MOT1DRV,retain)
  __INIT_LOCATED_VALUE(data__->MOT1DRV,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_4,data__->MOT1DIRECT,retain)
  __INIT_LOCATED_VALUE(data__->MOT1DIRECT,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_5,data__->MOT2DRV,retain)
  __INIT_LOCATED_VALUE(data__->MOT2DRV,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX0_6,data__->MOT2DIRECT,retain)
  __INIT_LOCATED_VALUE(data__->MOT2DIRECT,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX2_0,data__->XFWD,retain)
  __INIT_LOCATED_VALUE(data__->XFWD,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX2_1,data__->XBWD,retain)
  __INIT_LOCATED_VALUE(data__->XBWD,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX2_2,data__->ZFWD,retain)
  __INIT_LOCATED_VALUE(data__->ZFWD,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__QX2_3,data__->ZBWD,retain)
  __INIT_LOCATED_VALUE(data__->ZBWD,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX0_5,data__->XFWSW,retain)
  __INIT_LOCATED_VALUE(data__->XFWSW,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX0_6,data__->XBWSW,retain)
  __INIT_LOCATED_VALUE(data__->XBWSW,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX0_7,data__->ZFWSW,retain)
  __INIT_LOCATED_VALUE(data__->ZFWSW,__BOOL_LITERAL(FALSE))
  __INIT_LOCATED(BOOL,__IX1_0,data__->ZBWSW,retain)
  __INIT_LOCATED_VALUE(data__->ZBWSW,__BOOL_LITERAL(FALSE))
}

// Code part
void MOTORTEST_body__(MOTORTEST *data__) {
  // Initialise TEMP variables

  __SET_LOCATED(data__->,XFWD,,__GET_LOCATED(data__->XFWSW,));
  __SET_LOCATED(data__->,XBWD,,__GET_LOCATED(data__->XBWSW,));
  __SET_LOCATED(data__->,MOT1DRV,,(__GET_LOCATED(data__->XBWD,) || __GET_LOCATED(data__->XFWD,)));
  __SET_LOCATED(data__->,MOT1DIRECT,,__GET_LOCATED(data__->XBWD,));
  __SET_LOCATED(data__->,ZFWD,,__GET_LOCATED(data__->ZFWSW,));
  __SET_LOCATED(data__->,ZBWD,,__GET_LOCATED(data__->ZBWSW,));
  __SET_LOCATED(data__->,MOT2DRV,,(__GET_LOCATED(data__->ZBWD,) || __GET_LOCATED(data__->ZFWD,)));
  __SET_LOCATED(data__->,MOT2DIRECT,,__GET_LOCATED(data__->ZBWD,));

  goto __end;

__end:
  return;
} // MOTORTEST_body__() 





