modbus-arduino  1.0.0
Modbus library for Arduino
ModbusIP_ESP8266AT.h
1 /*
2  ModbusIP_ESP8266AT.h - Header for Modbus IP ESP8266 AT Library
3  Copyright (C) 2015 AndrĂ© Sarmento Barbosa
4 */
5 #include <Arduino.h>
6 #include <Modbus.h>
7 #include <ESP8266.h>
8 
9 #ifndef MODBUSIP_ESP8266AT_H
10 #define MODBUSIP_ESP8266AT_H
11 
12 #define MODBUSIP_PORT 502
13 #define MODBUSIP_MAXFRAME 200
14 #define MODBUSIP_TIMEOUT 10
15 
16 
20 class ModbusIP : public Modbus {
21 #ifndef __DOXYGEN__
22  private:
23  byte _MBAP[7];
24  ESP8266* _wifi;
25  bool prev_conn;
26 #endif
27 
28  public:
32  ModbusIP();
39  void config(ESP8266 &wifi, String ssid, String password);
45  void task();
46 };
47 
48 #endif //MODBUSIP_ESP8266AT_H
49 
Modbus over TCP/IP network Class for Arduino Ethernet shield.
Definition: ModbusIP.h:22
ModbusIP()
Default constructor.
void config(uint8_t *mac)
Connect a ModbusIP object to a network.
void task()
Task that performs all operations on MODBUS.
Modbus base class.
Definition: Modbus.h:53