[Tinyos-beta-commits] CVS: tinyos-1.x/beta/Drip DripSendC.nc, 1.2, 1.3 DripSendM.nc, 1.3, 1.4

Gilman Tolle gtolle at users.sourceforge.net
Fri Jul 15 18:29:50 PDT 2005


Update of /cvsroot/tinyos/tinyos-1.x/beta/Drip
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19792

Modified Files:
	DripSendC.nc DripSendM.nc 
Log Message:
Extending the DripSend directed dissemination system. DripSendC is now generic -- instantiate it with the Drip channel you want to do directed dissemination on. Also, the Drip java tools have been enhanced a bit to support sending into the network unreliably.

Index: DripSendC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/DripSendC.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DripSendC.nc	14 Jun 2005 18:19:35 -0000	1.2
--- DripSendC.nc	16 Jul 2005 01:29:47 -0000	1.3
***************
*** 3,7 ****
  includes DripSend;
  
! configuration DripSendC {
    provides interface StdControl;
    provides interface Send;
--- 3,7 ----
  includes DripSend;
  
! generic configuration DripSendC(uint8_t channel) {
    provides interface StdControl;
    provides interface Send;
***************
*** 10,17 ****
  }
  implementation {
!   components DripSendM;
    components DripC;
    components DripStateC;
    components GroupManagerC;
  
    StdControl = DripSendM;
--- 10,20 ----
  }
  implementation {
! 
!   components new DripSendM();
! 
    components DripC;
    components DripStateC;
    components GroupManagerC;
+   components LedsC;
  
    StdControl = DripSendM;
***************
*** 22,29 ****
    Receive = DripSendM;
    
!   DripSendM.DripReceive -> DripC.Receive[AM_DRIPSEND];
!   DripSendM.Drip -> DripC.Drip[AM_DRIPSEND];
!   DripC.DripState[AM_DRIPSEND] -> DripStateC.DripState[unique("DripState")];
  
    DripSendM.GroupManager -> GroupManagerC;
  }
--- 25,33 ----
    Receive = DripSendM;
    
!   DripSendM.DripReceive -> DripC.Receive[channel];
!   DripSendM.Drip -> DripC.Drip[channel];
!   DripC.DripState[channel] -> DripStateC.DripState[unique("DripState")];
  
    DripSendM.GroupManager -> GroupManagerC;
+   DripSendM.Leds -> LedsC;
  }

Index: DripSendM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/DripSendM.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DripSendM.nc	22 Jun 2005 18:06:09 -0000	1.3
--- DripSendM.nc	16 Jul 2005 01:29:47 -0000	1.4
***************
*** 1,5 ****
  //$Id$
  
! module DripSendM {
    provides interface StdControl;
    provides interface Send;
--- 1,5 ----
  //$Id$
  
! generic module DripSendM() {
    provides interface StdControl;
    provides interface Send;
***************
*** 10,13 ****
--- 10,14 ----
    uses interface Drip;
    uses interface GroupManager;
+   uses interface Leds;
  }
  implementation {
***************
*** 22,25 ****
--- 23,29 ----
    bool outBufBusy;
  
+   uint16_t receivedMsgs;
+   uint16_t forwardedMsgs;
+ 
    task void sendDoneTask();
    task void sendMsgDoneTask();
***************
*** 117,123 ****
        dbg(DBG_USR1, "DripSendM: Forwarding a message for group %d\n", 
  	  addressMsgOut->dest);
        
        memcpy(pData, &outBuf[0], outLength);
!       
        call Drip.rebroadcast(msg, pData, outLength);
        return SUCCESS;
--- 121,131 ----
        dbg(DBG_USR1, "DripSendM: Forwarding a message for group %d\n", 
  	  addressMsgOut->dest);
+ 
+       call Leds.greenToggle();
        
        memcpy(pData, &outBuf[0], outLength);
! 
!       forwardedMsgs++;
! 
        call Drip.rebroadcast(msg, pData, outLength);
        return SUCCESS;
***************
*** 141,144 ****
--- 149,157 ----
        dbg(DBG_USR1, "DripSendM: Receiving a message dest=%d source=%d\n", 
  	  addressMsgIn->dest, addressMsgIn->source);
+ 
+       call Leds.yellowToggle();
+ 
+       receivedMsgs++;
+     
        pMsg = signal Receive.receive(msg, &addressMsgIn->data[0], 
  				    payloadLen - offsetof(AddressMsg, data));
***************
*** 150,151 ****
--- 163,166 ----
    }
  }
+ 
+ 



More information about the Tinyos-beta-commits mailing list