Version 09/12/2016
Dependencies: EthernetInterface HTTPServer mbed-rpc mbed-rtos mbed
Revision 0:51b0b8c2af12, committed 2016-12-09
- Comitter:
- robt
- Date:
- Fri Dec 09 08:06:33 2016 +0000
- Commit message:
- Version 09/12/2016
Changed in this revision
diff -r 000000000000 -r 51b0b8c2af12 EthernetInterface.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/EthernetInterface.lib Fri Dec 09 08:06:33 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/EthernetInterface/#4d7bff17a592
diff -r 000000000000 -r 51b0b8c2af12 HTTPServer.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HTTPServer.lib Fri Dec 09 08:06:33 2016 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/leihen/code/HTTPServer/#cc3f5c53d0d5
diff -r 000000000000 -r 51b0b8c2af12 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Dec 09 08:06:33 2016 +0000 @@ -0,0 +1,26 @@ + +/* Program Example: 12.4 mbed file server setup + */ +#include "mbed.h" +#include "EthernetInterface.h" +#include "HTTPServer.h" +#include "FsHandler.h" + +EthernetInterface eth; // define Ethernet interface +LocalFileSystem fs("webfs"); // define Local file system +HTTPServer svr; // define HHTP server object + +int main() { + eth.init("192.168.1.101","255.255.255.0","192.168.1.1"); // initialise Ethernet + eth.connect(); // connect Ethernet + HTTPFsRequestHandler::mount("/webfs/", "/"); // mount file server handler + svr.addHandler<HTTPFsRequestHandler>("/"); // add handler to server object + svr.start(80, ð); // bind server to port 80 + while(1) + { + svr.poll(); // continuously poll for Ethernet messages to server + } +} + +// address to locate HOME.HTM +// http://192.168.1.101/HOME.HTM \ No newline at end of file
diff -r 000000000000 -r 51b0b8c2af12 mbed-rpc.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rpc.lib Fri Dec 09 08:06:33 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-rpc/#a6fe8e713f64
diff -r 000000000000 -r 51b0b8c2af12 mbed-rtos.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rtos.lib Fri Dec 09 08:06:33 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-rtos/#bdd541595fc5
diff -r 000000000000 -r 51b0b8c2af12 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Dec 09 08:06:33 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/99a22ba036c9 \ No newline at end of file