]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/rf2xx/layers/ActiveMessageLayerP.nc
add the SendNotifier interface
[tinyos-2.x.git] / tos / chips / rf2xx / layers / ActiveMessageLayerP.nc
index c37c2bb8b9f1f8a77a15b68dd1823eedb6e345a6..e80357173b43a29b8c986db6b04aa2a56b529553 100644 (file)
@@ -33,6 +33,7 @@ module ActiveMessageLayerP
                interface AMSend[am_id_t id];
                interface Receive[am_id_t id];
                interface Receive as Snoop[am_id_t id]; 
+               interface SendNotifier[am_id_t id];
        }
 
        uses
@@ -68,6 +69,8 @@ implementation
                call AMPacket.setType(msg, id);
                call AMPacket.setDestination(msg, addr);
 
+               signal SendNotifier.aboutToSend[id](addr, msg);
+
                return call SubSend.send(msg, len);
        }
 
@@ -95,6 +98,10 @@ implementation
                return call SubSend.getPayload(msg, len);
        }
 
+       default event void SendNotifier.aboutToSend[am_id_t id](am_addr_t addr, message_t* msg)
+       {
+       }
+
 /*----------------- Receive -----------------*/
 
        event message_t* SubReceive.receive(message_t* msg, void* payload, uint8_t len)