]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Switch to the new LowPowerListening interface
authorrazvanm <razvanm>
Wed, 21 Oct 2009 19:11:51 +0000 (19:11 +0000)
committerrazvanm <razvanm>
Wed, 21 Oct 2009 19:11:51 +0000 (19:11 +0000)
apps/tests/TestLpl/README.txt
apps/tests/TestLpl/TestLplC.nc

index 1add1755a7163a15b5ff7f843d452534bfc89850..d0092953c8571dc1ccfddc2745540b0dce382510 100644 (file)
@@ -4,7 +4,7 @@ Author/Contact: tinyos-help@millennium.berkeley.edu
 Description:
 
 A simple low-power-listening test app, which cycles through different
 Description:
 
 A simple low-power-listening test app, which cycles through different
-low-power-listening settings every ~32s, repeating every ~256s. 
+low-power-listening settings every ~32s, repeating every ~192s. 
 
 This application currently runs on motes using the CC1000, CC2420 and
 RF230 radios. To compile for motes with CC2420 or RF230 radios, you
 
 This application currently runs on motes using the CC1000, CC2420 and
 RF230 radios. To compile for motes with CC2420 or RF230 radios, you
@@ -36,16 +36,10 @@ Its low-power-listening settings are as follows (repeating every 256s):
 160-192s:  receive: low-power-listening with 2000ms interval
           send: every 7 seconds, to low-power-listeners with 2000ms interval
 
 160-192s:  receive: low-power-listening with 2000ms interval
           send: every 7 seconds, to low-power-listeners with 2000ms interval
 
-192-224s:  receive: low-power-listening with 1% duty cycle
-          send: every 7 seconds, to low-power-listeners with 1% duty cycle
-
-224-256s:  receive: low-power-listening with 0.1% duty cycle
-          send: every 7 seconds, to low-power-listeners with 0.1% duty cycle
-
 Whether two motes running TestLPL can receive each others messages depends
 on their current send and receive low-power-listening settings. If you reset
 two such motes at the same time, they will be able to receive each other's
 Whether two motes running TestLPL can receive each others messages depends
 on their current send and receive low-power-listening settings. If you reset
 two such motes at the same time, they will be able to receive each other's
-messages in the following intervals: 0-96s and 128-256s.
+messages in the following intervals: 0-96s and 128-192s.
 
 Tools:
 
 
 Tools:
 
index 0920f1364da86ed399b326138f74451627877452..b186e65d1337d7583cd46d60c3a941440fd62a4d 100644 (file)
@@ -68,31 +68,25 @@ implementation
     case 0:
       sendSkip = 0;
       sendInterval = 0;
     case 0:
       sendSkip = 0;
       sendInterval = 0;
-      call LowPowerListening.setLocalSleepInterval(0);
+      call LowPowerListening.setLocalWakeupInterval(0);
       break;
     case 1:
       sendInterval = 100; /* Send to sleepy listener */
       break;
     case 2:
       sendInterval = -1; /* Send to listener like us */
       break;
     case 1:
       sendInterval = 100; /* Send to sleepy listener */
       break;
     case 2:
       sendInterval = -1; /* Send to listener like us */
-      call LowPowerListening.setLocalSleepInterval(250);
+      call LowPowerListening.setLocalWakeupInterval(250);
       break;
     case 3:
       sendInterval = 0; /* Send to awake listener */
       break;
     case 4:
       sendInterval = -1; /* Send to listener like us */
       break;
     case 3:
       sendInterval = 0; /* Send to awake listener */
       break;
     case 4:
       sendInterval = -1; /* Send to listener like us */
-      call LowPowerListening.setLocalSleepInterval(10);
+      call LowPowerListening.setLocalWakeupInterval(10);
       break;
     case 5:
       sendSkip = 7; /* Send every 7s */
       break;
     case 5:
       sendSkip = 7; /* Send every 7s */
-      call LowPowerListening.setLocalSleepInterval(2000);
-      break;
-    case 6:
-      call LowPowerListening.setLocalDutyCycle(100);
-      break;
-    case 7:
-      call LowPowerListening.setLocalDutyCycle(10);
+      call LowPowerListening.setLocalWakeupInterval(2000);
       break;
     }
   }
       break;
     }
   }
@@ -106,7 +100,7 @@ implementation
     if (!locked && ((counter & sendSkip) == sendSkip))
       {
        if (sendInterval >= 0)
     if (!locked && ((counter & sendSkip) == sendSkip))
       {
        if (sendInterval >= 0)
-         call LowPowerListening.setRxSleepInterval(&packet, sendInterval);
+         call LowPowerListening.setRemoteWakeupInterval(&packet, sendInterval);
        if (call AMSend.send(AM_BROADCAST_ADDR, &packet, 0) == SUCCESS)
          {
            call Leds.led0On();
        if (call AMSend.send(AM_BROADCAST_ADDR, &packet, 0) == SUCCESS)
          {
            call Leds.led0On();