]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/tests/cc2420/LplBroadcastPeriodicDelivery/TestPeriodicC.nc
Fix the apps affected by the changes in the LowPowerListening interface.
[tinyos-2.x.git] / apps / tests / cc2420 / LplBroadcastPeriodicDelivery / TestPeriodicC.nc
index 59d6b0c122ba016564c0635961d6376af98ee23c..9e7dfff9afb128e7336329632a18bb09bf41bb58 100644 (file)
  * OF THE POSSIBILITY OF SUCH DAMAGE
  */
 
+#include "TestPeriodic.h"
+
 /**
  * This app sends a message from Transmitter node to AM_BROADCAST_ADDR
  * 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
+ * Receiver: TOS_NODE_ID != 1.
+ * Transmitter: TOS_NODE_ID == 1.
  *
  * @author David Moss
  */
 
-#include "TestPeriodic.h"
-
 module TestPeriodicC {
   uses {
     interface Boot;
@@ -71,7 +71,7 @@ implementation {
     transmitter = (call AMPacket.address() == 1);
     count = 0;
     
-    call LowPowerListening.setLocalSleepInterval(1000);
+    call LowPowerListening.setLocalWakeupInterval(1000);
     call SplitControl.start();
   }
   
@@ -124,7 +124,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(AM_BROADCAST_ADDR, &fullMsg, sizeof(TestPeriodicMsg)) != SUCCESS) {
       post send();
     } else {