Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: NyFileSystems libMiMic mbed-rtos mbed
Fork of MiMicSimpleHttpd by
Revision 0:ec1e45489427, committed 2013-04-06
- Comitter:
- nyatla
- Date:
- Sat Apr 06 14:24:58 2013 +0000
- Child:
- 1:17ecb1647b64
- Commit message:
- backup;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libMiMic.lib Sat Apr 06 14:24:58 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/nyatla/code/libMiMic/#6d67db3875cb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sat Apr 06 14:24:58 2013 +0000
@@ -0,0 +1,46 @@
+#include "mimic.h"
+
+
+
+/**
+ * MiMic RemoteMCU httpd.<br/>
+ * <p>Service list</p>
+ * <pre>
+ * /rom/ - romfs
+ * /setup/ - MiMic configulation REST API.
+ * /local/ - mbed LocalFileSystem
+ * /mvm/ - MiMicVM REST API
+ * </pre>
+ */
+
+class MiMicRemoteMcu:public MiMic::Httpd
+{
+private:
+ ModUrl modurl; //basic URL parser
+public:
+ MiMicRemoteMcu():Httpd(80)
+ {
+ }
+ virtual void onRequest(HttpdConnection& i_connection)
+ {
+ char url[32];
+ int method;
+ //try to ModRomFS module.
+ if(this->modurl.execute(i_connection,url,32,&method)){
+ //Otherwise, Send the redirect response to /rom/index.html
+ i_connection.sendHeader(200,"text/html",NULL);
+ i_connection.sendBodyF("<html><body>Your Request path is %s.</body></html>",url);
+ return;
+ }
+ return;
+ }
+};
+
+int main()
+{
+ NetConfig cfg; //create network configulation
+ Net net(cfg); //create a net instance.
+ MiMicRemoteMcu httpd; //create a httpd instance.
+ httpd.loop(); //start httpd loop.
+ return 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rtos.lib Sat Apr 06 14:24:58 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-rtos/#53e6cccd8782
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Apr 06 14:24:58 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/5e5da4a5990b \ No newline at end of file
