PROJ515 / Mbed OS ELEC-351-GROUP-E-CW

Dependencies:   BMP280

Committer:
mwthewsey
Date:
Tue Jan 09 10:25:17 2018 +0000
Revision:
13:41c394fa932c
Parent:
9:ac5673cca703
Child:
19:40c721f01ed2
Serial,LCD,Sampling,SD,Web Working.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Swaggie 2:5a38ae8459d5 1 #ifndef __WebUI__
Swaggie 2:5a38ae8459d5 2 #define __WebUI__
Swaggie 2:5a38ae8459d5 3
mwthewsey 13:41c394fa932c 4 /*
mwthewsey 13:41c394fa932c 5 * This module handles the web interface. WebUISetup() is used to configure the
mwthewsey 13:41c394fa932c 6 * devices.
mwthewsey 13:41c394fa932c 7 * WebUIUpdate() must then be attached to a thread.
mwthewsey 13:41c394fa932c 8 * This will wait on receiving a connection, before grabbing the latest samples
mwthewsey 13:41c394fa932c 9 * and making these part of the HTML response.
mwthewsey 13:41c394fa932c 10 */
mwthewsey 9:ac5673cca703 11 #include <string>
mwthewsey 9:ac5673cca703 12 #include "EthernetInterface.h"
mwthewsey 9:ac5673cca703 13 #include "TCPServer.h"
mwthewsey 9:ac5673cca703 14 #include "TCPSocket.h"
mwthewsey 13:41c394fa932c 15 #include "TimeInterface.h"
mwthewsey 9:ac5673cca703 16 #include <iostream>
mwthewsey 9:ac5673cca703 17
mwthewsey 13:41c394fa932c 18 extern Thread WebThread;
mwthewsey 9:ac5673cca703 19 //Now setup a web server
mwthewsey 9:ac5673cca703 20 extern TCPServer srv; //TCP/IP Server
mwthewsey 9:ac5673cca703 21 extern TCPSocket clt_sock; //Socket for communication
mwthewsey 9:ac5673cca703 22 extern SocketAddress clt_addr; //Address of incoming connection
mwthewsey 13:41c394fa932c 23 extern float LDRVal; ///are these needed?!?!?!?!?!
mwthewsey 13:41c394fa932c 24 extern float TempVal;
mwthewsey 13:41c394fa932c 25 extern float Pressure;
mwthewsey 13:41c394fa932c 26 extern time_t theTime;
mwthewsey 9:ac5673cca703 27
Swaggie 2:5a38ae8459d5 28 void WebUISetup(void); //Configures the TCP server
Swaggie 2:5a38ae8459d5 29
mwthewsey 13:41c394fa932c 30 void WebUIUpdate(void); //Might be called as a string, but does have blocking currently.
Swaggie 2:5a38ae8459d5 31
Swaggie 2:5a38ae8459d5 32 #endif