[Tinyos-2-commits] CVS: tinyos-2.x/tos/interfaces ImmediateResource.nc, 1.1.2.1, 1.1.2.2 Resource.nc, 1.1.2.9.2.1, 1.1.2.9.2.2 ResourceController.nc, 1.1.2.3.2.1, 1.1.2.3.2.2

Kevin Klues klueska at users.sourceforge.net
Wed Jun 7 03:47:19 PDT 2006


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

Modified Files:
      Tag: tos-2-resource-pm-eval-cand
	ImmediateResource.nc Resource.nc ResourceController.nc 
Log Message:
changes to the Resource and PowerManager interfaces as discussed in the meeting on may 19th.

Index: ImmediateResource.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/interfaces/Attic/ImmediateResource.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
*** ImmediateResource.nc	15 May 2006 18:17:59 -0000	1.1.2.1
--- ImmediateResource.nc	7 Jun 2006 10:47:17 -0000	1.1.2.2
***************
*** 51,61 ****
   */
   
- /*
-  * - Revision -------------------------------------------------------------
-  * $Revision$
-  * $Date$ 
-  * ======================================================================== 
-  */
-  
  /**
   * Please refer to TEP 108 for more information about this interface and its
--- 51,54 ----
***************
*** 68,71 ****
--- 61,66 ----
   *
   * @author Kevin Klues (klueska at cs.wustl.edu)
+  * @version $Revision$
+  * @date $Date$
   */
  
***************
*** 75,79 ****
     * release() when you are done with it.
     *
!    * @return SUCCESS You now have cotnrol of the resource.<br>
     *         EBUSY The resource is busy.  You must try again later
     */
--- 70,74 ----
     * release() when you are done with it.
     *
!    * @return SUCCESS You now have control of the resource.<br>
     *         EBUSY The resource is busy.  You must try again later
     */
***************
*** 82,87 ****
    /**
     * Release a shared resource you previously acquired.
     */
!   async command void release();
  
    /**
--- 77,86 ----
    /**
     * Release a shared resource you previously acquired.
+    *
+    * @return SUCCESS The resource has been released. <br>
+    *             FAIL You tried to release but you are not the
+    *                    owner of the resource
     */
!   async command error_t release();
  
    /**

Index: Resource.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/interfaces/Attic/Resource.nc,v
retrieving revision 1.1.2.9.2.1
retrieving revision 1.1.2.9.2.2
diff -C2 -d -r1.1.2.9.2.1 -r1.1.2.9.2.2
*** Resource.nc	15 May 2006 18:17:59 -0000	1.1.2.9.2.1
--- Resource.nc	7 Jun 2006 10:47:17 -0000	1.1.2.9.2.2
***************
*** 51,61 ****
   */
   
- /*
-  * - Revision -------------------------------------------------------------
-  * $Revision$
-  * $Date$ 
-  * ======================================================================== 
-  */
-  
  /**
   * Please refer to TEP 108 for more information about this interface and its
--- 51,54 ----
***************
*** 68,71 ****
--- 61,66 ----
   *
   * @author Kevin Klues (klueska at cs.wustl.edu)
+  * @version $Revision$
+  * @date $Date$
   */
  
***************
*** 81,96 ****
     *               granted event is pending
     */
!   command error_t request();
  
    /**
!    * You are now in control of the resource. Note that this event
!    * is NOT signaled when immediateRequest() succeeds.
     */
    event void granted();
     
    /**
!    * Release a shared resource you previously acquired.
!    */
!   command void release();
  
    /**
--- 76,95 ----
     *               granted event is pending
     */
!   async command error_t request();
  
    /**
!    * You are now in control of the resource.
     */
    event void granted();
     
    /**
!   * Release a shared resource you previously acquired in synchronous context.
!   *
!   * @return SUCCESS The resource has been released or a pending request
!   *                           has been cancelled. <br>
!   *             FAIL You tried to release but you are not the
!   *                    owner of the resource and you have no requests pending
!   */
!   command error_t release();
  
    /**
***************
*** 98,102 ****
     *  owner of the Resource
     *  @return TRUE  It is the owner <br>
!    *          FALSE It is not the owner
     */
    async command bool isOwner();
--- 97,101 ----
     *  owner of the Resource
     *  @return TRUE  It is the owner <br>
!    *             FALSE It is not the owner
     */
    async command bool isOwner();

