[Firebug-cvs] fireboard/beta/fireworks/apps/TestLink LinkMsg.h,1.6,1.7 Makefile,1.1,1.2 TestLinkC.nc
Brought to you by:
doolin
From: Karthik D. <da...@us...> - 2005-07-30 03:36:41
|
Update of /cvsroot/firebug/fireboard/beta/fireworks/apps/TestLink In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32654 Modified Files: LinkMsg.h Makefile TestLinkC.nc TestLinkM.nc Log Message: Working TestLink Index: LinkMsg.h =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/TestLink/LinkMsg.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LinkMsg.h 30 Jul 2005 00:14:13 -0000 1.6 --- LinkMsg.h 30 Jul 2005 03:36:32 -0000 1.7 *************** *** 11,15 **** enum { ! AM_LINKMSG = 200 }; --- 11,16 ---- enum { ! AM_LINKMSG = 200, ! AM_LINKREQUESTMSG = 199 }; Index: Makefile =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/TestLink/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 30 Jul 2005 00:24:07 -0000 1.1 --- Makefile 30 Jul 2005 03:36:32 -0000 1.2 *************** *** 1,6 **** SENSORBOARD=micasb COMPONENT=TestLinkC ! PFLAGS +=-DDELUGE_LEDS ! PFLAGS += -I%T/lib/Deluge -I%T/interfaces -I%T/tos/lib/Commands -I%T/platform/mica2 include $(TOSROOT)/apps/Makerules PLATFORMS = mica2 mica2dot telos telosb telosa --- 1,7 ---- SENSORBOARD=micasb COMPONENT=TestLinkC ! PFLAGS +=-DDELUGE_LEDS -I$(TOSROOT)/tos/interfaces ! #PFLAGS += -I%T/lib/Deluge -I%T/interfaces -I%T/tos/lib/Commands -I%T/platform/mica2 ! CFLAGS += -DCC1K_DEFAULT_FREQ=CC1K_434_845_MHZ include $(TOSROOT)/apps/Makerules PLATFORMS = mica2 mica2dot telos telosb telosa Index: TestLinkC.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/TestLink/TestLinkC.nc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestLinkC.nc 29 Jul 2005 23:56:56 -0000 1.1 --- TestLinkC.nc 30 Jul 2005 03:36:32 -0000 1.2 *************** *** 7,26 **** Main, GenericComm, - DelugeC, - CC2420RadioC, TestLinkM, ! LedsC; Main.StdControl -> TestLinkM.StdControl; ! Main.StdControl -> GenericComm.StdControl; ! Main.StdControl -> DelugeC; ! Main.StdControl -> TimerC; TestLinkM.CommControl -> GenericComm; TestLinkM.CommControl -> GenericComm; ! TestLinkM.SendLinkMsg -> GenericComm.SendMsg[AM_LINKMSG]; ! TestLinkM.ReceiveLinkMsg -> GenericComm.ReceiveMsg[AM_LINKMSG]; ! TestLinkM.CC1000Control -> CC1000RadioC; TestLinkM.Leds -> LedsC; ! TestLinkM.Timer -> TimerC.Timer[unique("Timer")]; } --- 7,22 ---- Main, GenericComm, TestLinkM, ! LedsC, ! CC2420RadioC; Main.StdControl -> TestLinkM.StdControl; ! Main.StdControl -> GenericComm; TestLinkM.CommControl -> GenericComm; TestLinkM.CommControl -> GenericComm; ! TestLinkM.SendLinkMsg -> GenericComm.SendMsg[0xfb]; ! TestLinkM.ReceiveLinkMsg -> GenericComm.ReceiveMsg[AM_LINKREQUESTMSG]; TestLinkM.Leds -> LedsC; ! TestLinkM.RadioControl -> CC2420RadioC; } Index: TestLinkM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/TestLink/TestLinkM.nc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestLinkM.nc 30 Jul 2005 00:08:00 -0000 1.1 --- TestLinkM.nc 30 Jul 2005 03:36:32 -0000 1.2 *************** *** 9,15 **** interface SendMsg as SendLinkMsg; interface ReceiveMsg as ReceiveLinkMsg; - interface Timer; interface Leds; ! interface CC1000Control; } } --- 9,14 ---- interface SendMsg as SendLinkMsg; interface ReceiveMsg as ReceiveLinkMsg; interface Leds; ! interface CC2420Control as RadioControl; } } *************** *** 20,23 **** --- 19,23 ---- uint16_t lastLQI; uint16_t lastAddress; + bool sendBusy; TOS_Msg msg; *************** *** 53,64 **** } ! task sendLinkQualityData() { blink(0x5); clearPacket(); ! lMsg = (LinkMsg) &(msg.data); ! lMsg->seqno = seqno++; ! lMsg->addr = lastAddress; ! lMsg->tstamp = 0; lMsg->RSSI = lastRSSI; lMsg->LQI = lastLQI; --- 53,65 ---- } ! void sendLinkQualityData() { blink(0x5); clearPacket(); ! lMsg = (LinkMsg *) &(msg.data); ! lMsg->header.am_type = AM_LINKMSG; ! lMsg->header.seqno = seqno++; ! lMsg->moteid = 0xAFFA; ! lMsg->tstamp = 0xBBBB; lMsg->RSSI = lastRSSI; lMsg->LQI = lastLQI; *************** *** 78,89 **** command result_t StdControl.init() { call Leds.init(); call CommControl.init(); - return SUCCESS; } command result_t StdControl.start() { ! blink(CLEAR); seqno = 1; --- 79,93 ---- command result_t StdControl.init() { + + sendBusy = FALSE; + seqno = 1; + call Leds.init(); call CommControl.init(); return SUCCESS; } command result_t StdControl.start() { ! blink(0x0); seqno = 1; *************** *** 96,112 **** command result_t StdControl.stop() { call CommControl.stop(); - call Timer.stop(); return SUCCESS; } ! command TOS_MsgPtr ReceiveLinkMsg.receive(TOS_MsgPtr m) { blink(0x3); ! lastRSSI = m->RSSI; ! lastLQI = m->LQI; /* Copy timestamp here */ ! post sendLinkQualityData(); return m; } ! --- 100,120 ---- command result_t StdControl.stop() { call CommControl.stop(); return SUCCESS; } ! event TOS_MsgPtr ReceiveLinkMsg.receive(TOS_MsgPtr m) { blink(0x3); ! lastRSSI = m->strength; ! lastLQI = m->lqi; /* Copy timestamp here */ ! sendLinkQualityData(); return m; } ! ! event result_t SendLinkMsg.sendDone(TOS_MsgPtr m, result_t s) { ! sendBusy = FALSE; ! return SUCCESS; ! } ! } |