[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/cc2420/csma CC2420CsmaC.nc, 1.1, 1.2 CC2420CsmaP.nc, 1.2, 1.3

dmm rincon at users.sourceforge.net
Wed May 14 14:33:09 PDT 2008


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/csma
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv351/csma

Modified Files:
	CC2420CsmaC.nc CC2420CsmaP.nc 
Log Message:
* Removed hardware address recognition to monitor its affect on unit tests, low power listening reliability, and ack reliability in general.
* Implemented software-based address recognition in ReceiveP.
* Applied Steve Dawson-Haggerty's patch to make the RadioBackoff interface parameterized by AM ID only at the top of the stack, whiich allows stack modifications that do not support AM ID's to exist below the active message layer.

Index: CC2420CsmaC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CC2420CsmaC.nc	4 Jul 2007 00:37:14 -0000	1.1
--- CC2420CsmaC.nc	14 May 2008 21:33:07 -0000	1.2
***************
*** 45,49 ****
    provides interface Send;
    provides interface Receive;
!   provides interface RadioBackoff[am_id_t amId];
  
  }
--- 45,49 ----
    provides interface Send;
    provides interface Receive;
!   provides interface RadioBackoff;
  
  }
***************
*** 56,62 ****
    Send = CsmaP;
    
-   components CC2420ActiveMessageC;
-   CsmaP.AMPacket -> CC2420ActiveMessageC;
-   
    components CC2420ControlC;
    CsmaP.Resource -> CC2420ControlC;
--- 56,59 ----

Index: CC2420CsmaP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CC2420CsmaP.nc	13 Sep 2007 23:10:16 -0000	1.2
--- CC2420CsmaP.nc	14 May 2008 21:33:07 -0000	1.3
***************
*** 39,43 ****
    provides interface SplitControl;
    provides interface Send;
!   provides interface RadioBackoff[am_id_t amId];
  
    uses interface Resource;
--- 39,43 ----
    provides interface SplitControl;
    provides interface Send;
!   provides interface RadioBackoff;
  
    uses interface Resource;
***************
*** 47,51 ****
    uses interface RadioBackoff as SubBackoff;
    uses interface Random;
-   uses interface AMPacket;
    uses interface Leds;
    uses interface CC2420Packet;
--- 47,50 ----
***************
*** 142,146 ****
  		     ( IEEE154_ADDR_SHORT << IEEE154_FCF_DEST_ADDR_MODE ) |
  		     ( IEEE154_ADDR_SHORT << IEEE154_FCF_SRC_ADDR_MODE ) );
!     header->src = call AMPacket.address();
      metadata->ack = FALSE;
      metadata->rssi = 0;
--- 141,145 ----
  		     ( IEEE154_ADDR_SHORT << IEEE154_FCF_DEST_ADDR_MODE ) |
  		     ( IEEE154_ADDR_SHORT << IEEE154_FCF_SRC_ADDR_MODE ) );
! 
      metadata->ack = FALSE;
      metadata->rssi = 0;
***************
*** 149,154 ****
      
      ccaOn = TRUE;
!     signal RadioBackoff.requestCca[((cc2420_header_t*)(m_msg->data - 
!         sizeof(cc2420_header_t)))->type](m_msg);
      call CC2420Transmit.send( m_msg, ccaOn );
      return SUCCESS;
--- 148,153 ----
      
      ccaOn = TRUE;
!     signal RadioBackoff.requestCca(m_msg);
! 
      call CC2420Transmit.send( m_msg, ccaOn );
      return SUCCESS;
***************
*** 174,178 ****
     * @param backoffTime the amount of time in some unspecified units to backoff
     */
!   async command void RadioBackoff.setInitialBackoff[am_id_t amId](uint16_t backoffTime) {
      call SubBackoff.setInitialBackoff(backoffTime);
    }
--- 173,177 ----
     * @param backoffTime the amount of time in some unspecified units to backoff
     */
!   async command void RadioBackoff.setInitialBackoff(uint16_t backoffTime) {
      call SubBackoff.setInitialBackoff(backoffTime);
    }
***************
*** 182,186 ****
     * @param backoffTime the amount of time in some unspecified units to backoff
     */
!   async command void RadioBackoff.setCongestionBackoff[am_id_t amId](uint16_t backoffTime) {
      call SubBackoff.setCongestionBackoff(backoffTime);
    }
--- 181,185 ----
     * @param backoffTime the amount of time in some unspecified units to backoff
     */
!   async command void RadioBackoff.setCongestionBackoff(uint16_t backoffTime) {
      call SubBackoff.setCongestionBackoff(backoffTime);
    }
***************
*** 191,195 ****
     * @param ccaOn TRUE to enable CCA, which is the default.
     */
!   async command void RadioBackoff.setCca[am_id_t amId](bool useCca) {
      ccaOn = useCca;
    }
--- 190,194 ----
     * @param ccaOn TRUE to enable CCA, which is the default.
     */
!   async command void RadioBackoff.setCca(bool useCca) {
      ccaOn = useCca;
    }
***************
*** 219,224 ****
          % (0x1F * CC2420_BACKOFF_PERIOD) + CC2420_MIN_BACKOFF);
          
!     signal RadioBackoff.requestInitialBackoff[((cc2420_header_t*)(msg->data - 
!         sizeof(cc2420_header_t)))->type](msg);
    }
  
--- 218,222 ----
          % (0x1F * CC2420_BACKOFF_PERIOD) + CC2420_MIN_BACKOFF);
          
!     signal RadioBackoff.requestInitialBackoff(msg);
    }
  
***************
*** 227,236 ****
          % (0x7 * CC2420_BACKOFF_PERIOD) + CC2420_MIN_BACKOFF);
  
!     signal RadioBackoff.requestCongestionBackoff[((cc2420_header_t*)(msg->data - 
!         sizeof(cc2420_header_t)))->type](msg);
    }
    
    async event void SubBackoff.requestCca(message_t *msg) {
      // Lower layers than this do not configure the CCA settings
    }
    
--- 225,234 ----
          % (0x7 * CC2420_BACKOFF_PERIOD) + CC2420_MIN_BACKOFF);
  
!     signal RadioBackoff.requestCongestionBackoff(msg);
    }
    
    async event void SubBackoff.requestCca(message_t *msg) {
      // Lower layers than this do not configure the CCA settings
+     signal RadioBackoff.requestCca(msg);
    }
    
***************
*** 281,296 ****
    }
    
!   
!   default async event void RadioBackoff.requestInitialBackoff[am_id_t amId](
!       message_t *msg) {
    }
  
!   default async event void RadioBackoff.requestCongestionBackoff[am_id_t amId](
!       message_t *msg) {
    }
    
!   default async event void RadioBackoff.requestCca[am_id_t amId](
!       message_t *msg) {
    }
  }
  
--- 279,292 ----
    }
    
!   default async event void RadioBackoff.requestInitialBackoff(message_t *msg) {
    }
  
!   default async event void RadioBackoff.requestCongestionBackoff(message_t *msg) {
    }
    
!   default async event void RadioBackoff.requestCca(message_t *msg) {
    }
+   
+   
  }
  



More information about the Tinyos-2-commits mailing list