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

  // PROGRAM private variables - TEMP, private and located variables
  __DECLARE_LOCATED(BOOL,S0)
  __DECLARE_LOCATED(BOOL,S1)
  __DECLARE_LOCATED(BOOL,S2)
  __DECLARE_LOCATED(BOOL,S3)
  __DECLARE_LOCATED(BOOL,S4)
  __DECLARE_LOCATED(BOOL,S5)
  __DECLARE_LOCATED(BOOL,S6)
  __DECLARE_LOCATED(BOOL,S7)
  __DECLARE_LOCATED(BOOL,S8)
  __DECLARE_LOCATED(BOOL,L0)
  __DECLARE_LOCATED(BOOL,L1)
  __DECLARE_LOCATED(BOOL,L2)
  __DECLARE_LOCATED(BOOL,L3)
  __DECLARE_LOCATED(BOOL,L4)
  __DECLARE_LOCATED(BOOL,L5)
  __DECLARE_LOCATED(BOOL,L6)
  __DECLARE_LOCATED(BOOL,L7)
  __DECLARE_LOCATED(BOOL,L8)
  __DECLARE_LOCATED(BOOL,L9)
  __DECLARE_LOCATED(BOOL,M0)
  __DECLARE_LOCATED(BOOL,M1)
  __DECLARE_LOCATED(BOOL,M2)
  __DECLARE_LOCATED(BOOL,M3)
  __DECLARE_LOCATED(BOOL,M4)
  __DECLARE_LOCATED(BOOL,M5)
  __DECLARE_LOCATED(BOOL,M6)
  __DECLARE_LOCATED(BOOL,M7)

} OR1;

void OR1_init__(OR1 *data__, BOOL retain);
// Code part
void OR1_body__(OR1 *data__);
#endif //__POUS_H