Index: ResourceController.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/interfaces/Attic/ResourceController.nc,v
retrieving revision 1.1.2.3.2.1
retrieving revision 1.1.2.3.2.2
diff -C2 -d -r1.1.2.3.2.1 -r1.1.2.3.2.2
*** ResourceController.nc	15 May 2006 18:17:59 -0000	1.1.2.3.2.1
--- ResourceController.nc	7 Jun 2006 10:47:17 -0000	1.1.2.3.2.2
***************
*** 51,61 ****
   */
   
- /*
-  * - Revision -------------------------------------------------------------
-  * $Revision$
-  * $Date$ 
-  * ======================================================================== 
-  */
-  
  /**
   * Please refer to TEP 108 for more information about this interface and its
--- 51,54 ----
***************
*** 63,67 ****
   *
   * This interface is an extension of the Resource interface.  It has all of the
!  * commands and events present in the Resource interface, along with two additional
   * events.  These events allow the user of this interface to be notified whenever
   * someone requests the use of a resource or whenever the resource becomes idle.
--- 56,61 ----
   *
   * This interface is an extension of the Resource interface.  It has all of the
!  * commands and events present in both the Resource interface, and the
!  * ImmediateResource interface along with two additional
   * events.  These events allow the user of this interface to be notified whenever
   * someone requests the use of a resource or whenever the resource becomes idle.
***************
*** 70,97 ****
   * release it based on requests from other users.
   *
!  * @author Kevin Klues (klues at tkn.tu-berlin.de)
   */
  
  interface ResourceController {
    /**
!    * Request access to a shared resource. You must call release()
!    * when you are done with it.
!    *
!    * @return SUCCESS When a request has been accepted. The granted()
!    *                 event will be signaled once you have control of the
!    *                 resource.<br>
!    *         EBUSY You have already requested this resource and a
!    *               granted event is pending
    */
!   command error_t request();
  
    /**
!   * Request immediate access to a shared resource. You must call
!   * release() when you are done with it.
    *
!   * @return SUCCESS You now have cotnrol of the resource.<br>
!   *         EBUSY The resource is busy.  You must try again later
    */
!   command error_t immediateRequest();
  
    /**
--- 64,102 ----
   * release it based on requests from other users.
   *
!  * @author Kevin Klues (klueska at cs.wustl.edu)
!  * @version $Revision$
!  * @date $Date$ 
   */
  
  interface ResourceController {
    /**
!   * Request immediate access to the shared resource. You must call
!   * release() when you are done with it.
!   *
!   * @return SUCCESS You now have control of the resource.<br>
!   *            EBUSY The resource is busy.  You must try again later
    */
!   async command error_t request();
  
    /**
!   * Release a shared resource you previously acquired in synchronous context.
    *
!   * @return SUCCESS The resource has been released and pending requests
!   *                           can resume. <br>
!   *             FAIL You tried to release but you are not the
!   *                    owner of the resource
    */
!   command error_t release();
! 
!   /**
!   * Release a shared resource you previously acquired in asynchronous context.
!   *
!   * @return SUCCESS The resource has been released and a user currently
!   *                           making an immediateRequest can be granted access
!   *                           to the Resource. <br>
!   *             FAIL You tried to release but you are not the
!   *                    owner of the resource.
!   */
!   async command error_t immediateRelease();
  
    /**
***************
*** 100,108 ****
    */
    event void granted();
-    
-   /**
-   * Release a shared resource you previously acquired.
-   */
-   command void release();
  
    /**
--- 105,108 ----
***************
*** 117,121 ****
     * This event is signalled whenever the user of this interface
     * currently has control of the resource, and another user requests
!    * it.  You may want to consider releasing a resource based on this
     * event
     */
--- 117,122 ----
     * This event is signalled whenever the user of this interface
     * currently has control of the resource, and another user requests
!    * it through the use of the normal Resource interface.
!    * You may want to consider releasing a resource based on this
     * event
     */
***************
*** 123,130 ****
  
    /**
     * Event sent to the resource controller whenever a resource goes idle.
     * That is to say, whenever no one currently owns the resource, and there
     * are no more pending requests
     */
!   event void idle();
  }
--- 124,140 ----
  
    /**
+   * This event is signalled whenever the user of this interface
+   * currently has control of the resource, and another user requests
+   * it through the use of the ImmediateResource interface.
+   * You may want to consider releasing a resource based on this
+   * event
+   */
+   async event void immediateRequested();
+ 
+   /**
     * Event sent to the resource controller whenever a resource goes idle.
     * That is to say, whenever no one currently owns the resource, and there
     * are no more pending requests
     */
!   async event void idle();
  }



More information about the Tinyos-2-commits mailing list