[Tinyos-2-commits] CVS: tinyos-2.x/doc/html tep108.html, 1.1.2.4.2.1, 1.1.2.4.2.2

Kevin Klues klueska at users.sourceforge.net
Wed Jun 21 10:37:48 PDT 2006


Update of /cvsroot/tinyos/tinyos-2.x/doc/html
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv926/doc/html

Modified Files:
      Tag: tos-2-resource-pm-eval-cand
	tep108.html 
Log Message:
Update to Resource TEP108

Index: tep108.html
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/doc/html/Attic/tep108.html,v
retrieving revision 1.1.2.4.2.1
retrieving revision 1.1.2.4.2.2
diff -C2 -d -r1.1.2.4.2.1 -r1.1.2.4.2.2
*** tep108.html	21 Jun 2006 11:50:39 -0000	1.1.2.4.2.1
--- tep108.html	21 Jun 2006 17:37:46 -0000	1.1.2.4.2.2
***************
*** 316,322 ****
  <tr class="field"><th class="docinfo-name">Draft-Created:</th><td class="field-body">28-Mar-2005</td>
  </tr>
! <tr class="field"><th class="docinfo-name">Draft-Version:</th><td class="field-body">1.1.2.6</td>
  </tr>
! <tr class="field"><th class="docinfo-name">Draft-Modified:</th><td class="field-body">2006-02-16</td>
  </tr>
  <tr class="field"><th class="docinfo-name">Draft-Discuss:</th><td class="field-body">TinyOS Developer List &lt;tinyos-devel at mail.millennium.berkeley.edu&gt;</td>
--- 316,322 ----
  <tr class="field"><th class="docinfo-name">Draft-Created:</th><td class="field-body">28-Mar-2005</td>
  </tr>
! <tr class="field"><th class="docinfo-name">Draft-Version:</th><td class="field-body">1.1.2.6.2.1</td>
  </tr>
! <tr class="field"><th class="docinfo-name">Draft-Modified:</th><td class="field-body">2006-06-21</td>
  </tr>
  <tr class="field"><th class="docinfo-name">Draft-Discuss:</th><td class="field-body">TinyOS Developer List &lt;tinyos-devel at mail.millennium.berkeley.edu&gt;</td>
***************
*** 515,518 ****
--- 515,519 ----
    event void granted();
    async command void release();
+   async command isOwner();
  }
  </pre>
***************
*** 531,534 ****
--- 532,553 ----
  clients are not able to queue up multiple requests, thus blocking the
  requests from other clients.</p>
+ <p>The isOwner command can be called by a client to see if it is the
+ current owner of the resource.  This command is mostly used
+ for runtime checks to make sure that clients not owning a resource
+ are not able to use it.  If a call to isOwner fails, then no call
+ should be made to commands provided by that resource.  An example of
+ where isOwner is used can be seen in the HplTda5250DataP component of
+ the Infeneon Tda5250 radio implementation:</p>
+ <pre class="literal-block">
+ async command error_t HplTda5250Data.tx(uint8_t data) {
+   if(call UartResource.isOwner() == FALSE)
+     return FAIL;
+   call Usart.tx(data);
+   return SUCCESS;
+ }
+ </pre>
+ <p>A call to the HplTda5250Data.tx command will fail if the radio does
+ not currently have control of the underlying Usart resource.  If it
+ does, then the Usart.tx(data) command is called as it should be.</p>
  <p>An arbiter MUST provide exactly one parameterized Resource interface,
  where the parameter is a client ID, following the Service
***************
*** 628,631 ****
--- 647,651 ----
    async event void requested();
    async event void idle();
+   async command isOwner();
  }
  </pre>



More information about the Tinyos-2-commits mailing list