[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/ctp DummyActiveMessageP.nc, NONE, 1.1 CtpP.nc, 1.5, 1.6 CtpRoutingEngineP.nc, 1.10, 1.11

Omprakash Gnawali gnawali at users.sourceforge.net
Mon Sep 24 10:00:20 PDT 2007


Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/net/ctp
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9423

Modified Files:
	CtpP.nc CtpRoutingEngineP.nc 
Added Files:
	DummyActiveMessageP.nc 
Log Message:
accommodate cc1000 and cc2420 platforms by wiring to platform specific active message, for rest use a dummy for now that always returns 1 for LinkPacketMetadata.highChannelQuality call

--- NEW FILE: DummyActiveMessageP.nc ---
module DummyActiveMessageP {
  provides interface LinkPacketMetadata;
}

implementation
{

  async command bool LinkPacketMetadata.highChannelQuality(message_t* msg) {
    return 1;
  }

}

Index: CtpP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/ctp/CtpP.nc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CtpP.nc	21 Sep 2007 23:50:28 -0000	1.5
--- CtpP.nc	24 Sep 2007 17:00:18 -0000	1.6
***************
*** 153,159 ****
    CtpInfo = Router;
  
-   components CC2420ActiveMessageC;
-   components CC2420PacketC as CC2420;
-   Router.CC2420Packet -> CC2420;
    
    components new TimerMilliC() as RetxmitTimer;
--- 153,156 ----
***************
*** 190,195 ****
    Estimator.SubPacket -> SendControl;
    Estimator.SubAMPacket -> SendControl;
!   Estimator.LinkPacketMetadata -> CC2420ActiveMessageC;
    //  Estimator.LinkPacketMetadata -> ActiveMessageC;
    MainC.SoftwareInit -> Estimator;
  }
--- 187,204 ----
    Estimator.SubPacket -> SendControl;
    Estimator.SubAMPacket -> SendControl;
! 
! #if defined(PLATFORM_TELOSB) || defined(PLATFORM_MICAZ)
!   components CC2420ActiveMessageC as PlatformActiveMessageC;
! #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;
  }

Index: CtpRoutingEngineP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/ctp/CtpRoutingEngineP.nc,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** CtpRoutingEngineP.nc	24 Sep 2007 14:01:22 -0000	1.10
--- CtpRoutingEngineP.nc	24 Sep 2007 17:00:18 -0000	1.11
***************
*** 116,120 ****
  
  	interface CompareBit;
- 	interface CC2420Packet;
  
      }
--- 116,119 ----



More information about the Tinyos-2-commits mailing list