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

  // PROGRAM private variables - TEMP, private and located variables
  __DECLARE_LOCATED(BOOL,MOT1DRV)
  __DECLARE_LOCATED(BOOL,MOT1DIRECT)
  __DECLARE_LOCATED(BOOL,MOT2DRV)
  __DECLARE_LOCATED(BOOL,MOT2DIRECT)
  __DECLARE_LOCATED(BOOL,XFWD)
  __DECLARE_LOCATED(BOOL,XBWD)
  __DECLARE_LOCATED(BOOL,ZFWD)
  __DECLARE_LOCATED(BOOL,ZBWD)
  __DECLARE_LOCATED(BOOL,XFWSW)
  __DECLARE_LOCATED(BOOL,XBWSW)
  __DECLARE_LOCATED(BOOL,ZFWSW)
  __DECLARE_LOCATED(BOOL,ZBWSW)

} MOTORTEST;

void MOTORTEST_init__(MOTORTEST *data__, BOOL retain);
// Code part
void MOTORTEST_body__(MOTORTEST *data__);
#endif //__POUS_H
