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: ResourceFactory.cpp
- Revision:
- 10:62107616fc6c
- Parent:
- 7:36ec6469949e
- Child:
- 14:d4f8ab1e199a
diff -r 90fadae5489a -r 62107616fc6c ResourceFactory.cpp --- a/ResourceFactory.cpp Tue Feb 25 05:27:29 2014 +0000 +++ b/ResourceFactory.cpp Tue Feb 25 07:33:45 2014 +0000 @@ -56,4 +56,18 @@ } return value; + } + + // set a resource value + void ResourceFactory::setResourceValue(char *name, char *value) { + bool found = false; + + // loop through the resource list + for(int i=0;i<this->m_list.size() && !found;++i) { + if (strcmp(this->m_list[i].getName(),name) == 0) { + found = true; + this->m_list[i].setValue(value); + } + } } +