MBED_DEMOS / Mbed 2 deprecated mbed_mqtt_endpoint_ublox_ethernet

Dependencies:   C027 C12832 EthernetInterface StatusReporter LM75B MQTT-ansond endpoint_core endpoint_mqtt mbed-rtos mbed

Files at this revision

API Documentation at this revision

Comitter:
ansond
Date:
Tue Mar 11 17:23:02 2014 +0000
Parent:
93:e3b732068ae9
Child:
95:24e9557e13d6
Commit message:
updates

Changed in this revision

Definitions.h 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/Definitions.h	Tue Mar 11 16:57:33 2014 +0000
+++ b/Definitions.h	Tue Mar 11 17:23:02 2014 +0000
@@ -77,8 +77,8 @@
 #define IOC_RESPONSE_FAILED         "FAILED"
 
 // TEMP - until we get HTTPS with BasicAuth working in MBED...
-//#define GW_IPADDRESS                "192.168.1.191"     // work
-#define GW_IPADDRESS                "10.1.0.27"         // home
+#define GW_IPADDRESS                "192.168.1.191"     // work
+//#define GW_IPADDRESS                "10.1.0.27"         // home
 #define GW_REDIRECT_URL             "http://%s:8888/NSP-IOC-Gateway/IOCRestAPI"
 #define USE_GW_HTTP_REDIRECTOR      true                            // true - make http calls to IOC via GW, false - make http calls directly to IOC
 
--- a/IOCHTTPTransport.cpp	Tue Mar 11 16:57:33 2014 +0000
+++ b/IOCHTTPTransport.cpp	Tue Mar 11 17:23:02 2014 +0000
@@ -45,9 +45,11 @@
  
  // Load up our endpoint into the IOC
  bool IOCHTTPTransport::loadEndpoint(char *data,int data_length,char *result,int result_length) {
+    char *url = this->createIOCLoadURL();
     //this->logger()->log("loadEndpoint: %s",data); 
+    //this->logger()->log("loadEndpoint URL: %s",url); 
     data = this->packageData("POST",data,0);
-    return this->httpPost(this->createIOCLoadURL(),data,strlen(data),result,result_length); 
+    return this->httpPost(url,data,strlen(data),result,result_length); 
  }
  
  // update our endpoint with the IOC
--- a/MBEDEndpoint.cpp	Tue Mar 11 16:57:33 2014 +0000
+++ b/MBEDEndpoint.cpp	Tue Mar 11 17:23:02 2014 +0000
@@ -44,11 +44,12 @@
      if (success) this->initEndpointName();
      if (success) this->logger()->turnLEDBlue();
 #ifdef MAC_ADDRESS
-    extern char fmt_mac[RESOURCE_VALUE_LEN+1];
-    if (success)this->logger()->log("%s (MAC: %s)",ENDPOINT_VERSION_ANNOUNCE,fmt_mac);
+     extern char fmt_mac[RESOURCE_VALUE_LEN+1];
+     if (success)this->logger()->log("%s (MAC: %s)",ENDPOINT_VERSION_ANNOUNCE,fmt_mac);
 #else
      if (success)this->logger()->log(ENDPOINT_VERSION_ANNOUNCE);
 #endif
+     if (success)this->logger()->log("IOC Gateway IP Address: %s",GW_IPADDRESS);
      if (success) success = this->initializeEthernet(ethernet);
      if (success) this->logger()->turnLEDYellow();
      if (success)this->m_map = new MBEDToIOCResourceMap(error_handler);