Core Base Classes for the Light Endpoints
Dependents: mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more
Diff: Light.cpp
- Revision:
- 115:4e13cc450568
- Parent:
- 105:759dee018363
- Child:
- 134:58e7537a8c5f
--- a/Light.cpp Wed Mar 19 03:30:37 2014 +0000 +++ b/Light.cpp Wed Mar 19 03:51:03 2014 +0000 @@ -193,7 +193,13 @@ } // set the IOC ID - void Light::setIOCID(int ioc_id) { this->m_ioc_id = ioc_id; } + void Light::setIOCID(int ioc_id) { + this->m_ioc_id = ioc_id; + char buffer[PREFERENCE_VALUE_LEN+1]; + memset(buffer,0,PREFERENCE_VALUE_LEN+1); + sprintf(buffer,"id:%d",ioc_id); + this->resources()->setResourceValue(IOC_LINKAGE_RESOURCE,buffer); + } // get the IOC ID int Light::getIOCID() { return this->m_ioc_id; }