#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 HARDCHECK
// Data part
typedef struct {
  // PROGRAM Interface - IN, OUT, IN_OUT variables

  // PROGRAM private variables - TEMP, private and located variables
  __DECLARE_LOCATED(BOOL,SW1)
  __DECLARE_LOCATED(BOOL,SW2)
  __DECLARE_LOCATED(BOOL,SW3)
  __DECLARE_LOCATED(BOOL,SW4)
  __DECLARE_LOCATED(BOOL,SW5)
  __DECLARE_LOCATED(BOOL,SW6)
  __DECLARE_LOCATED(BOOL,SW7)
  __DECLARE_LOCATED(BOOL,SW8)
  __DECLARE_LOCATED(BOOL,SW9)
  __DECLARE_LOCATED(BOOL,D1)
  __DECLARE_LOCATED(BOOL,D2)
  __DECLARE_LOCATED(BOOL,D3)
  __DECLARE_LOCATED(BOOL,D4)
  __DECLARE_LOCATED(BOOL,D5)
  __DECLARE_LOCATED(BOOL,D6)
  __DECLARE_LOCATED(BOOL,D7)
  __DECLARE_LOCATED(BOOL,D8)
  __DECLARE_LOCATED(BOOL,D9)
  __DECLARE_LOCATED(BOOL,D10)
  __DECLARE_LOCATED(WORD,AIN1)
  __DECLARE_LOCATED(WORD,AIN2)
  __DECLARE_LOCATED(WORD,AOUT1)
  __DECLARE_LOCATED(WORD,AOUT2)
  TON TON0;
  __DECLARE_VAR(BOOL,_TMP_MOVE43_ENO)
  __DECLARE_VAR(WORD,_TMP_MOVE43_OUT)
  __DECLARE_VAR(BOOL,_TMP_MOVE46_ENO)
  __DECLARE_VAR(WORD,_TMP_MOVE46_OUT)

} HARDCHECK;

void HARDCHECK_init__(HARDCHECK *data__, BOOL retain);
// Code part
void HARDCHECK_body__(HARDCHECK *data__);
#endif //__POUS_H
