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:
10:62107616fc6c
Parent:
7:36ec6469949e
Child:
14:d4f8ab1e199a
--- 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);
+        }
+    }
 }
+