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
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
-messages in the following intervals: 0-96s and 128-256s.
+messages in the following intervals: 0-96s and 128-192s.
Tools:
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 */
- 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 */
- call LowPowerListening.setLocalSleepInterval(10);
+ call LowPowerListening.setLocalWakeupInterval(10);
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;
}
}
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();