2020-06-12 15:28:35 +02:00
|
|
|
|
|
|
|
#ifndef WifiInterface_h
|
|
|
|
#define WifiInterface_h
|
|
|
|
#include "DCCEXParser.h"
|
2020-06-13 10:36:10 +02:00
|
|
|
#include "MemStream.h"
|
2020-06-13 16:53:46 +02:00
|
|
|
#include <Arduino.h>
|
|
|
|
#include <avr/pgmspace.h>
|
2020-06-12 15:28:35 +02:00
|
|
|
|
|
|
|
class WifiInterface {
|
|
|
|
|
|
|
|
public:
|
|
|
|
static void setup();
|
2020-06-13 10:36:10 +02:00
|
|
|
static void loop();
|
2020-06-12 15:28:35 +02:00
|
|
|
|
|
|
|
private:
|
2020-06-13 10:36:10 +02:00
|
|
|
static DCCEXParser parser;
|
2020-06-12 20:56:40 +02:00
|
|
|
static bool setup2();
|
2020-06-13 16:53:46 +02:00
|
|
|
static bool checkForOK( const int timeout, const char* waitfor, bool echo);
|
2020-06-12 15:28:35 +02:00
|
|
|
static bool connected;
|
2020-06-13 10:36:10 +02:00
|
|
|
static byte loopstate;
|
|
|
|
static int datalength;
|
|
|
|
static int connectionId;
|
|
|
|
static const byte MAX_WIFI_BUFFER=64;
|
|
|
|
static byte buffer[MAX_WIFI_BUFFER];
|
|
|
|
static MemStream streamer;
|
2020-06-12 15:28:35 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|