]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Move the wiring for underlying AMSend/Receive/Snoop interfaces from CAMRadioC.nc...
authorliang_mike <liang_mike>
Wed, 7 Jan 2009 04:12:39 +0000 (04:12 +0000)
committerliang_mike <liang_mike>
Wed, 7 Jan 2009 04:12:39 +0000 (04:12 +0000)
BlockingActiveMessageC.nc and from CAMSerialC.nc/BlockingSerialAM*C.nc to BlockingSerialActiveMessageC.nc.

This prevents those interfaces from being wired multiple times in the case of multiple users.

apps/tosthreads/apps/BaseStation/BaseStationAppC.nc
tos/lib/tosthreads/csystem/CAMRadioC.nc
tos/lib/tosthreads/csystem/CAMSerialC.nc
tos/lib/tosthreads/system/BlockingAMReceiverC.nc
tos/lib/tosthreads/system/BlockingAMSenderC.nc
tos/lib/tosthreads/system/BlockingAMSnooperC.nc
tos/lib/tosthreads/system/BlockingActiveMessageC.nc
tos/lib/tosthreads/system/BlockingSerialAMReceiverC.nc
tos/lib/tosthreads/system/BlockingSerialAMSenderC.nc
tos/lib/tosthreads/system/BlockingSerialActiveMessageC.nc

index 46f26a53f8df13d2eeca75264cb2dd1acae1ac77..a6d8832a58d4e894a14978b310f23d7b3c93913c 100644 (file)
@@ -105,12 +105,4 @@ implementation
   SerialReceiveRadioSendP.SendAMPacket -> BlockingRadioActiveMessageC;             
   SerialReceiveRadioSendP.BlockingReceiveAny -> BlockingSerialActiveMessageC.BlockingReceiveAny;
   SerialReceiveRadioSendP.BlockingAMSend -> BlockingRadioActiveMessageC;
-  
-  components ActiveMessageC, SerialActiveMessageC;
-  BlockingRadioActiveMessageC.Receive -> ActiveMessageC.Receive;
-  BlockingRadioActiveMessageC.Snoop -> ActiveMessageC.Snoop;
-  BlockingRadioActiveMessageC.AMSend -> ActiveMessageC.AMSend;
-  
-  BlockingSerialActiveMessageC.Receive -> SerialActiveMessageC.Receive;
-  BlockingSerialActiveMessageC.AMSend -> SerialActiveMessageC.AMSend;
 }
