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:
134:58e7537a8c5f
Parent:
125:979332edc1c2
Child:
135:7f3f963cd159
--- a/Resource.cpp	Thu Mar 27 02:58:30 2014 +0000
+++ b/Resource.cpp	Fri Mar 28 16:24:12 2014 +0000
@@ -25,7 +25,7 @@
      this->m_io = NULL;
      memset(this->m_name,0,RESOURCE_NAME_LEN+1);
      memset(this->m_value,0,RESOURCE_VALUE_LEN+1);
-     memset(this->m_endpoint_name,0,LIGHT_NAME_LEN+1);
+     memset(this->m_endpoint_name,0,PERSONALITY_NAME_LEN+1);
      this->setName(name);
      this->setValue(value);
      this->setCallbackPointer(cb);
@@ -68,10 +68,10 @@
  // plumb the resource (base class does nothing other than save the endpoint_name)
  void Resource::plumb(char *ep_name,char *name) { 
     //this->logger()->log("Plumbing Resource - Endpoint: %s Resource: %s",ep_name,name);
-    memset(this->m_endpoint_name,0,LIGHT_NAME_LEN+1);
+    memset(this->m_endpoint_name,0,PERSONALITY_NAME_LEN+1);
     if (ep_name != NULL) {
-        memset(this->m_endpoint_name,0,LIGHT_NAME_LEN+1);
-        strncpy(this->m_endpoint_name,ep_name,this->min(LIGHT_NAME_LEN,strlen(ep_name))); 
+        memset(this->m_endpoint_name,0,PERSONALITY_NAME_LEN+1);
+        strncpy(this->m_endpoint_name,ep_name,this->min(PERSONALITY_NAME_LEN,strlen(ep_name))); 
     }
  }