]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/system/AMSenderC.nc
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / tos / system / AMSenderC.nc
index eba17537e52b32f748fc2554f5d047a2b91a8552..7d293a3127c52c2c1f6b1b8e2f7cf4791747a2d6 100644 (file)
@@ -46,14 +46,15 @@ generic configuration AMSenderC(am_id_t AMId) {
 }
 
 implementation {
-  components new AMQueueEntryP(AMId) as AMQueueEntryP;
-  components AMQueueP, ActiveMessageC;
 
-  AMQueueEntryP.Send -> AMQueueP.Send[unique(UQ_AMQUEUE_SEND)];
-  AMQueueEntryP.AMPacket -> ActiveMessageC;
-  
-  AMSend = AMQueueEntryP;
-  Packet = ActiveMessageC;
-  AMPacket = ActiveMessageC;
-  Acks = ActiveMessageC;
+#if defined(LOW_POWER_LISTENING)
+  components new LplAMSenderC(AMId) as SenderC;
+#else
+  components new DirectAMSenderC(AMId) as SenderC;
+#endif
+
+  AMSend = SenderC;
+  Packet = SenderC;
+  AMPacket = SenderC;
+  Acks = SenderC;
 }