[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/cc2420 CC2420.h, 1.8, 1.9 CC2420ActiveMessageC.nc, 1.10, 1.11 CC2420ActiveMessageP.nc, 1.13, 1.14

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


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

Modified Files:
	CC2420.h CC2420ActiveMessageC.nc CC2420ActiveMessageP.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: CC2420.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/CC2420.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** CC2420.h	17 Jan 2008 02:09:39 -0000	1.8
--- CC2420.h	14 May 2008 21:33:07 -0000	1.9
***************
*** 56,60 ****
--- 56,63 ----
  #endif
  
+ #ifndef TINYOS_IP
    nxle_uint8_t type;
+ #endif
+ 
  } cc2420_header_t;
    

Index: CC2420ActiveMessageC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/CC2420ActiveMessageC.nc,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** CC2420ActiveMessageC.nc	4 Feb 2008 23:10:13 -0000	1.10
--- CC2420ActiveMessageC.nc	14 May 2008 21:33:07 -0000	1.11
***************
*** 79,83 ****
  
    
!   RadioBackoff = CsmaC;
    Packet = AM;
    AMSend = AM;
--- 79,83 ----
  
    
!   RadioBackoff = AM;
    Packet = AM;
    AMSend = AM;
***************
*** 114,116 ****
--- 114,118 ----
    AM.CC2420Config -> CC2420ControlC;
    
+   AM.SubBackoff -> CsmaC;
+   
  }

Index: CC2420ActiveMessageP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/CC2420ActiveMessageP.nc,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** CC2420ActiveMessageP.nc	24 Apr 2008 17:03:43 -0000	1.13
--- CC2420ActiveMessageP.nc	14 May 2008 21:33:07 -0000	1.14
***************
*** 43,46 ****
--- 43,47 ----
      interface Packet;
      interface SendNotifier[am_id_t id];
+     interface RadioBackoff[am_id_t id];
    }
    
***************
*** 52,55 ****
--- 53,57 ----
      interface CC2420Config;
      interface ActiveMessageAddress;
+     interface RadioBackoff as SubBackoff;
    }
  }
***************
*** 68,71 ****
--- 70,74 ----
      header->dest = addr;
      header->destpan = call CC2420Config.getPanAddr();
+     header->src = call AMPacket.address();
      
      signal SendNotifier.aboutToSend[id](addr, msg);
***************
*** 193,196 ****
--- 196,241 ----
    }
    
+   
+   /***************** RadioBackoff ***********************/
+ 
+   async event void SubBackoff.requestInitialBackoff(message_t *msg) {
+     signal RadioBackoff.requestInitialBackoff[((cc2420_header_t*)(msg->data - 
+                                         sizeof(cc2420_header_t)))->type](msg);
+   }
+ 
+   async event void SubBackoff.requestCongestionBackoff(message_t *msg) {
+     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
+     signal RadioBackoff.requestCca[((cc2420_header_t*)(msg->data - 
+         sizeof(cc2420_header_t)))->type](msg);
+   }
+ 
+   async command void RadioBackoff.setInitialBackoff[am_id_t amId](uint16_t backoffTime) {
+     call SubBackoff.setInitialBackoff(backoffTime);
+   }
+   
+   /**
+    * Must be called within a requestCongestionBackoff event
+    * @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);
+   }
+ 
+       
+   /**
+    * Enable CCA for the outbound packet.  Must be called within a requestCca
+    * event
+    * @param ccaOn TRUE to enable CCA, which is the default.
+    */
+   async command void RadioBackoff.setCca[am_id_t amId](bool useCca) {
+     call SubBackoff.setCca(useCca);
+   }
+ 
+ 
+   
    /***************** Defaults ****************/
    default event message_t* Receive.receive[am_id_t id](message_t* msg, void* payload, uint8_t len) {
***************
*** 207,210 ****
--- 252,266 ----
    default event void SendNotifier.aboutToSend[am_id_t amId](am_addr_t addr, message_t *msg) {
    }
+   default async event void RadioBackoff.requestInitialBackoff[am_id_t id](
+       message_t *msg) {
+   }
+ 
+   default async event void RadioBackoff.requestCongestionBackoff[am_id_t id](
+       message_t *msg) {
+   }
+   
+   default async event void RadioBackoff.requestCca[am_id_t id](
+       message_t *msg) {
+   }
    
  }



More information about the Tinyos-2-commits mailing list