Webserver only w/o any other functions, single thread. Running on STM32F013+W5500

Dependencies:   NTPClient W5500Interface Watchdog device_configuration eeprom_flash mbed-rpc-nucleo mbed-rtos mbed

Fork of F103-Serial-to-Ethernet by Chau Vo

Committer:
olympux
Date:
Fri Aug 19 20:17:00 2016 +0000
Revision:
47:d92d2c5b8073
Parent:
40:c966abbe2d62
forked to create a new repo for webserver on F103+W5500. No other functions

Who changed what in which revision?

UserRevisionLine numberNew contents of line
olympux 40:c966abbe2d62 1 #ifndef FORMATTER
olympux 40:c966abbe2d62 2 #define FORMATTER
olympux 40:c966abbe2d62 3
olympux 40:c966abbe2d62 4 #include "EthernetInterface.h"
olympux 40:c966abbe2d62 5
olympux 40:c966abbe2d62 6 extern EthernetInterface eth;
olympux 40:c966abbe2d62 7
olympux 40:c966abbe2d62 8 class Formatter
olympux 40:c966abbe2d62 9 {
olympux 40:c966abbe2d62 10 public :
olympux 40:c966abbe2d62 11
olympux 40:c966abbe2d62 12 Formatter(int nbChunk = 1);
olympux 40:c966abbe2d62 13
olympux 40:c966abbe2d62 14 char* get_page(char *reply);
olympux 40:c966abbe2d62 15
olympux 40:c966abbe2d62 16 protected :
olympux 40:c966abbe2d62 17
olympux 40:c966abbe2d62 18 virtual void get_chunk(const int c, char *reply);
olympux 40:c966abbe2d62 19
olympux 40:c966abbe2d62 20 private :
olympux 40:c966abbe2d62 21
olympux 40:c966abbe2d62 22 int currentChunk;
olympux 40:c966abbe2d62 23 int nbChunk;
olympux 40:c966abbe2d62 24 };
olympux 40:c966abbe2d62 25
olympux 40:c966abbe2d62 26 class SimpleHTMLFormatter : public Formatter
olympux 40:c966abbe2d62 27 {
olympux 40:c966abbe2d62 28 public :
olympux 40:c966abbe2d62 29
olympux 40:c966abbe2d62 30 SimpleHTMLFormatter();
olympux 40:c966abbe2d62 31
olympux 40:c966abbe2d62 32 protected :
olympux 40:c966abbe2d62 33
olympux 40:c966abbe2d62 34 virtual void get_chunk(const int c, char *reply);
olympux 40:c966abbe2d62 35
olympux 40:c966abbe2d62 36 };
olympux 40:c966abbe2d62 37
olympux 40:c966abbe2d62 38 class InteractiveHTMLFormatter : public Formatter
olympux 40:c966abbe2d62 39 {
olympux 40:c966abbe2d62 40 public :
olympux 40:c966abbe2d62 41
olympux 40:c966abbe2d62 42 InteractiveHTMLFormatter();
olympux 40:c966abbe2d62 43
olympux 40:c966abbe2d62 44 protected :
olympux 40:c966abbe2d62 45
olympux 40:c966abbe2d62 46 virtual void get_chunk(const int c, char *reply);
olympux 40:c966abbe2d62 47 };
olympux 40:c966abbe2d62 48
olympux 40:c966abbe2d62 49
olympux 40:c966abbe2d62 50 #endif
olympux 40:c966abbe2d62 51