38 lines
602 B
C
38 lines
602 B
C
/*
|
|
* ModbusApp.h
|
|
*
|
|
* Created on: 01.05.2015
|
|
* Author: wn
|
|
*/
|
|
|
|
#ifndef MODBUSAPP_H_
|
|
#define MODBUSAPP_H_
|
|
|
|
#include "SimpleModbusMaster.h"
|
|
#include "Mudbus.h"
|
|
|
|
|
|
|
|
|
|
const uint32_t MODBUS_BAUD = 1200;
|
|
const uint16_t MODBUS_TIMEOUT = 10000;
|
|
const uint16_t MODBUS_SCANRATE = 1000;
|
|
const uint8_t MODBUS_RETRY_COUNT = 25;
|
|
const uint8_t MODBUS_TX_ENABLE_PIN = 2;
|
|
const uint8_t ZEROING_PIN = 3;
|
|
|
|
|
|
void modbusAppBegin(Mudbus *mb);
|
|
void modbusAppExec();
|
|
|
|
float getVoltage();
|
|
float getCurrent();
|
|
float getFrequency();
|
|
float getPower();
|
|
float getEnergy();
|
|
float getNewEnergy();
|
|
|
|
|
|
|
|
#endif /* MODBUSAPP_H_ */
|