nsp specific components for the NSP version of the impact endpoint

Dependents:   mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet mbed_nsp_endpoint_nxp

Revision:
6:edf306673e54
Parent:
4:7f7fe167d9c0
Child:
9:5ee9393f444e
--- a/NSPLightResourceFactory.cpp	Fri Mar 28 17:53:14 2014 +0000
+++ b/NSPLightResourceFactory.cpp	Mon Mar 31 19:13:10 2014 +0000
@@ -19,9 +19,10 @@
  // class support
  #include "NSPLightResourceFactory.h"
  
-  // Ethernet Interface
- #include "EthernetInterface.h"
- extern EthernetInterface ethernet;
+ #ifndef CELLULAR_NETWORK
+    #include "EthernetInterface.h"
+    extern EthernetInterface ethernet;
+ #endif
  
  // MBED supports GPS location observation 
  #include "gps.h"
@@ -85,7 +86,11 @@
     this->createResource(ep_name,"/dev/bat","5.0V",(void *)&battery_cb,(sn_grs_resource_acl_e)SN_GRS_GET_ALLOWED,(void *)&init_battery,(char *)NULL,"ipso:dev-bat");
     this->createResource(ep_name,"/sen/I","0.1",(void *)&current_cb,(sn_grs_resource_acl_e)SN_GRS_GET_ALLOWED,(void *)&init_current,(char *)NULL,"ucum:A");
     this->createResource(ep_name,"/dev/I","0.1",(void *)&current_cb,(sn_grs_resource_acl_e)SN_GRS_GET_ALLOWED,(void *)&init_current,(char *)NULL,"ucum:A");
+#ifndef CELLULAR_NETWORK
     this->createResource("/nw/ipaddr",ethernet.getIPAddress(),"core#s","ns:v4addr");
+#else
+    this->createResource("/nw/ipaddr","0.0.0.0","core#s","ns:v4addr");
+#endif
     this->createResource(ep_name,"/lt/0/dim","25",(void *)&dimmer_cb,(sn_grs_resource_acl_e)(SN_GRS_GET_ALLOWED|SN_GRS_PUT_ALLOWED),(void *)&init_dimmer,(char *)NULL,"ipso:lt-dim");    // Action: dim/brighten light
     this->createResource("/nw/eripaddr","N/A","core#s","ns:v4addr");
     this->createResource(ep_name,"/lt/0/on","1",(void *)&switch_cb,(sn_grs_resource_acl_e)(SN_GRS_GET_ALLOWED|SN_GRS_PUT_ALLOWED),(void *)&init_switch,(char *)NULL,"ipso:lt-on");       // Action: light on/off