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

dmm rincon at users.sourceforge.net
Mon Feb 4 15:10:16 PST 2008


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

Modified Files:
	CC2420ActiveMessageC.nc CC2420ActiveMessageP.nc 
Log Message:
Added the SendNotifier interface to support CTP + LPL integration.  

Create and drop a module into your system that listens for the SendNotifier events for the AM types related to CTP or Dissemination, then have it call LowPowerListening.setRxSleepInterval(msg, 512);.  Or capture the event for every AM type.

This can also be used to control other transmit parameters on a system-wide basis, like full duplex PA control on a per-destination basis, etc.  If this hook works out, we can expand this into other radio stacks.

Index: CC2420ActiveMessageC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/CC2420ActiveMessageC.nc,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** CC2420ActiveMessageC.nc	14 Sep 2007 00:15:57 -0000	1.9
--- CC2420ActiveMessageC.nc	4 Feb 2008 23:10:13 -0000	1.10
***************
*** 52,55 ****
--- 52,56 ----
      interface LowPowerListening;
      interface PacketLink;
+     interface SendNotifier[am_id_t amId];
    }
  }
***************
*** 81,84 ****
--- 82,86 ----
    Packet = AM;
    AMSend = AM;
+   SendNotifier = AM;
    Receive = AM.Receive;
    Snoop = AM.Snoop;

Index: CC2420ActiveMessageP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/CC2420ActiveMessageP.nc,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** CC2420ActiveMessageP.nc	9 Jan 2008 19:44:37 -0000	1.10
--- CC2420ActiveMessageP.nc	4 Feb 2008 23:10:13 -0000	1.11
***************
*** 42,46 ****
--- 42,48 ----
      interface AMPacket;
      interface Packet;
+     interface SendNotifier[am_id_t id];
    }
+   
    uses {
      interface Send as SubSend;
***************
*** 67,70 ****
--- 69,74 ----
      header->destpan = call CC2420Config.getPanAddr();
      
+     signal SendNotifier.aboutToSend[id](addr, msg);
+     
      return call SubSend.send( msg, len + CC2420_SIZE );
    }
***************
*** 197,202 ****
  
    default event void AMSend.sendDone[uint8_t id](message_t* msg, error_t err) {
-     return;
    }
  
  }
--- 201,208 ----
  
    default event void AMSend.sendDone[uint8_t id](message_t* msg, error_t err) {
    }
  
+   default event void SendNotifier.aboutToSend[am_id_t amId](am_addr_t addr, message_t *msg) {
+   }
+   
  }



More information about the Tinyos-2-commits mailing list