Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.
Obě strany předchozí revize Předchozí verze Následující verze | Předchozí verze | ||
2014:thermo-web [2015/01/19 06:23] Vojtěch Dluhý [Přílohy] |
2014:thermo-web [2015/01/19 06:49] (aktuální) Vojtěch Dluhý [Internetový teploměr s historií] |
||
---|---|---|---|
Řádek 1: | Řádek 1: | ||
====== Internetový teploměr s historií ====== | ====== Internetový teploměr s historií ====== | ||
- | [[xdluhy00@stud.feec.vutbr.cz|Vojtěch Dluhý]], //17.1.2015, 22:34// | + | [[xdluhy00@stud.feec.vutbr.cz|Vojtěch Dluhý]], //19.1.2015, 06:50// |
===== Zadání ===== | ===== Zadání ===== | ||
Řádek 200: | Řádek 200: | ||
{ | { | ||
Thread thread(ukladani_teploty); | Thread thread(ukladani_teploty); | ||
- | // Thread thread2(gener_grafu); | + | // Thread thread2(gener_grafu); //vlákno vytíží procesor tak, že již nic jiného neudělá |
| | ||
tmp.open(); | tmp.open(); | ||
Řádek 207: | Řádek 207: | ||
printf("Initializing\r\n"); | printf("Initializing\r\n"); | ||
- | // Check File System | + | // Kontrola systému souborů |
printf("Checking File System\r\n"); | printf("Checking File System\r\n"); | ||
DIR *d = opendir("/sd/"); | DIR *d = opendir("/sd/"); | ||
Řádek 216: | Řádek 216: | ||
} | } | ||
- | // EthernetInterface eth; | + | // Inicializace EthernetInterface eth; |
printf("Initializing Ethernet\r\n"); | printf("Initializing Ethernet\r\n"); | ||
Řádek 224: | Řádek 224: | ||
printf("IP Address is %s\r\n", eth.getIPAddress()); | printf("IP Address is %s\r\n", eth.getIPAddress()); | ||
- | // TCPSocketServer server; | + | // Spuštění TCPSocketServer serveru; |
server.bind(HTTPD_SERVER_PORT); | server.bind(HTTPD_SERVER_PORT); | ||
server.listen(); | server.listen(); | ||
Řádek 233: | Řádek 233: | ||
| | ||
server.accept(client); | server.accept(client); | ||
- | client.set_blocking(false, 1500); // Timeout after (1.5)s | + | client.set_blocking(false, 1500); // Timeout za 1.5 s |
- | | + | |
+ | // Tvorba index.html | ||
fp = fopen("/sd/index.html", "w"); | fp = fopen("/sd/index.html", "w"); | ||
if (fp == NULL) { | if (fp == NULL) { |