X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=apps%2Ftosthreads%2Fcapps%2FBounce%2FBounce.c;h=f048403580ebc26bae3d13473fb3b9424dbfe0fd;hp=2d2b34eb5806655814ba386092b233e554125933;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hpb=adf1de6c009d13b7b52e68535c63b28f59c97400 diff --git a/apps/tosthreads/capps/Bounce/Bounce.c b/apps/tosthreads/capps/Bounce/Bounce.c index 2d2b34eb..f0484035 100644 --- a/apps/tosthreads/capps/Bounce/Bounce.c +++ b/apps/tosthreads/capps/Bounce/Bounce.c @@ -21,6 +21,31 @@ */ /** + * This application is derived from a similar application in the TinyThread + * implementation by William P. McCartney from Cleveland State University (2006) + * + * This application stresses the operation of the thread based AM commands for + * packet transmission and reception. To run this application you will need to + * burn it on one mote with NODE_ID 0, and a second mote with NODE_ID 1. + * + * Three different threads run that each contain an infinite loop that first sends + * a message and then waits to receive a message before returning to the top of the + * loop. After each message reception, one of the onboard LEDs is toggled to + * indicate that it was received. Thread 0 blinks LED0, thread 1 blinks LED1, and + * thread 2 blinks LED2. The three threads run independently, and three different + * messages are bounced back and forth between the two motes in an unsynchronized + * fashion. In contrast to the more complicated Bounce application found in the + * normal nesC threads version of this application, once a thread receives a + * message it will immediately flip on its LED instead of waiting on a Barrier and + * synchronizing the LEDs to come on only once messages have been received from all + * threads. In this way, messages are bounced back and forth between the two motes + * in an asynchronous fashion, and LEDS are toggled immediately upon message + * reception.. + * + * Successful running of this application results in each LED bouncing back and + * forth between each mote independent of one another. This will continue in an + * finite loop forever. + * * @author Chieh-Jan Mike Liang */