fork of chris cause ide is stupid

Dependencies:   Chainable_RGB_LED mbed mbedConnectorInterface mbedEndpointNetwork

Fork of Trail by Christopher Wu

Revision:
2:f72204758515
Parent:
1:b96a11b680dc
--- a/main.cpp	Fri May 22 00:39:20 2015 +0000
+++ b/main.cpp	Thu May 28 23:25:20 2015 +0000
@@ -63,20 +63,22 @@
 #include "SliderResource.h"
 SliderResource slider(&logger,"3202/0/5600", true); /* true if observable */
 
+// 3203 is analogue output
 #include "UV.h"
-UVResource uv(&logger,"3311/2/5706");
+UVResource uv(&logger,"uv");
 
+// 3303 is temperature IPSO
 #include "Temp.h"
-TempResource temp(&logger, "3311/3/5706");
+TempResource temp(&logger, "temp");
 
+// 3201 is digital output
 #include "Motion.h"
-MotionResource motion(&logger, "3311/4/5706");
+MotionResource motion(&logger, "motion");
 
 #include "mbed.h"
 
-
 // Set our own unique endpoint name
-#define MY_ENDPOINT_NAME                       "TrailTraffic"
+#define MY_ENDPOINT_NAME                       "trailtraffic"
 
 // My NSP Domain
 #define MY_NSP_DOMAIN                          "trail"                               
@@ -91,7 +93,10 @@
 {
     // Build the endpoint configuration parameters
     logger.log("configure_endpoint: building endpoint configuration...");
-    slider.setMaxAge(0); /* MaxAge = 0 to disable caching of the slide value in the Device Server */
+    /* MaxAge = 0 to disable caching of the slide value in the Device Server */
+    temp.setMaxAge(0);
+    uv.setMaxAge(0);
+    motion.setMaxAge(0);
     return config.setEndpointNodename(MY_ENDPOINT_NAME)                   // custom endpoint name
                  .setNSPAddress(my_nsp_address)                           // custom NSP address
                  .setDomain(MY_NSP_DOMAIN)                                // custom NSP domain
@@ -101,10 +106,7 @@
                  .addResource(&mfg)
                  .addResource(&model)
                                     
-                 // Add my specific physical dynamic resources...
-                 .addResource(&light)
-                 .addResource(&slider, 10000)
-                 .addResource(&led)
+                 // Add my specific physical dynamic resources
                  .addResource(&temp)
                  .addResource(&uv)
                  .addResource(&motion)
@@ -112,7 +114,6 @@
                  .build();
 }
 
-
 // main entry point...
 int main()
 {