[Tinyos-2-commits] CVS: tinyos-2.x/apps/tests/TestPowerManager MyComponentC.nc, 1.1.2.8, 1.1.2.9 MyComponentP.nc, 1.1.2.5, 1.1.2.6 TestPowerManagerAppC.nc, 1.1.2.5, 1.1.2.6 TestPowerManagerC.nc, 1.1.2.4, 1.1.2.5

Kevin Klues klueska at users.sourceforge.net
Tue Aug 15 04:47:23 PDT 2006


Update of /cvsroot/tinyos/tinyos-2.x/apps/tests/TestPowerManager
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv1361/apps/tests/TestPowerManager

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	MyComponentC.nc MyComponentP.nc TestPowerManagerAppC.nc 
	TestPowerManagerC.nc 
Log Message:


Index: MyComponentC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestPowerManager/MyComponentC.nc,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -C2 -d -r1.1.2.8 -r1.1.2.9
*** MyComponentC.nc	30 Jan 2006 18:25:35 -0000	1.1.2.8
--- MyComponentC.nc	15 Aug 2006 11:47:21 -0000	1.1.2.9
***************
*** 38,42 ****
  configuration MyComponentC{
    provides {
-     interface Init;
      interface Resource[uint8_t];
    }
--- 38,41 ----
***************
*** 47,65 ****
               new FcfsArbiterC(MYCOMPONENT_RESOURCE) as Arbiter,
  //              new AsyncStdControlPowerManagerC() as PowerManager;
! //              new AsyncStdControlDeferredPowerManagerC(750) as PowerManager;
  //              new StdControlPowerManagerC() as PowerManager;
  //              new StdControlDeferredPowerManagerC(750) as PowerManager;
  //              new SplitControlPowerManagerC() as PowerManager;
!              new SplitControlDeferredPowerManagerC(750) as PowerManager;
  
-   Init = Arbiter;
-   Init = PowerManager;
-   Init = LedsC;
    Resource = Arbiter;
  
! //   PowerManager.AsyncStdControl -> MyComponentP.AsyncStdControl;  
  //   PowerManager.StdControl -> MyComponentP.StdControl;
!   PowerManager.SplitControl -> MyComponentP.SplitControl;
!   PowerManager.ArbiterInit -> Arbiter.Init;  
    PowerManager.ResourceController -> Arbiter.ResourceController;
    PowerManager.ArbiterInfo -> Arbiter.ArbiterInfo;
--- 46,60 ----
               new FcfsArbiterC(MYCOMPONENT_RESOURCE) as Arbiter,
  //              new AsyncStdControlPowerManagerC() as PowerManager;
!              new AsyncStdControlDeferredPowerManagerC(750) as PowerManager;
  //              new StdControlPowerManagerC() as PowerManager;
  //              new StdControlDeferredPowerManagerC(750) as PowerManager;
  //              new SplitControlPowerManagerC() as PowerManager;
! //              new SplitControlDeferredPowerManagerC(750) as PowerManager;
  
    Resource = Arbiter;
  
!   PowerManager.AsyncStdControl -> MyComponentP.AsyncStdControl;
  //   PowerManager.StdControl -> MyComponentP.StdControl;
! //   PowerManager.SplitControl -> MyComponentP.SplitControl;
    PowerManager.ResourceController -> Arbiter.ResourceController;
    PowerManager.ArbiterInfo -> Arbiter.ArbiterInfo;


Index: TestPowerManagerAppC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestPowerManager/TestPowerManagerAppC.nc,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -d -r1.1.2.5 -r1.1.2.6
*** TestPowerManagerAppC.nc	4 Feb 2006 01:10:33 -0000	1.1.2.5
--- TestPowerManagerAppC.nc	15 Aug 2006 11:47:21 -0000	1.1.2.6
***************
*** 43,48 ****
    TestPowerManagerC -> MainC.Boot;
    
-   MainC.SoftwareInit -> MyComponentC;
-   
    TestPowerManagerC.TimerMilli -> TimerMilliC;
    TestPowerManagerC.Resource0 -> MyComponentC.Resource[unique("MyComponent.Resource")];
--- 43,46 ----

Index: TestPowerManagerC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestPowerManager/TestPowerManagerC.nc,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -d -r1.1.2.4 -r1.1.2.5
*** TestPowerManagerC.nc	16 Feb 2006 16:48:11 -0000	1.1.2.4
--- TestPowerManagerC.nc	15 Aug 2006 11:47:21 -0000	1.1.2.5
***************
*** 76,81 ****
      if(waiting == TRUE) {
        waiting = FALSE;
!       if(whoHasIt == 0)
!         call Resource1.request();
        if(whoHasIt == 1)
          call Resource0.request();
--- 76,88 ----
      if(waiting == TRUE) {
        waiting = FALSE;
!       if(whoHasIt == 0)  {
!         if(call Resource1.immediateRequest() == SUCCESS) {
!           whoHasIt = 1;
!           call Leds.led2On();
!           call TimerMilli.startOneShot(HOLD_PERIOD);
!           return;
!         }
!         else call Resource1.request();
!       }
        if(whoHasIt == 1)
          call Resource0.request();



More information about the Tinyos-2-commits mailing list