]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/tests/cc2420/LplUnicastPeriodicDelivery/TestPeriodicC.nc
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / apps / tests / cc2420 / LplUnicastPeriodicDelivery / TestPeriodicC.nc
index 1aa728c3a835b2fc1200687a0101d536ce8bed92..4ecce8365974713351894805c17d41cdaee3e90e 100644 (file)
  * OF THE POSSIBILITY OF SUCH DAMAGE
  */
 
+#include "TestPeriodic.h"
+
 /**
+ * This app sends a message from Transmitter node to the recevier node
+ * and waits 1000 ms between each delivery so the Rx mote's radio
+ * shuts back off and has to redetect to receive the next message.
+ * Receiver: TOS_NODE_ID != 1.
+ * Transmitter: TOS_NODE_ID == 1.
+ *
  * @author David Moss
- * Rx == 0
- * Tx != 0
  */
 
-#include "TestPeriodic.h"
-
 module TestPeriodicC {
   uses {
     interface Boot;
@@ -65,7 +69,7 @@ implementation {
     transmitter = (call AMPacket.address() != 0);
     count = 0;
     
-    call LowPowerListening.setLocalSleepInterval(1000);
+    call LowPowerListening.setLocalWakeupInterval(1000);
     call SplitControl.start();
   }
   
@@ -106,7 +110,7 @@ implementation {
   task void send() {
     TestPeriodicMsg *periodicMsg = (TestPeriodicMsg *) call Packet.getPayload(&fullMsg, sizeof(TestPeriodicMsg));
     periodicMsg->count = count;
-    call LowPowerListening.setRxSleepInterval(&fullMsg, 1000);
+    call LowPowerListening.setRemoteWakeupInterval(&fullMsg, 1000);
     if(call AMSend.send(0, &fullMsg, sizeof(TestPeriodicMsg)) != SUCCESS) {
       post send();
     } else {