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

  // PROGRAM private variables - TEMP, private and located variables
  __DECLARE_LOCATED(BOOL,STATE1)
  __DECLARE_LOCATED(BOOL,STATE2)
  __DECLARE_LOCATED(BOOL,STATE3)
  __DECLARE_LOCATED(BOOL,JUDGE1)
  __DECLARE_LOCATED(BOOL,JUDGE2)
  __DECLARE_LOCATED(BOOL,JUDGE3)
  __DECLARE_LOCATED(BOOL,NOJUDGE)

} JUDGE_2;

void JUDGE_2_init__(JUDGE_2 *data__, BOOL retain);
// Code part
void JUDGE_2_body__(JUDGE_2 *data__);
#endif //__POUS_H
