]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/net/ctp/CtpP.nc
temporary fix: do not wire to CC2420ActiveMessageP if
[tinyos-2.x.git] / tos / lib / net / ctp / CtpP.nc
index 43254bb6a524372e71a32e91cd20d6f6cd442366..7cf98717b77d515284845d6171a43a7788d865fb 100644 (file)
@@ -130,8 +130,8 @@ implementation {
   components new AMSenderC(AM_CTP_DATA);
   components new AMReceiverC(AM_CTP_DATA);
   components new AMSnooperC(AM_CTP_DATA);
-  
-  components new CtpRoutingEngineP(TREE_ROUTING_TABLE_SIZE, 1, 1024) as Router;
+
+  components new CtpRoutingEngineP(TREE_ROUTING_TABLE_SIZE, 10, 1024) as Router;
   StdControl = Router;
   StdControl = Estimator;
   RootControl = Router;
@@ -139,7 +139,9 @@ implementation {
   Router.BeaconSend -> Estimator.Send;
   Router.BeaconReceive -> Estimator.Receive;
   Router.LinkEstimator -> Estimator.LinkEstimator;
-  Router.LinkSrcPacket -> Estimator.LinkSrcPacket;
+
+  Router.CompareBit -> Estimator.CompareBit;
+
   Router.AMPacket -> ActiveMessageC;
   Router.RadioControl -> ActiveMessageC;
   Router.BeaconTimer -> RoutingBeaconTimer;
@@ -150,6 +152,7 @@ implementation {
   Router.CtpCongestion -> Forwarder;
   CtpInfo = Router;
 
+  
   components new TimerMilliC() as RetxmitTimer;
   Forwarder.RetxmitTimer -> RetxmitTimer;
 
@@ -177,9 +180,29 @@ implementation {
 
   LinkEstimator = Estimator;
   
+  Estimator.Random -> RandomC;
+
   Estimator.AMSend -> SendControl;
   Estimator.SubReceive -> ReceiveControl;
   Estimator.SubPacket -> SendControl;
   Estimator.SubAMPacket -> SendControl;
+
+#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;
+#else
+  components DummyActiveMessageP as PlatformActiveMessageC;
+#endif
+
+  Estimator.LinkPacketMetadata -> PlatformActiveMessageC;
+
+  // eventually
+  //  Estimator.LinkPacketMetadata -> ActiveMessageC;
+
   MainC.SoftwareInit -> Estimator;
 }