mqtt specific components for the impact mbed endpoint library

Dependents:   mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_mqtt_endpoint_nxp

Files at this revision

API Documentation at this revision

Comitter:
ansond
Date:
Sat Apr 12 06:34:39 2014 +0000
Parent:
35:30b5f17896c6
Child:
37:4964678adb8b
Commit message:
updates

Changed in this revision

IOCEndpoint.cpp Show annotated file Show diff for this revision Revisions of this file
IOCHTTPTransport.cpp Show annotated file Show diff for this revision Revisions of this file
MBEDEndpoint.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/IOCEndpoint.cpp	Fri Apr 11 17:14:51 2014 +0000
+++ b/IOCEndpoint.cpp	Sat Apr 12 06:34:39 2014 +0000
@@ -62,6 +62,10 @@
                  else {
                      // IOC expects "Point(X,Y)" for LOCATION
                      sprintf(tmp, "\"%s\":\"Point(%s)\",",name,value); 
+                     
+                     // remove any commas
+                     int len = strlen(tmp);
+                     for(int i=0;i<len;++i) if(tmp[i] == ',') tmp[i] = ' ';
                  }   
                  strcat(data,tmp);
             
--- a/IOCHTTPTransport.cpp	Fri Apr 11 17:14:51 2014 +0000
+++ b/IOCHTTPTransport.cpp	Sat Apr 12 06:34:39 2014 +0000
@@ -92,12 +92,14 @@
  // HTTP Put
  bool IOCHTTPTransport::httpPut(char *url,char *data,int data_length,char *result,int result_length) {
      this->m_http->basicAuth(IOC_USERNAME,IOC_PASSWORD);
+     //this->logger()->log("httpPut: URL: %s  DATA: %s",url,data);
      return HTTPTransport::httpPut(url,data,data_length,result,result_length);
  }
  
  // HTTP Post
  bool IOCHTTPTransport::httpPost(char *url,char *data,int data_length,char *result,int result_length) {
      this->m_http->basicAuth(IOC_USERNAME,IOC_PASSWORD);
+     //this->logger()->log("httpPost: URL: %s  DATA: %s",url,data);
      return HTTPTransport::httpPost(url,data,data_length,result,result_length);
  }
  
--- a/MBEDEndpoint.cpp	Fri Apr 11 17:14:51 2014 +0000
+++ b/MBEDEndpoint.cpp	Sat Apr 12 06:34:39 2014 +0000
@@ -386,9 +386,9 @@
      // build the payload
      char *data = NULL;
 
-#ifdef LIGHT_PERSONALITY     
+//#ifdef LIGHT_PERSONALITY     
      data = ((IOCEndpoint *)this->getEndpoint())->buildLightPayload(payload,IOC_PAYLOAD_LEN,(Light *)instance);
-#endif
+//#endif
 
      // issue the request  
      if (data != NULL && strlen(data) > 0) {