X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Flib%2Fnet%2Fctp%2FCtpP.nc;h=af6e1566643990ea7b11352ba038887c9b178c4b;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hp=43254bb6a524372e71a32e91cd20d6f6cd442366;hpb=2bb921603dd4304083b1921817198f85631f4232;p=tinyos-2.x.git diff --git a/tos/lib/net/ctp/CtpP.nc b/tos/lib/net/ctp/CtpP.nc index 43254bb6..af6e1566 100644 --- a/tos/lib/net/ctp/CtpP.nc +++ b/tos/lib/net/ctp/CtpP.nc @@ -130,8 +130,9 @@ 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, 128, 512000) as Router; + StdControl = Router; StdControl = Estimator; RootControl = Router; @@ -139,7 +140,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,12 +153,10 @@ implementation { Router.CtpCongestion -> Forwarder; CtpInfo = Router; + components new TimerMilliC() as RetxmitTimer; Forwarder.RetxmitTimer -> RetxmitTimer; - components new TimerMilliC() as CongestionTimer; - Forwarder.CongestionTimer -> CongestionTimer; - components RandomC; Router.Random -> RandomC; Forwarder.Random -> RandomC; @@ -177,9 +178,31 @@ 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; +#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; }