[Tinyos-beta-commits] CVS: tinyos-1.x/beta/Drip/TestDrip
TestDrip.nc, 1.1, 1.2 TestDripM.nc, 1.1, 1.2
Gilman Tolle
gtolle at users.sourceforge.net
Fri Jun 10 12:17:10 PDT 2005
Update of /cvsroot/tinyos/tinyos-1.x/beta/Drip/TestDrip
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2409
Modified Files:
TestDrip.nc TestDripM.nc
Log Message:
Changed the Drip test app to support the local change() call
Index: TestDrip.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/TestDrip/TestDrip.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TestDrip.nc 19 Jan 2005 00:01:20 -0000 1.1
--- TestDrip.nc 10 Jun 2005 19:16:51 -0000 1.2
***************
*** 12,15 ****
--- 12,16 ----
DripC,
DripStateC,
+ TimerC,
LedsC as Leds;
***************
*** 17,22 ****
--- 18,25 ----
Main.StdControl -> TestDripM;
Main.StdControl -> DripC;
+ Main.StdControl -> TimerC;
TestDripM.Leds -> Leds;
+ TestDripM.Timer -> TimerC.Timer[unique("Timer")];
TestDripM.ReceiveDrip -> DripC.Receive[AM_TESTDRIPMSG];
Index: TestDripM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/TestDrip/TestDripM.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TestDripM.nc 19 Jan 2005 00:01:20 -0000 1.1
--- TestDripM.nc 10 Jun 2005 19:16:51 -0000 1.2
***************
*** 5,8 ****
--- 5,10 ----
interface Leds;
+ interface Timer;
+
interface Receive as ReceiveDrip;
interface Drip;
***************
*** 20,26 ****
}
! command result_t StdControl.start() { return SUCCESS; }
command result_t StdControl.stop() { return SUCCESS; }
event TOS_MsgPtr ReceiveDrip.receive(TOS_MsgPtr msg,
void* payload,
--- 22,39 ----
}
! command result_t StdControl.start() {
! if (TOS_LOCAL_ADDRESS == 1) {
! call Timer.start(TIMER_REPEAT, 2048);
! }
! return SUCCESS;
! }
!
command result_t StdControl.stop() { return SUCCESS; }
+ event result_t Timer.fired() {
+ call Drip.change();
+ return SUCCESS;
+ }
+
event TOS_MsgPtr ReceiveDrip.receive(TOS_MsgPtr msg,
void* payload,
More information about the Tinyos-beta-commits
mailing list