custom for >5 resources

Fork of mbedConnectorInterface by Doug Anson

Revision:
11:c1b2b4b6c341
Parent:
8:b518d1c01df1
Child:
14:5cfaeee144bc
--- a/api/Utils.cpp	Sun Feb 01 18:43:09 2015 +0000
+++ b/api/Utils.cpp	Mon Feb 02 06:12:17 2015 +0000
@@ -33,6 +33,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
+int nsp_port = NSP_COAP_UDP_PORT;                                      // our MDS UDP port
 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
@@ -68,6 +69,7 @@
     memcpy(NSP_address_bytes,options->getNSPAddress(),NSP_IP_ADDRESS_LENGTH);
     memcpy(endpoint_name,options->getEndpointNodename().c_str(),options->getEndpointNodename().size());
     memcpy(domain_name,options->getDomain().c_str(),options->getDomain().size());
+    nsp_port = options->getNSPPortNumber();
     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