[Tinyos-2-commits]
CVS: tinyos-2.x/apps/tests/cc2420/LplBroadcastPeriodicDelivery
README.txt, 1.1, 1.2 TestPeriodicP.nc, 1.1, 1.2
dmm
rincon at users.sourceforge.net
Tue Jul 10 10:20:49 PDT 2007
Update of /cvsroot/tinyos/tinyos-2.x/apps/tests/cc2420/LplBroadcastPeriodicDelivery
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7528
Modified Files:
README.txt TestPeriodicP.nc
Log Message:
Updated behavior and comments
Index: README.txt
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/cc2420/LplBroadcastPeriodicDelivery/README.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** README.txt 12 Apr 2007 17:14:08 -0000 1.1
--- README.txt 10 Jul 2007 17:20:46 -0000 1.2
***************
*** 1,22 ****
! Tx != 0
! Rx == 0
! This app sends a message from Tx 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.
! EXPECTATIONS
! Transmitter - always ID 1
! * Transmitting for 1000 ms, and then pause for 1000 ms.
! * Broadcast address will not cut transmission short under any circumstances
! * Led0 indicates transmission
! * Transmitter receive check interval once every 1000 ms
!
! Receiver - any other ID than 1
! * Receive check interval once every 1000 ms
! * Led1 indicates final reception
! Led2 is left up to DutyCycleP to toggle when the radio is on.
--- 1,52 ----
! README for RadioCountToLeds
! Author/Contact: tinyos-help at millennium.berkeley.edu
! Description:
!
! To compile for motes with CC2420 radios, you must do:
! env CFLAGS="-DLOW_POWER_LISTENING" make <platform>
!
! Install the application to two nodes with the following ID's:
! Node 0 (Receiver node): id = 0
! Node 1 (Transmitter node): id = 1 (or.. id > 0)
!
!
! 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.
+ EXPECTED OUTPUT
+ Transmitter Node:
+ * Toggles its led0 every second.
+ - led0 ON indicates transmission, which lasts
+ for a full second.
! Receiver Node:
! * led1 remains on (except at the beginning)
! * If led0 lights up after the beginning of the
! test, without resetting the transmitter node,
! there is a problem. This means a duplicate
! message was received
! * led2 toggles once each for each transmission
! received.
! Summary: Receiver node's led2 should be toggling once
! a second and led0 should never light up (except at the beginning).
!
!
!
! Tools:
+ RadioCountMsg.java is a Java class representing the message that
+ this application sends. RadioCountMsg.py is a Python class representing
+ the message that this application sends.
+
+ Known bugs/limitations:
+
+ None.
+
+
+ $Id$
Index: TestPeriodicP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/cc2420/LplBroadcastPeriodicDelivery/TestPeriodicP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TestPeriodicP.nc 12 Apr 2007 17:14:08 -0000 1.1
--- TestPeriodicP.nc 10 Jul 2007 17:20:46 -0000 1.2
***************
*** 57,60 ****
--- 57,62 ----
message_t fullMsg;
bool transmitter;
+
+ uint8_t lastCount;
/**************** Prototypes ****************/
***************
*** 90,95 ****
event message_t *Receive.receive(message_t *msg, void *payload, uint8_t len) {
if(!transmitter) {
! call Leds.led1Toggle();
}
return msg;
--- 92,109 ----
event message_t *Receive.receive(message_t *msg, void *payload, uint8_t len) {
+ TestPeriodicMsg *periodicMsg = (TestPeriodicMsg *) payload;
+
if(!transmitter) {
! if(lastCount == periodicMsg->count) {
! call Leds.led0On();
! call Leds.led1Off();
! } else {
! call Leds.led1On();
! call Leds.led0Off();
! }
!
! lastCount = periodicMsg->count;
!
! call Leds.led2Toggle();
}
return msg;
More information about the Tinyos-2-commits
mailing list