[Tinyos-beta-commits] CVS: tinyos-1.x/beta/Drain DrainC.nc, 1.8, 1.9 DrainLinkEstM.nc, 1.10, 1.11 DrainM.nc, 1.9, 1.10

Gilman Tolle gtolle at users.sourceforge.net
Wed May 4 14:20:08 PDT 2005


Update of /cvsroot/tinyos/tinyos-1.x/beta/Drain
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21637

Modified Files:
	DrainC.nc DrainLinkEstM.nc DrainM.nc 
Log Message:
Added some documentation comments

Index: DrainC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drain/DrainC.nc,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** DrainC.nc	3 May 2005 23:26:29 -0000	1.8
--- DrainC.nc	4 May 2005 21:20:04 -0000	1.9
***************
*** 1,4 ****
--- 1,60 ----
+ /*									
+  * Copyright (c) 2000-2005 The Regents of the University  of California.  
+  * All rights reserved.
+  *
+  * Permission to use, copy, modify, and distribute this software and its
+  * documentation for any purpose, without fee, and without written agreement is
+  * hereby granted, provided that the above copyright notice, the following
+  * two paragraphs and the author appear in all copies of this software.
+  * 
+  * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
+  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
+  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
+  * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  * 
+  * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
+  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+  * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+  * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
+  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
+  *
+  */
+ 
  includes Drain;
  
+ /**
+  * DrainC provides a many-to-one collection routing service.
+  * <p>
+  * Use the SendMsg interface to send a message up the tree.
+  * <p>
+  * Why does DrainC provide SendMsg instead of Send? Because it provides an
+  * argument for a destination address. This will eventually be used to
+  * select between multiple trees when sending a message, but for now,
+  * it is used to decide whether to send a message up the tree, to the
+  * link-local broadcast address, or to the local serial connection.
+  * <p>
+  * TOS_DEFAULT_ADDR means "the tree" (defined in Drain.h) <br>
+  * TOS_BCAST_ADDR means "the link-local broadcast" <br>
+  * TOS_UART_ADDR means "the serial connection" <br>
+  * <p>
+  * All messages will contain the Drain header.
+  * <p>
+  * The Send interface is also provided because it provides getBuffer().
+  * Don't use Send.send().
+  * <p>
+  * The Receive interface doesn't do anything currently, but will
+  * eventually be used to deliver messages that have been routed down
+  * the tree from the root.
+  * <p>
+  * Intercept and Snoop have the usual meanings.
+  * <p>
+  * NOTE: Drain provides three Nucleus attributes for status
+  * reporting. You do not have to include the Nucleus system to use
+  * Drain, but to compile it, you must make sure that the Nucleus
+  * directory is in the include path, so Attrs.h can be found.
+  * <p>
+  * @author Gilman Tolle <get at cs.berkeley.edu>
+  */
+ 
  configuration DrainC {
    

Index: DrainLinkEstM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drain/DrainLinkEstM.nc,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** DrainLinkEstM.nc	3 May 2005 17:15:23 -0000	1.10
--- DrainLinkEstM.nc	4 May 2005 21:20:04 -0000	1.11
***************
*** 1,4 ****
! /*									tab:4
!  * "Copyright (c) 2000-2003 The Regents of the University  of California.  
   * All rights reserved.
   *
--- 1,4 ----
! /*								       
!  * Copyright (c) 2000-2005 The Regents of the University  of California.  
   * All rights reserved.
   *
***************
*** 18,38 ****
   * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
   * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
-  *
-  * Copyright (c) 2002-2003 Intel Corporation
-  * All rights reserved.
-  *
-  * This file is distributed under the terms in the attached INTEL-LICENSE     
-  * file. If you do not find these files, copies can be found by writing to
-  * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA, 
-  * 94704.  Attention:  Intel License Inquiry.
   */
  
  
! /*
!  * Authors:          Gilman Tolle
   */
  
- includes Attrs;
- 
  module DrainLinkEstM {
  
--- 18,29 ----
   * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
   * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
   */
  
+ includes Attrs;
  
! /**
!  * @author Gilman Tolle <get at cs.berkeley.edu>
   */
  
  module DrainLinkEstM {
  

Index: DrainM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drain/DrainM.nc,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** DrainM.nc	4 May 2005 20:45:58 -0000	1.9
--- DrainM.nc	4 May 2005 21:20:04 -0000	1.10
***************
*** 1,5 ****
! 
! /*									tab:4
!  * "Copyright (c) 2000-2003 The Regents of the University  of California.  
   * All rights reserved.
   *
--- 1,4 ----
! /*								       
!  * Copyright (c) 2000-2005 The Regents of the University  of California.  
   * All rights reserved.
   *
***************
*** 19,34 ****
   * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
   * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
-  *
-  * Copyright (c) 2002-2003 Intel Corporation
-  * All rights reserved.
-  *
-  * This file is distributed under the terms in the attached INTEL-LICENSE     
-  * file. If you do not find these files, copies can be found by writing to
-  * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA, 
-  * 94704.  Attention:  Intel License Inquiry.
   */
  
  /**
!  * @author Gilman Tolle
   */
  
--- 18,25 ----
   * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
   * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
   */
  
  /**
!  * @author Gilman Tolle <get at cs.berkeley.edu>
   */
  
***************
*** 68,76 ****
    };
  
!   // Send Queue
    TOS_MsgPtr sendQueue[DRAIN_SEND_QUEUE_SIZE];
    uint8_t sendQueueIn, sendQueueOut;
  
-   // Forward Queue
    TOS_Msg fwdBuffers[DRAIN_FWD_QUEUE_SIZE];
    TOS_MsgPtr fwdQueue[DRAIN_FWD_QUEUE_SIZE];
--- 59,68 ----
    };
  
!   /** 
!    * Drain includes its own queueing, for both sent and forwarded messages. 
!    */
    TOS_MsgPtr sendQueue[DRAIN_SEND_QUEUE_SIZE];
    uint8_t sendQueueIn, sendQueueOut;
  
    TOS_Msg fwdBuffers[DRAIN_FWD_QUEUE_SIZE];
    TOS_MsgPtr fwdQueue[DRAIN_FWD_QUEUE_SIZE];
***************
*** 83,88 ****
    uint8_t backoff;
  
! 
!   // STATISTICS
  
    uint16_t sendPackets;
--- 75,82 ----
    uint8_t backoff;
  
!   /** 
!    * Drain keeps track of some statistics -- if you're tight on RAM,
!    * you can take these out.
!    */
  
    uint16_t sendPackets;
***************
*** 95,99 ****
    uint8_t forwardDrops;
  
! 
    task void QueueServiceTask();
  
--- 89,93 ----
    uint8_t forwardDrops;
  
!   
    task void QueueServiceTask();
  
***************
*** 108,115 ****
    task void errorBlink();
  
-   /***********************************************************************
-    * Initialization 
-    ***********************************************************************/
- 
    command result_t StdControl.init() {
      initializeBufs();
--- 102,105 ----
***************
*** 146,153 ****
    }
  
-   /***********************************************************************
-    * Commands and events
-    ***********************************************************************/
- 
    command void* Send.getBuffer[uint8_t id](TOS_MsgPtr pMsg, uint16_t* length) {
      
--- 136,139 ----



More information about the Tinyos-beta-commits mailing list