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

  // PROGRAM private variables - TEMP, private and located variables
  __DECLARE_LOCATED(BOOL,NEXTSW)
  __DECLARE_LOCATED(BOOL,RESETSW)
  __DECLARE_LOCATED(BOOL,ORDER1)
  __DECLARE_LOCATED(BOOL,ORDER2)
  __DECLARE_LOCATED(BOOL,ORDER3)
  __DECLARE_LOCATED(BOOL,ORDER4)
  __DECLARE_LOCATED(BOOL,NOORDER1)
  __DECLARE_LOCATED(BOOL,TIMEUP1)
  __DECLARE_LOCATED(BOOL,TIMEUP2)
  __DECLARE_LOCATED(BOOL,TIMEUP3)
  __DECLARE_LOCATED(BOOL,TIMEUP4)
  TON TON0;
  TON TON1;
  TON TON2;
  TON TON3;

} MULTITIMEINORDER;

void MULTITIMEINORDER_init__(MULTITIMEINORDER *data__, BOOL retain);
// Code part
void MULTITIMEINORDER_body__(MULTITIMEINORDER *data__);
#endif //__POUS_H
