]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
document this app a bit
authorregehr <regehr>
Thu, 3 Jul 2008 18:41:36 +0000 (18:41 +0000)
committerregehr <regehr>
Thu, 3 Jul 2008 18:41:36 +0000 (18:41 +0000)
apps/tutorials/BlinkFail/BlinkFailAppC.nc
apps/tutorials/BlinkFail/BlinkFailC.nc
apps/tutorials/BlinkFail/README.txt

index 9cd663e38aea3ddea288cf92c12d28e3c8f87a39..5bad2248929aa8dc945b85e77e38d0118ce28087 100644 (file)
@@ -30,9 +30,9 @@
  */
 
 /**
- * Blink is a basic application that toggles the a mote LED periodically.
- * It does so by starting a Timer that fires every second. It uses the
- * OSKI TimerMilli service to achieve this goal.
+ * BlinkFail is a basic application that toggles the a mote LED periodically and
+ * then accesses out of bounds storage as a demonstration and sanity check for
+ * Safe TinyOS.
  *
  * @author tinyos-help@millennium.berkeley.edu
  **/
index 76ea293d5cc6aa4d5e60201bf3c2e4c06f46e104..e27d221a17fad0e9c95196d87259799699333a92 100644 (file)
@@ -30,8 +30,8 @@
  */
 
 /**
- * Implementation for Blink application.  Toggle the red LED when a
- * Timer fires.
+ * Implementation for BlinkFail application.  Toggle the LEDs when a
+ * Timer fires.  Access out of bounds storage after a few seconds.
  **/
 
 #include "Timer.h"
@@ -66,6 +66,7 @@ implementation
   {
     dbg("BlinkFailC", "Timer 1 fired @ %s \n", sim_time_string());
     call Leds.led1Toggle();
+    // here we violate memory safety on the 11th signal of this event
     a[i++] = 1;
   }
   
index 3696539e29809366e1dac306d42b457b8234288c..88e1c09868beaf4594d7a4fa0f6e3248f792733e 100644 (file)
@@ -3,14 +3,21 @@ Author/Contact: tinyos-help@millennium.berkeley.edu
 
 Description:
 
+BlinkFail is based on Blink (described below).  It is designed to
+violate memory safety after a few seconds and is used as a
+demonstration and sanity check for Safe TinyOS.  For more information
+about Safe TinyOS see here:
+
+  http://www.cs.utah.edu/~coop/safetinyos/
+
 Blink is a simple application that blinks the 3 mote LEDs. It tests
 that the boot sequence and millisecond timers are working properly.
 The three LEDs blink at 1Hz, 2Hz, and 4Hz. Because each is driven by
-an independent timer, visual inspection can determine whether there are
-bugs in the timer system that are causing drift. Note that this 
+an independent timer, visual inspection can determine whether there
+are bugs in the timer system that are causing drift. Note that this
 method is different than RadioCountToLeds, which fires a single timer
-at a steady rate and uses the bottom three bits of a counter to display
-on the LEDs.
+at a steady rate and uses the bottom three bits of a counter to
+display on the LEDs.
 
 Tools: