mbed Connector Endpoint interface. This interface permits a mbed endpoint to easily setup MDS resources and emit those resources to an MDS server.

Dependents:   IoT_LED_demo ServoTest uWater_Project hackathon ... more

Revision:
7:09c5d9ae56cb
Parent:
6:516a88842a2b
Child:
8:b518d1c01df1
--- a/api/Utils.cpp	Wed Jan 28 17:33:31 2015 +0000
+++ b/api/Utils.cpp	Wed Jan 28 22:56:41 2015 +0000
@@ -66,9 +66,9 @@
     // with options, lets set the underlying NSDL globals...
     logger.log("configure_endpoint: updating external NSDL globals...");
     memcpy(NSP_address_bytes,options->getNSPAddress(),NSP_IP_ADDRESS_LENGTH);
-    memcpy(endpoint_name,options->getEndpointNodename().c_str(),NODE_NAME_LENGTH);
-    memcpy(domain_name,options->getDomain().c_str(),NSP_DOMAIN_LENGTH);
-    memcpy(ep_type,options->getEndpointType().c_str(),NSP_ENDPOINT_TYPE_LENGTH);
+    memcpy(endpoint_name,options->getEndpointNodename().c_str(),options->getEndpointNodename().size());
+    memcpy(domain_name,options->getDomain().c_str(),options->getDomain().size());
+    memcpy(ep_type,options->getEndpointType().c_str(),options->getEndpointType().size());
     memcpy(lifetime_ptr,options->getLifetime(),NSP_LIFE_TIME_LENGTH);
     memcpy(app_MAC_address,options->getMACAddress(),NODE_MAC_ADDRESS_LENGTH); // TODO: arm_ns_tasklet_create() should call Endpoint::plumbNetwork()... currently its called before this MAC address can be (re)set
     channel_list = options->getRadioChannelList();