[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/power
AsyncDeferredPowerManagerP.nc, 1.1.2.2.6.4,
1.1.2.2.6.5 AsyncPowerManagerP.nc, 1.1.2.3.2.4,
1.1.2.3.2.5 DeferredPowerManagerP.nc, 1.1.2.4.6.4,
1.1.2.4.6.5 PowerManagerP.nc, 1.1.2.3.2.4, 1.1.2.3.2.5
Kevin Klues
klueska at users.sourceforge.net
Wed Jul 5 05:01:29 PDT 2006
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/power
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv6691/tos/lib/power
Modified Files:
Tag: tos-2-resource-pm-eval-cand
AsyncDeferredPowerManagerP.nc AsyncPowerManagerP.nc
DeferredPowerManagerP.nc PowerManagerP.nc
Log Message:
Changes to the Resource interfaces and arbiter implementations. Now has support for immediateRequest again, and no longer need a separate PriorityArbiter because of the introduction of the ResourceRequested interface. In fact the Resource interface is now back to what it was originally, with changes to the ResourceController interface and the introduction of the ResourceRequested interface simplifying the state machines in the arbiters.
See previous check in logs to read about these changes to the ResourceController interface.
Index: AsyncDeferredPowerManagerP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/power/Attic/AsyncDeferredPowerManagerP.nc,v
retrieving revision 1.1.2.2.6.4
retrieving revision 1.1.2.2.6.5
diff -C2 -d -r1.1.2.2.6.4 -r1.1.2.2.6.5
*** AsyncDeferredPowerManagerP.nc 27 Jun 2006 21:09:38 -0000 1.1.2.2.6.4
--- AsyncDeferredPowerManagerP.nc 5 Jul 2006 12:01:27 -0000 1.1.2.2.6.5
***************
*** 62,71 ****
implementation {
! task void timerTask() {
! call TimerMilli.startOneShot(delay);
! }
! event void ResourceController.requested() {
call TimerMilli.stop();
call AsyncStdControl.start();
call ResourceController.release();
--- 62,80 ----
implementation {
! norace bool stopTimer = FALSE;
! task void stopTimerTask() {
call TimerMilli.stop();
+ stopTimer = FALSE;
+ }
+
+ task void timerTask() {
+ if(stopTimer == FALSE)
+ call TimerMilli.startOneShot(delay);
+ }
+
+ async event void ResourceController.requested() {
+ stopTimer = TRUE;
+ post stopTimerTask();
call AsyncStdControl.start();
call ResourceController.release();
***************
*** 73,77 ****
async event void ResourceController.immediateRequested() {
! call TimerMilli.stop();
call AsyncStdControl.start();
call ResourceController.release();
--- 82,87 ----
async event void ResourceController.immediateRequested() {
! stopTimer = TRUE;
! post stopTimerTask();
call AsyncStdControl.start();
call ResourceController.release();
***************
*** 83,88 ****
event void TimerMilli.fired() {
! call PowerDownCleanup.cleanup();
! call AsyncStdControl.stop();
}
--- 93,100 ----
event void TimerMilli.fired() {
! if(stopTimer == FALSE) {
! call PowerDownCleanup.cleanup();
! call AsyncStdControl.stop();
! }
}
Index: AsyncPowerManagerP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/power/Attic/AsyncPowerManagerP.nc,v
retrieving revision 1.1.2.3.2.4
retrieving revision 1.1.2.3.2.5
diff -C2 -d -r1.1.2.3.2.4 -r1.1.2.3.2.5
*** AsyncPowerManagerP.nc 27 Jun 2006 21:09:38 -0000 1.1.2.3.2.4
--- AsyncPowerManagerP.nc 5 Jul 2006 12:01:27 -0000 1.1.2.3.2.5
***************
*** 57,61 ****
implementation {
! event void ResourceController.requested() {
call AsyncStdControl.start();
call ResourceController.release();
--- 57,61 ----
implementation {
! async event void ResourceController.requested() {
call AsyncStdControl.start();
call ResourceController.release();
Index: DeferredPowerManagerP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/power/Attic/DeferredPowerManagerP.nc,v
retrieving revision 1.1.2.4.6.4
retrieving revision 1.1.2.4.6.5
diff -C2 -d -r1.1.2.4.6.4 -r1.1.2.4.6.5
*** DeferredPowerManagerP.nc 27 Jun 2006 21:09:38 -0000 1.1.2.4.6.4
--- DeferredPowerManagerP.nc 5 Jul 2006 12:01:27 -0000 1.1.2.4.6.5
***************
*** 64,68 ****
norace bool stopping = FALSE;
! bool requested = FALSE;
task void timerTask() {
--- 64,76 ----
norace bool stopping = FALSE;
! norace bool requested = FALSE;
! norace bool stopTimer = FALSE;
!
! task void startTask() {
! call TimerMilli.stop();
! stopTimer = FALSE;
! call StdControl.start();
! call SplitControl.start();
! }
task void timerTask() {
***************
*** 70,78 ****
}
! event void ResourceController.requested() {
if(stopping == FALSE) {
! call TimerMilli.stop();
! call StdControl.start();
! call SplitControl.start();
}
else atomic requested = TRUE;
--- 78,85 ----
}
! async event void ResourceController.requested() {
if(stopping == FALSE) {
! stopTimer = TRUE;
! post startTask();
}
else atomic requested = TRUE;
***************
*** 99,106 ****
--- 106,115 ----
event void TimerMilli.fired() {
+ if(stopTimer == FALSE) {
stopping = TRUE;
call PowerDownCleanup.cleanup();
call StdControl.stop();
call SplitControl.stop();
+ }
}
Index: PowerManagerP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/power/Attic/PowerManagerP.nc,v
retrieving revision 1.1.2.3.2.4
retrieving revision 1.1.2.3.2.5
diff -C2 -d -r1.1.2.3.2.4 -r1.1.2.3.2.5
*** PowerManagerP.nc 27 Jun 2006 21:09:38 -0000 1.1.2.3.2.4
--- PowerManagerP.nc 5 Jul 2006 12:01:27 -0000 1.1.2.3.2.5
***************
*** 61,64 ****
--- 61,69 ----
bool requested = FALSE;
+ task void startTask() {
+ call StdControl.start();
+ call SplitControl.start();
+ }
+
task void stopTask() {
call PowerDownCleanup.cleanup();
***************
*** 67,74 ****
}
! event void ResourceController.requested() {
if(stopping == FALSE) {
! call StdControl.start();
! call SplitControl.start();
}
else requested = TRUE;
--- 72,78 ----
}
! async event void ResourceController.requested() {
if(stopping == FALSE) {
! post startTask();
}
else requested = TRUE;
More information about the Tinyos-2-commits
mailing list