[Tinyos-2-commits] CVS: tinyos-2.x/apps/tests/TestSharedResource
README.txt, 1.1.2.1, 1.1.2.2 ResourceOperations.nc, 1.1.2.1,
1.1.2.2 ResourceP.nc, 1.1.2.2, 1.1.2.3 SharedResourceC.nc,
1.1.2.1, 1.1.2.2 SharedResourceImplP.nc, 1.1.2.2,
1.1.2.3 SharedResourceP.nc, 1.1.2.1,
1.1.2.2 TestSharedResourceAppC.nc, 1.1.2.1,
1.1.2.2 TestSharedResourceC.nc, 1.1.2.1, 1.1.2.2
Kevin Klues
klueska at users.sourceforge.net
Fri Nov 3 11:17:48 PST 2006
Update of /cvsroot/tinyos/tinyos-2.x/apps/tests/TestSharedResource
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv11237
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
README.txt ResourceOperations.nc ResourceP.nc
SharedResourceC.nc SharedResourceImplP.nc SharedResourceP.nc
TestSharedResourceAppC.nc TestSharedResourceC.nc
Log Message:
Update of doccumentation for the TestSharedResource application.
Index: README.txt
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestSharedResource/Attic/README.txt,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** README.txt 31 Oct 2006 08:44:21 -0000 1.1.2.1
--- README.txt 3 Nov 2006 19:17:44 -0000 1.1.2.2
***************
*** 1,6 ****
! README for TestSharedResourceArbiter
Author/Contact: tinyos-help at millennium.berkeley.edu
@author Kevin Klues <klues at tkn.tu-berlin.de>
Tools:
--- 1,29 ----
! README for TestFcfsArbiter
Author/Contact: tinyos-help at millennium.berkeley.edu
@author Kevin Klues <klues at tkn.tu-berlin.de>
+ Description:
+
+ This application is used to test the use of Shared Resources.
+ Three Resource users are created and all three request
+ control of the resource before any one of them is granted it.
+ Once the first user is granted control of the resource, it performs
+ some operation on it. Once this operation has completed, a timer
+ is set to allow this user to have control of it for a specific
+ amount of time. Once this timer expires, the resource is released
+ and then immediately requested again. Upon releasing the resource
+ control will be granted to the next user that has requested it in
+ round robin order. Initial requests are made by the three resource
+ users in the following order.
+ -- Resource 0
+ -- Resource 2
+ -- Resource 1
+ It is expected then that using a round robin policy, control of the
+ resource will be granted in the order of 0,1,2 and the Leds
+ corresponding to each resource will flash whenever this occurs.
+ -- Led 0 -> Resource 0
+ -- Led 1 -> Resource 1
+ -- Led 2 -> Resource 2
+
Tools:
Index: ResourceOperations.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestSharedResource/Attic/ResourceOperations.nc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** ResourceOperations.nc 31 Oct 2006 08:44:21 -0000 1.1.2.1
--- ResourceOperations.nc 3 Nov 2006 19:17:44 -0000 1.1.2.2
***************
*** 22,25 ****
--- 22,29 ----
/**
+ * An EXAMPLE of an interface for performing operations on a resource.
+ * In this test application it is provided by the dedicated ResourceP component
+ * and passed through all of the proper components before being exposed by the
+ * shared resource at the topmost level.
*
* @author Kevin Klues (klueska at cs.wustl.edu)
Index: ResourceP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestSharedResource/Attic/ResourceP.nc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** ResourceP.nc 31 Oct 2006 20:29:02 -0000 1.1.2.2
--- ResourceP.nc 3 Nov 2006 19:17:44 -0000 1.1.2.3
***************
*** 22,25 ****
--- 22,29 ----
/**
+ * This is an example implementation of a dedicated resource.
+ * It provides the SplitControl interface for power management
+ * of the resource and an EXAMPLE ResourceOperations interface
+ * for performing operations on it.
*
* @author Kevin Klues (klueska at cs.wustl.edu)
Index: SharedResourceC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestSharedResource/Attic/SharedResourceC.nc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** SharedResourceC.nc 31 Oct 2006 08:44:21 -0000 1.1.2.1
--- SharedResourceC.nc 3 Nov 2006 19:17:44 -0000 1.1.2.2
***************
*** 22,25 ****
--- 22,30 ----
/**
+ * SharedResourceC is used to provide a generic configuration around
+ * the SharedResourceP component so that new instantiations of
+ * it provide a single set of interfaces that are all properly associated
+ * with one another rather than requiring the user to deal with the complexity
+ * of doing this themselves.
*
* @author Kevin Klues (klueska at cs.wustl.edu)
Index: SharedResourceImplP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestSharedResource/Attic/SharedResourceImplP.nc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** SharedResourceImplP.nc 31 Oct 2006 20:29:02 -0000 1.1.2.2
--- SharedResourceImplP.nc 3 Nov 2006 19:17:44 -0000 1.1.2.3
***************
*** 22,25 ****
--- 22,29 ----
/**
+ * The SharedResourceImplP component is used to wrap all of the operations
+ * from a dedicated resource so that access to them is protected when
+ * it is used as a shared resource. It uses the ArbiterInfo interface
+ * provided by an Arbiter to accomplish this.
*
* @author Kevin Klues (klueska at cs.wustl.edu)
Index: SharedResourceP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestSharedResource/Attic/SharedResourceP.nc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** SharedResourceP.nc 31 Oct 2006 08:44:21 -0000 1.1.2.1
--- SharedResourceP.nc 3 Nov 2006 19:17:44 -0000 1.1.2.2
***************
*** 22,25 ****
--- 22,27 ----
/**
+ * The SharedResourceP component is used to create a shared resource
+ * out of a dedicated one.
*
* @author Kevin Klues (klueska at cs.wustl.edu)
Index: TestSharedResourceAppC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestSharedResource/Attic/TestSharedResourceAppC.nc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** TestSharedResourceAppC.nc 31 Oct 2006 08:44:21 -0000 1.1.2.1
--- TestSharedResourceAppC.nc 3 Nov 2006 19:17:44 -0000 1.1.2.2
***************
*** 23,26 ****
--- 23,49 ----
/**
*
+ * This application is used to test the use of Shared Resources.
+ * Three Resource users are created and all three request
+ * control of the resource before any one of them is granted it.
+ * Once the first user is granted control of the resource, it performs
+ * some operation on it. Once this operation has completed, a timer
+ * is set to allow this user to have control of it for a specific
+ * amount of time. Once this timer expires, the resource is released
+ * and then immediately requested again. Upon releasing the resource
+ * control will be granted to the next user that has requested it in
+ * round robin order. Initial requests are made by the three resource
+ * users in the following order.<br>
+ * <li> Resource 0
+ * <li> Resource 2
+ * <li> Resource 1
+ * <br>
+ * It is expected then that using a round robin policy, control of the
+ * resource will be granted in the order of 0,1,2 and the Leds
+ * corresponding to each resource will flash whenever this occurs.<br>
+ * <li> Led 0 -> Resource 0
+ * <li> Led 1 -> Resource 1
+ * <li> Led 2 -> Resource 2
+ * <br>
+ *
* @author Kevin Klues (klueska at cs.wustl.edu)
* @version $Revision$
Index: TestSharedResourceC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestSharedResource/Attic/TestSharedResourceC.nc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** TestSharedResourceC.nc 31 Oct 2006 08:44:21 -0000 1.1.2.1
--- TestSharedResourceC.nc 3 Nov 2006 19:17:44 -0000 1.1.2.2
***************
*** 21,32 ****
*/
/**
*
* @author Kevin Klues (klueska at cs.wustl.edu)
* @version $Revision$
* @date $Date$
*/
-
- #include "Timer.h"
module TestSharedResourceC {
--- 21,55 ----
*/
+ #include "Timer.h"
+
/**
*
+ * This application is used to test the use of Shared Resources.
+ * Three Resource users are created and all three request
+ * control of the resource before any one of them is granted it.
+ * Once the first user is granted control of the resource, it performs
+ * some operation on it. Once this operation has completed, a timer
+ * is set to allow this user to have control of it for a specific
+ * amount of time. Once this timer expires, the resource is released
+ * and then immediately requested again. Upon releasing the resource
+ * control will be granted to the next user that has requested it in
+ * round robin order. Initial requests are made by the three resource
+ * users in the following order.<br>
+ * <li> Resource 0
+ * <li> Resource 2
+ * <li> Resource 1
+ * <br>
+ * It is expected then that using a round robin policy, control of the
+ * resource will be granted in the order of 0,1,2 and the Leds
+ * corresponding to each resource will flash whenever this occurs.<br>
+ * <li> Led 0 -> Resource 0
+ * <li> Led 1 -> Resource 1
+ * <li> Led 2 -> Resource 2
+ * <br>
+ *
* @author Kevin Klues (klueska at cs.wustl.edu)
* @version $Revision$
* @date $Date$
*/
module TestSharedResourceC {
More information about the Tinyos-2-commits
mailing list