custom for >5 resources
Fork of mbedConnectorInterface by
Diff: api/Utils.cpp
- Revision:
- 6:516a88842a2b
- Parent:
- 5:a929d65eb385
- Child:
- 7:09c5d9ae56cb
diff -r a929d65eb385 -r 516a88842a2b api/Utils.cpp --- a/api/Utils.cpp Wed Jan 28 14:43:46 2015 +0000 +++ b/api/Utils.cpp Wed Jan 28 17:33:31 2015 +0000 @@ -32,6 +32,7 @@ uint8_t NSP_address_bytes[NSP_IP_ADDRESS_LENGTH] = NSP_IP_ADDRESS; // which MDS instance we want to bind to... uint8_t endpoint_name[NODE_NAME_LENGTH] = NODE_NAME; // our NODE name +uint8_t domain_name[NSP_DOMAIN_LENGTH] = NSP_DOMAIN; // our MDS domain name uint8_t ep_type[NSP_ENDPOINT_TYPE_LENGTH] = NSP_ENDPOINT_TYPE; // our NODE type uint8_t lifetime_ptr[NSP_LIFE_TIME_LENGTH] = { NSP_LIFE_TIME }; // NSDL lifetime uint8_t app_MAC_address[NODE_MAC_ADDRESS_LENGTH] = NODE_MAC_ADDRESS; // Node MAC address @@ -66,6 +67,7 @@ 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(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