SenseClient is an API to interact with Sen.se platform. Sen.se is the place where Humans, Machines, Objects, Environments, Information, Physical and Virtual spaces mix up, talk, intertwine, interact, enrich and empower each other.

Dependencies:   NetServicesProxy

Dependents:   SenseClientSample

Revision:
1:0249701444ee
Parent:
0:ed7287a3edbf
--- a/SenseClient.h	Tue Sep 06 13:31:10 2011 +0000
+++ b/SenseClient.h	Wed Jul 11 13:55:07 2012 +0000
@@ -18,6 +18,14 @@
 
 #include "mbed.h"
 #include "HTTPClient.h"
+#include "HTTPServer.h"
+#include "SenseHandler.h"
+
+
+
+
+// Helper macro to convert two-character hex strings to character value
+#define ToHex(Y) (Y>='0'&&Y<='9'?Y-'0':Y-'A'+10)
 
 /**
 * SenseClient is an API to interact with Sen.se platform. 
@@ -182,6 +190,24 @@
     * @returns The content payload.
     */
     HTTPText SenseClient::ResponseContent();
+    
+    /**
+    * Returns the given parameter value identified by its name from the given http query string.
+    *
+    * @return The parameter value 
+    * @param queryString The http query string
+    * @param name The parameter name
+    */
+    char* getParam(char *queryString, const char *name);
+    
+    /**
+    * Starts an http server to receive messages from sen.se platform. A function void parseEvent(char* content) MUST be defined in your main.
+    *
+    * @param port The port on which to start the http server
+    */
+    void startHttpServer(int port);
+    
+   
 
 private:
     HTTPText _jsonContent;
@@ -191,6 +217,9 @@
 
     HTTPResult _result;
     int _response;
+    
+    HTTPServer _svr;
+
 
 };