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

  // PROGRAM private variables - TEMP, private and located variables
  __DECLARE_LOCATED(BOOL,PL0_0)
  __DECLARE_LOCATED(BOOL,PL0_1)
  __DECLARE_LOCATED(BOOL,PL0_2)
  __DECLARE_LOCATED(BOOL,PL1_0)
  __DECLARE_LOCATED(BOOL,PL1_1)
  __DECLARE_LOCATED(BOOL,PL1_2)
  __DECLARE_LOCATED(UINT,ANAIN0)
  __DECLARE_LOCATED(UINT,ANAIN1)
  __DECLARE_VAR(BOOL,_TMP_GE1_OUT)
  __DECLARE_VAR(BOOL,_TMP_GE6_OUT)
  __DECLARE_VAR(BOOL,_TMP_GE11_OUT)
  __DECLARE_VAR(BOOL,_TMP_LE16_OUT)
  __DECLARE_VAR(BOOL,_TMP_LT21_OUT)
  __DECLARE_VAR(BOOL,_TMP_LT26_OUT)

} ANALOGIN;

void ANALOGIN_init__(ANALOGIN *data__, BOOL retain);
// Code part
void ANALOGIN_body__(ANALOGIN *data__);
#endif //__POUS_H
