Core Base Classes for the Light Endpoints

Dependencies:   BufferedSerial

Dependents:   mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more

Revision:
135:7f3f963cd159
Parent:
104:7a96a9a7cafb
Child:
142:b7a75144b0f1
--- a/PhilipsLight.cpp	Fri Mar 28 16:24:12 2014 +0000
+++ b/PhilipsLight.cpp	Fri Mar 28 17:49:10 2014 +0000
@@ -20,11 +20,10 @@
  #include "HTTPTransport.h"
   
  // default constructor
- PhilipsLight::PhilipsLight(int id,void *transport,ErrorHandler *error_handler) {
+ PhilipsLight::PhilipsLight(int id,void *transport,ErrorHandler *error_handler) : BaseClass(error_handler,NULL) {
      this->m_id = id;
      this->m_state = PL_DEFAULT_STATE;
      this->m_dim = PL_DEFAULT_DIM;
-     this->m_error_handler = error_handler;
      memset(this->m_url,0,PL_URL_BUFFER_LEN+1);
      memset(this->m_payload,0,PL_PAYLOAD_BUFFER_LEN+1);
      memset(this->m_response,0,PL_RESPONSE_BUFFER_LEN+1);
@@ -74,7 +73,4 @@
      if (success) this->logger()->log("Philips Light: %d updated successfully",this->m_id);
      //else this->logger()->log("Philips Light: %d update FAILED.",this->m_id);
      //this->logger()->log("Philips Light: Response: %s",this->m_response);
- }
- 
- // get the error handler
- ErrorHandler *PhilipsLight::logger() { return this->m_error_handler; }
+ }
\ No newline at end of file