]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/cc2420/CC2420ActiveMessageP.nc
Added the SendNotifier interface to support CTP + LPL integration.
[tinyos-2.x.git] / tos / chips / cc2420 / CC2420ActiveMessageP.nc
index a4e4f843f3bde76c1d4eed5b774a74fc8ca26d3b..b5bc03a7226e0f7c7f0ef1305f1427c4af8dfcc6 100644 (file)
@@ -41,7 +41,9 @@ module CC2420ActiveMessageP {
     interface Receive as Snoop[am_id_t id];
     interface AMPacket;
     interface Packet;
+    interface SendNotifier[am_id_t id];
   }
+  
   uses {
     interface Send as SubSend;
     interface Receive as SubReceive;
@@ -66,6 +68,8 @@ implementation {
     header->dest = addr;
     header->destpan = call CC2420Config.getPanAddr();
     
+    signal SendNotifier.aboutToSend[id](addr, msg);
+    
     return call SubSend.send( msg, len + CC2420_SIZE );
   }
 
@@ -196,7 +200,9 @@ implementation {
   }
 
   default event void AMSend.sendDone[uint8_t id](message_t* msg, error_t err) {
-    return;
   }
 
+  default event void SendNotifier.aboutToSend[am_id_t amId](am_addr_t addr, message_t *msg) {
+  }
+  
 }