Clinton Lee Taylor / Mbed 2 deprecated WiFiLamp

Dependencies:   ESP8266_WebServer mbed

Fork of WiFiLamp by Sebastian Schocke

Revision:
20:f5a6527bfda6
Parent:
11:3ab606a42227
--- a/ESP8266_WebServer/ESP8266_WebServer.h	Mon Dec 29 21:00:26 2014 +0000
+++ b/ESP8266_WebServer/ESP8266_WebServer.h	Wed Dec 31 15:15:50 2014 +0000
@@ -1,6 +1,8 @@
 #include "mbed.h"
 #include <string>
 #include <map>
+#include <queue>
+#include <list>
 
 #ifndef _ESP8266_WEB_SERVER_H
 #define _ESP8266_WEB_SERVER_H
@@ -15,10 +17,14 @@
 {
     char httpMethod[64];
     char httpURI[512];
+    char* data;
+    Serial *debugSerial;
     
     public:
-        ESP8266_WebRequest(int linkID, const char* packet, Serial* debugSerial);
+        ESP8266_WebRequest(const char* packet, Serial* debug);
+        ~ESP8266_WebRequest();
         int LinkID;
+        void Read(void);
         std::string Method;
         std::string URI;
         std::map<std::string, std::string> Parameters;
@@ -30,19 +36,28 @@
     char buffer[1024];
     char reply[1024];
     char response[2048];
-    char* rxptr;
+    char reqBuffer[1024];
+    volatile char* rxptr;
+    volatile char* rxptrStored;
+    volatile bool reqMode;
+    volatile int ipdLen;
+    volatile int reqLen;
+    std::queue<ESP8266_WebRequest*, std::list<ESP8266_WebRequest*> > incoming;
     
     private:
         short data_waiting(void);
         short string_waiting(const char*);
         void readBuffer(void);
         void sendResponse(int linkID, int numBytes);
+        void queueRequest(void);
         
     public:
         Serial *debugSerial;
+        bool echoMode;
         
         ESP8266_WebServer(Serial *espUART);
         void rxint(void);
+        void debugBuffers(Serial* target);
         void Initialize(void);
         ESP8266_WebRequest* GetRequest(void);
         void SendError(int linkID, std::string error);