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:
28:52b7ca6aacd6
Parent:
26:791d22d43cb4
Child:
29:9a99f076129a
--- a/Light.cpp	Thu Feb 27 06:28:33 2014 +0000
+++ b/Light.cpp	Fri Feb 28 03:10:53 2014 +0000
@@ -28,6 +28,7 @@
      this->m_error_handler = error_handler;
      this->m_resources = ((MBEDEndpoint *)endpoint)->initResourceFactory();
      this->m_endpoint = endpoint;
+     this->m_ioc_id = 0;
      for(int i=0;i<NUM_TRANSPORTS;++i) this->m_transports[i] = transports[i];
      memset(this->m_name,0,LIGHT_NAME_LEN+1);
      sprintf(this->m_name,LIGHT_NAME,instance);
@@ -80,5 +81,12 @@
  // dim (base class does nothing)
  void Light::dim(int value) { ; }
  
+ // set the IOC ID
+ void Light::setIOCID(int ioc_id) { this->m_ioc_id = ioc_id; }
+ 
+ // get the IOC ID
+ int Light::getIOCID() { return this->m_ioc_id; }
+
+ 
  
  
\ No newline at end of file