index 8cb7f658d6480e310c9f4d4a513f3a81f0f9df7c..a066c05f251e32ccf53c19a6ae1535f902800dbc 100644 (file)
@@ -30,7 +30,6 @@ configuration CAMRadioC {}
 
 implementation {
   components CAMRadioP as CAMP;
-  components ActiveMessageC;
   components BlockingActiveMessageC as AM;
   
   CAMP.BlockingStdControl -> AM;
@@ -42,8 +41,4 @@ implementation {
   CAMP.Packet -> AM;
   CAMP.AMPacket -> AM;
   CAMP.PacketAcknowledgements -> AM;
-  
-  AM.Receive -> ActiveMessageC.ReceiveDefault;
-  AM.Snoop -> ActiveMessageC.SnoopDefault;
-  AM.AMSend -> ActiveMessageC;
 }
index ec6b299bf2c975df85cae8c66128471383ee3db4..ac776aa46797753b969a33e9fc506e066efc3b61 100644 (file)
@@ -30,7 +30,6 @@ configuration CAMSerialC {}
 
 implementation {
   components CAMSerialP as CAMP;
-  components SerialActiveMessageC;
   components BlockingSerialActiveMessageC as AM;
   
   CAMP.BlockingStdControl -> AM;
@@ -40,7 +39,4 @@ implementation {
   CAMP.Packet -> AM;
   CAMP.AMPacket -> AM;
   CAMP.PacketAcknowledgements -> AM;
-  
-  AM.Receive -> SerialActiveMessageC.Receive;
-  AM.AMSend -> SerialActiveMessageC.AMSend;
 }
index 0bbd0b7f159ddd211282420fd553ae82defa85c1..f36760101ac6601cf95b18a586ca1eaf66706abd 100644 (file)
@@ -44,10 +44,8 @@ generic configuration BlockingAMReceiverC(am_id_t amId) {
   }
 }
 implementation {
-  components ActiveMessageC;
   components BlockingActiveMessageC as AM;
   BlockingReceive = AM.BlockingReceive[amId];
-  AM.Receive[amId] -> ActiveMessageC.ReceiveDefault[amId];
   
   Packet = AM;
   AMPacket = AM;
index 142a8d7ee56e465a98d6c212dcfd19bee19280e0..4d70b1e0670d586590dd3ef2b125f2398b45f666 100644 (file)
@@ -45,10 +45,8 @@ generic configuration BlockingAMSenderC(am_id_t AMId) {
 }
 
 implementation {
-  components ActiveMessageC;
   components BlockingActiveMessageC as AM;
   BlockingAMSend = AM.BlockingAMSend[AMId];
-  AM.AMSend[AMId] -> ActiveMessageC.AMSend[AMId];
   
   Packet = AM;
   AMPacket = AM;
index 5564b534e01a07f1772760e5837eceb7642e7b88..3f90b911fc396137e6870dfdd3744a4ee0426be6 100644 (file)
@@ -44,10 +44,8 @@ generic configuration BlockingAMSnooperC(am_id_t amId) {
   }
 }
 implementation {
-  components ActiveMessageC;
   components BlockingActiveMessageC as AM;
   BlockingReceive = AM.BlockingSnoop[amId];
-  AM.Snoop[amId] -> ActiveMessageC.SnoopDefault[amId];
   
   Packet = AM;
   AMPacket = AM;
index f749e1c9401f0129328d0a01077ba07d0db3fb97..f3ab2dcdfc4f3c7cc8cb06d18f01fcc70b88bb75 100644 (file)
@@ -46,11 +46,6 @@ configuration BlockingActiveMessageC {
     interface AMPacket;
     interface PacketAcknowledgements;
   }
-  uses {
-    interface Receive as Receive[uint8_t id];
-    interface Receive as Snoop[uint8_t id];
-    interface AMSend as AMSend[uint8_t id];
-  }
 }
 implementation {
   components ActiveMessageC as AM;
@@ -66,9 +61,9 @@ implementation {
   BlockingAMSend = AMSenderP;
   
   BlockingStdControlC.SplitControl -> AM;
-  Receive = AMReceiverP.Receive;
-  Snoop = AMSnooperP.Snoop;
-  AMSend = AMSenderP.AMSend;
+  AMReceiverP.Receive -> AM.Receive;
+  AMSnooperP.Snoop -> AM.Snoop;
+  AMSenderP.AMSend -> AM.AMSend;
     
   Packet       = AM;
   AMPacket     = AM;
index bbd8938010b2900b85dd7c0506e020d0943e282c..7ec4d389e90bbe05092c548e59141ad0238b80a9 100644 (file)
@@ -43,10 +43,8 @@ generic configuration BlockingSerialAMReceiverC(am_id_t amId) {
   }
 }
 implementation {
-  components SerialActiveMessageC;
   components BlockingSerialActiveMessageC as AM;
   BlockingReceive = AM.BlockingReceive[amId];
-  AM.Receive[amId] -> SerialActiveMessageC.Receive[amId];
   
   Packet = AM;
   AMPacket = AM;
index 66c9262c716e4cea9ab467d696f131ed2a8cb5a2..b866dea1f413632f3cf48499ceaf196943562bc1 100644 (file)
@@ -45,10 +45,8 @@ generic configuration BlockingSerialAMSenderC(am_id_t AMId) {
 }
 
 implementation {
-  components SerialActiveMessageC;
   components BlockingSerialActiveMessageC as AM;
   BlockingAMSend = AM.BlockingAMSend[AMId];
-  AM.AMSend[AMId] -> SerialActiveMessageC.AMSend[AMId];
   
   Packet = AM;
   AMPacket = AM;
index f9b9ed3d75fd70e18f6d13a7ab4beab0b1666cbd..82ef08db204e1ece1ef2691ac2dc3e3acee7bab2 100644 (file)
@@ -44,24 +44,21 @@ configuration BlockingSerialActiveMessageC {
     interface AMPacket;
     interface PacketAcknowledgements;
   }
-  uses {
-    interface Receive as Receive[uint8_t id];
-    interface AMSend as AMSend[uint8_t id];
-  }
 }
 implementation {
   components SerialActiveMessageC as AM;
   components new BlockingStdControlC();
   components BlockingSerialAMReceiverP as AMReceiverP;
   components BlockingSerialAMSenderP as AMSenderP;
+  
   BlockingStdControl = BlockingStdControlC;
   BlockingReceive = AMReceiverP;
   BlockingReceiveAny = AMReceiverP;
   BlockingAMSend = AMSenderP;
   
   BlockingStdControlC.SplitControl -> AM;
-  Receive = AMReceiverP.Receive;
-  AMSend = AMSenderP.AMSend;
+  AMReceiverP.Receive -> AM.Receive;
+  AMSenderP.AMSend -> AM.AMSend;
     
   Packet       = AM;
   AMPacket     = AM;