#include "beremiz.h"
#ifndef __POUS_H
#define __POUS_H

#include "accessor.h"
#include "iec_std_lib.h"

__DECLARE_ENUMERATED_TYPE(LOGLEVEL,
  LOGLEVEL__CRITICAL,
  LOGLEVEL__WARNING,
  LOGLEVEL__INFO,
  LOGLEVEL__DEBUG
)
// FUNCTION_BLOCK LOGGER
// Data part
typedef struct {
  // FB Interface - IN, OUT, IN_OUT variables
  __DECLARE_VAR(BOOL,EN)
  __DECLARE_VAR(BOOL,ENO)
  __DECLARE_VAR(BOOL,TRIG)
  __DECLARE_VAR(STRING,MSG)
  __DECLARE_VAR(LOGLEVEL,LEVEL)

  // FB private variables - TEMP, private and located variables
  __DECLARE_VAR(BOOL,TRIG0)

} LOGGER;

void LOGGER_init__(LOGGER *data__, BOOL retain);
// Code part
void LOGGER_body__(LOGGER *data__);
// PROGRAM ASYNCHRO1
// Data part
typedef struct {
  // PROGRAM Interface - IN, OUT, IN_OUT variables

  // PROGRAM private variables - TEMP, private and located variables
  __DECLARE_LOCATED(BOOL,RESETSW)
  __DECLARE_LOCATED(BOOL,NEXTSW)
  __DECLARE_LOCATED(BOOL,ORDER1)
  __DECLARE_LOCATED(BOOL,ORDER2)
  __DECLARE_LOCATED(BOOL,ORDER3)
  __DECLARE_LOCATED(BOOL,ORDER4)
  __DECLARE_LOCATED(BOOL,SORDER1)
  __DECLARE_LOCATED(BOOL,SORDER2)
  __DECLARE_LOCATED(BOOL,SORDER3)
  __DECLARE_LOCATED(BOOL,SORDER4)
  __DECLARE_LOCATED(BOOL,TOGOUT0)
  __DECLARE_LOCATED(BOOL,TIMEUP1)
  __DECLARE_LOCATED(BOOL,TIMEUP2)
  __DECLARE_LOCATED(BOOL,TIMEUP3)
  __DECLARE_LOCATED(BOOL,TIMEUP4)
  __DECLARE_LOCATED(BOOL,NOORDER1)
  __DECLARE_LOCATED(BOOL,FIRST)
  __DECLARE_LOCATED(BOOL,SCDLY1)
  __DECLARE_LOCATED(BOOL,SCDLY2)
  __DECLARE_LOCATED(BOOL,SCDLY3)
  __DECLARE_LOCATED(BOOL,SCDLY4)
  __DECLARE_LOCATED(BOOL,TMOUT)
  __DECLARE_LOCATED(BOOL,RST0)
  TON TON0;
  TON TON1;
  TON TON2;
  TON TON3;
  TON TON4;
  R_TRIG R_TRIG1;
  R_TRIG R_TRIG2;
  R_TRIG R_TRIG3;
  R_TRIG R_TRIG4;
  R_TRIG R_TRIG5;
  R_TRIG R_TRIG6;
  R_TRIG R_TRIG7;
  R_TRIG R_TRIG8;
  R_TRIG R_TRIG9;
  R_TRIG R_TRIG10;
  R_TRIG R_TRIG11;
  R_TRIG R_TRIG12;
  R_TRIG R_TRIG13;
  R_TRIG R_TRIG14;

} ASYNCHRO1;

void ASYNCHRO1_init__(ASYNCHRO1 *data__, BOOL retain);
// Code part
void ASYNCHRO1_body__(ASYNCHRO1 *data__);
#endif //__POUS_H
