[Firebug-cvs] fireboard/beta/fireworks/apps/Fireworks Fireworks.h,1.5,1.6 FireworksC.nc,1.3,1.4 Fire
Brought to you by:
doolin
From: Karthik D. <da...@us...> - 2005-07-26 01:45:13
|
Update of /cvsroot/firebug/fireboard/beta/fireworks/apps/Fireworks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28280 Modified Files: Fireworks.h FireworksC.nc FireworksM.nc TODO Log Message: Final TinyOS version Index: FireworksC.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/Fireworks/FireworksC.nc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FireworksC.nc 25 Jul 2005 22:08:16 -0000 1.3 --- FireworksC.nc 26 Jul 2005 01:44:46 -0000 1.4 *************** *** 32,36 **** FireworksM.ReceivePingReplyMsg -> GenericComm.ReceiveMsg[AM_PINGREPLYMSG]; FireworksM.SendDataMsg -> GenericComm.SendMsg[AM_DATAMSG]; - FireworksM.ReceiveDataMsg -> GenericComm.ReceiveMsg[AM_DATAMSG]; FireworksM.ReceiveDataRequestMsg -> GenericComm.ReceiveMsg[AM_DATAREQUESTMSG]; FireworksM.CC1000Control -> CC1000RadioC; --- 32,35 ---- Index: Fireworks.h =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/Fireworks/Fireworks.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Fireworks.h 26 Jul 2005 01:15:45 -0000 1.5 --- Fireworks.h 26 Jul 2005 01:44:46 -0000 1.6 *************** *** 20,23 **** --- 20,27 ---- }; + enum { + NUM_READINGS_PER_PACKET = 14 + }; + /* LED count sequence. 1 - Red *************** *** 39,42 **** --- 43,47 ---- uint16_t seqno; uint16_t source; + uint16_t client; uint16_t numNodes; uint16_t numTrials; *************** *** 57,61 **** struct DataMsg { uint8_t seqno; ! uint16_t data[14]; } ; --- 62,66 ---- struct DataMsg { uint8_t seqno; ! uint16_t data[NUM_READINGS_PER_PACKET]; } ; Index: TODO =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/Fireworks/TODO,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TODO 26 Jul 2005 01:15:45 -0000 1.2 --- TODO 26 Jul 2005 01:44:46 -0000 1.3 *************** *** 8,11 **** --- 8,13 ---- an artificial limitation. Use dynamic memory allocation to go beyond this. + - Implement reliability for DataMsg since it has multiple packets. + Do a simple NACK scheme. LONG TERM Index: FireworksM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/Fireworks/FireworksM.nc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FireworksM.nc 26 Jul 2005 01:15:45 -0000 1.4 --- FireworksM.nc 26 Jul 2005 01:44:46 -0000 1.5 *************** *** 136,140 **** /* Send all the collected data to the client */ uint8_t dseq = 0; ! clearPacket(); dMsg = (DataMsg *) &(msg.data); --- 136,142 ---- /* Send all the collected data to the client */ uint8_t dseq = 0; ! uint8_t dst = 0, trial=0; ! uint8_t cnt=0; ! uint8_t seq=0; clearPacket(); dMsg = (DataMsg *) &(msg.data); *************** *** 147,153 **** drMsg->trialFrequency = tFrequency; ! if(!call SendDataMsg.send( } ! task void takeMeasurements() { uint16_t trial; --- 149,188 ---- drMsg->trialFrequency = tFrequency; ! while(sendBusy); ! if(!sendBusy) { ! sendBusy = TRUE; ! if(!call SendDataMsg.send(client, sizeof(DataMsg), &msg)) { ! sendBusy = FALSE; ! blink(ERROR); ! return; ! } ! else { ! blink(SND_D_MSG); ! } ! } ! ! /* Now start sending the data */ ! while(dst<nNodes) { ! while(trial<nTrials) { ! if(!sendBusy) { ! clearPacket(); ! dMsg = (DataMsg*) &(msg.data); ! dMsg->seqno=seq++; ! while(cnt < NUM_READINGS_PER_PACKET) // We can put 14 2-byte RSSI readings per packet ! dMsg->data[cnt++]= data[dst][trial++]; ! ! if(!call SendDataMsg.send(client, sizeof(DataMsg), &msg)) { ! sendBusy = FALSE; ! blink(ERROR); ! return; ! } ! else { ! blink(SND_D_MSG); ! } ! } ! } ! } } ! task void takeMeasurements() { uint16_t trial; *************** *** 224,227 **** --- 259,263 ---- if(TOS_LOCAL_ADDRESS == drMsg->source) { blink(RCV_DR_MSG); + client = drMsg->client; nTrials = drMsg->numTrials; nNodes = drMsg->numNodes; |