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

  // PROGRAM private variables - TEMP, private and located variables
  __DECLARE_LOCATED(BOOL,TRIG1)
  __DECLARE_LOCATED(BOOL,RESET)
  __DECLARE_LOCATED(BOOL,TRIG2)
  __DECLARE_LOCATED(BOOL,LOAD)
  __DECLARE_LOCATED(BOOL,CTOVER1)
  __DECLARE_LOCATED(BOOL,CTOVER2)
  __DECLARE_LOCATED(BOOL,ALWAYSON)
  CTU CTU0;
  CTD CTD0;
  R_TRIG R_TRIG1;
  R_TRIG R_TRIG2;

} COUNTERTEST1;

void COUNTERTEST1_init__(COUNTERTEST1 *data__, BOOL retain);
// Code part
void COUNTERTEST1_body__(COUNTERTEST1 *data__);
#endif //__POUS_H
