]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/net/ctp/CtpP.nc
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / tos / lib / net / ctp / CtpP.nc
index b2aa76a779dea4345b20d439fdb075706c468d3c..af6e1566643990ea7b11352ba038887c9b178c4b 100644 (file)
@@ -131,7 +131,8 @@ implementation {
   components new AMReceiverC(AM_CTP_DATA);
   components new AMSnooperC(AM_CTP_DATA);
 
-  components new CtpRoutingEngineP(TREE_ROUTING_TABLE_SIZE, 10, 1024) as Router;
+  components new CtpRoutingEngineP(TREE_ROUTING_TABLE_SIZE, 128, 512000) as Router;
+
   StdControl = Router;
   StdControl = Estimator;
   RootControl = Router;
@@ -152,16 +153,10 @@ implementation {
   Router.CtpCongestion -> Forwarder;
   CtpInfo = Router;
 
-  components CC2420ActiveMessageC;
-  components CC2420PacketC as CC2420;
-  Router.CC2420Packet -> CC2420;
   
   components new TimerMilliC() as RetxmitTimer;
   Forwarder.RetxmitTimer -> RetxmitTimer;
 
-  components new TimerMilliC() as CongestionTimer;
-  Forwarder.CongestionTimer -> CongestionTimer;
-
   components RandomC;
   Router.Random -> RandomC;
   Forwarder.Random -> RandomC;
@@ -189,7 +184,25 @@ implementation {
   Estimator.SubReceive -> ReceiveControl;
   Estimator.SubPacket -> SendControl;
   Estimator.SubAMPacket -> SendControl;
-  Estimator.LinkPacketMetadata -> CC2420ActiveMessageC;
+
+#if defined(PLATFORM_TELOSB) || defined(PLATFORM_MICAZ)
+#ifndef TOSSIM
+  components CC2420ActiveMessageC as PlatformActiveMessageC;
+#else
+  components DummyActiveMessageP as PlatformActiveMessageC;
+#endif
+#elif defined (PLATFORM_MICA2) || defined (PLATFORM_MICA2DOT)
+  components CC1000ActiveMessageC as PlatformActiveMessageC;
+#elif defined(PLATFORM_EYESIFXV1) || defined(PLATFORM_EYESIFXV2)
+  components WhiteBitAccessorC as PlatformActiveMessageC;    
+#else
+  components DummyActiveMessageP as PlatformActiveMessageC;
+#endif
+
+  Estimator.LinkPacketMetadata -> PlatformActiveMessageC;
+
+  // eventually
   //  Estimator.LinkPacketMetadata -> ActiveMessageC;
+
   MainC.SoftwareInit -> Estimator;
 }