[Tinyos-beta-commits] CVS: tinyos-1.x/beta/Drip Drip.nc, 1.1, 1.2 DripC.nc, 1.3, 1.4 DripM.nc, 1.3, 1.4 DripState.nc, 1.1, 1.2 DripStateC.nc, 1.1, 1.2 DripStateM.nc, 1.2, 1.3 DripStateMgr.nc, 1.1, 1.2 WakeupComm.h, 1.1, 1.2 WakeupCommC.nc, 1.1, 1.2 WakeupCommM.nc, 1.1, 1.2

Gilman Tolle gtolle at users.sourceforge.net
Wed May 4 16:23:16 PDT 2005


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

Modified Files:
	Drip.nc DripC.nc DripM.nc DripState.nc DripStateC.nc 
	DripStateM.nc DripStateMgr.nc WakeupComm.h WakeupCommC.nc 
	WakeupCommM.nc 
Log Message:
Added a lot of documentation comments

Index: Drip.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/Drip.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Drip.nc	19 Jan 2005 00:01:17 -0000	1.1
--- Drip.nc	4 May 2005 23:23:13 -0000	1.2
***************
*** 28,66 ****
   */
  
- /*
-  * Authors:	Gilman Tolle
-  *
-  */
  
  includes Drip;
  
  interface Drip {
    
!   /* 
!      Call this in StdControl.init(). It sets up local state. 
!   */
    command result_t init();
  
!   /*
!     If you have saved a copy of the sequence number to persistent
!     storage, call this in StdControl.init() after retrieving your
!     copy.
!   */
    command result_t setSeqno(uint8_t seqno);
  
!   /* 
!      This event is signalled when the Trickle algorithm must broadcast
!      the value. Fill in the given buffer pointer, then call rebroadcast. 
!      Post a task to call rebroadcast.
!   */
    event result_t rebroadcastRequest(TOS_MsgPtr msg, void *pData);
    command result_t rebroadcast(TOS_MsgPtr msg, void *pData, uint8_t len);
  
!   /* 
!      Call this when you have changed the values locally, and would like
!      to disseminate new data with an incremented sequence number.
!      Once this is called, you will be receiving a rebroadcastRequest
!      event shortly. 
!   */
    command result_t change();
  }
--- 28,74 ----
   */
  
  
  includes Drip;
  
+ /**
+  * The Drip interface is used to initialize a Drip channel and send
+  * messages into it.
+  *
+  * @author Gilman Tolle <get at cs.berkeley.edu>
+  *
+  */
+ 
  interface Drip {
    
!   /** 
!    * You must call this in StdControl.init(). It sets up local state. 
!    */
    command result_t init();
  
!   /**
!    * If you have saved a copy of the sequence number to persistent
!    * storage, call this in StdControl.init() after retrieving your
!    * copy.
!    */
    command result_t setSeqno(uint8_t seqno);
  
!   /** 
!    * This event is signalled when the Trickle algorithm must rebroadcast
!    * the value. Fill in the given buffer pointer, then call rebroadcast. 
!    */
    event result_t rebroadcastRequest(TOS_MsgPtr msg, void *pData);
+ 
+   /**
+    * Call this from rebroadcastRequest() once you have filled the
+    * buffer pointer.
+    */
    command result_t rebroadcast(TOS_MsgPtr msg, void *pData, uint8_t len);
  
!   /** 
!    * Call this when you have changed the value locally, and would like
!    * to disseminate new data with an incremented sequence number.
!    * Once this is called, you will be receiving a rebroadcastRequest
!    * event shortly.
!    */
    command result_t change();
  }

Index: DripC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/DripC.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DripC.nc	27 Apr 2005 02:48:26 -0000	1.3
--- DripC.nc	4 May 2005 23:23:13 -0000	1.4
***************
*** 1,6 ****
! /*									tab:4
!  *
!  *
!  * "Copyright (c) 2000-2004 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.
   *
***************
*** 23,32 ****
   */
  
! /*
   * @author Gilman Tolle <get at cs.berkeley.edu>
   */
  
- includes Drip;
- 
  configuration DripC {
    provides {
--- 21,49 ----
   */
  
! includes Drip;
! 
! /**
!  *
!  * Drip provides an epidemic dissemination service for single messages.
!  * <p>
!  * Drip messages are identified using a standard Active Message ID.
!  * <p>
!  * Incoming messages are received on the Receive interface.
!  * <p>
!  * Each client of Drip is responsible for caching the message received
!  * on the Receive interface, and providing it to the Drip interface
!  * when retransmission is necessary.
!  * <p>
!  * Here is an example wiring you can use with Drip:
!  * <p>
!  * <tt>
!  * TestDripM.ReceiveDrip -> DripC.Receive[AM_TESTDRIPMSG];<br>
!  * TestDripM.Drip -> DripC.Drip[AM_TESTDRIPMSG];<br>
!  * DripC.DripState[AM_TESTDRIPMSG] -> DripStateC.DripState[unique("DripState")];<br>
!  * </tt>
!  * <p>
   * @author Gilman Tolle <get at cs.berkeley.edu>
   */
  
  configuration DripC {
    provides {

Index: DripM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/DripM.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DripM.nc	27 Apr 2005 02:48:26 -0000	1.3
--- DripM.nc	4 May 2005 23:23:13 -0000	1.4
***************
*** 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 Drip;
  
  module DripM {
    provides {
--- 18,29 ----
   * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
   * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
   */
  
  includes Drip;
  
+ /**
+  * @author Gilman Tolle <get at cs.berkeley.edu>
+  */
+ 
  module DripM {
    provides {

Index: DripState.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/DripState.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DripState.nc	19 Jan 2005 00:01:18 -0000	1.1
--- DripState.nc	4 May 2005 23:23:13 -0000	1.2
***************
*** 1,2 ****
--- 1,41 ----
+ /*
+  * 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."
+  *
+  */
+ 
+ /**
+  * DripState is the per-client interface between the Drip component and the
+  * DripStateC component, which stores the timing parameters needed for
+  * the retransmission algorithm.
+  * <p>
+  * You do not need to call any functions in this interface, but you
+  * must wire DripC to DripStateC once for each channel your component is
+  * using, like this:
+  * <p>
+  * <tt>
+  * TestDripM.Drip -> DripC.Drip[AM_TESTDRIPMSG];<br>
+  * DripC.DripState[AM_TESTDRIPMSG] -> DripStateC.DripState[unique("DripState")];<br>
+  * </tt>
+  * <p>
+  * @author Gilman Tolle <get at cs.berkeley.edu>
+  */
+ 
  interface DripState {
  

Index: DripStateC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/DripStateC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DripStateC.nc	19 Jan 2005 00:01:18 -0000	1.1
--- DripStateC.nc	4 May 2005 23:23:13 -0000	1.2
***************
*** 1,2 ****
--- 1,27 ----
+ /*								       
+  * 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."
+  */
+ 
+ /**
+  * @author Gilman Tolle <get at cs.berkeley.edu>
+  */
+ 
  configuration DripStateC {
    provides {

Index: DripStateM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/DripStateM.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DripStateM.nc	27 Apr 2005 02:48:26 -0000	1.2
--- DripStateM.nc	4 May 2005 23:23:13 -0000	1.3
***************
*** 1,4 ****
--- 1,29 ----
+ /*								       
+  * 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 Drip;
  
+ /**
+  * @author Gilman Tolle <get at cs.berkeley.edu>
+  */
+ 
  module DripStateM {
    provides {

Index: DripStateMgr.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/DripStateMgr.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DripStateMgr.nc	19 Jan 2005 00:01:18 -0000	1.1
--- DripStateMgr.nc	4 May 2005 23:23:13 -0000	1.2
***************
*** 1,2 ****
--- 1,31 ----
+ /*								       
+  * 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."
+  */
+ 
+ /**
+  * DripStateMgr is the all-clients interface between the Drip component and the
+  * DripStateC component, which stores the timing parameters needed for
+  * the retransmission algorithm.
+  * <p>
+  * @author Gilman Tolle <get at cs.berkeley.edu>
+  */
+ 
  interface DripStateMgr {
    command result_t updateCounters();

Index: WakeupComm.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/WakeupComm.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** WakeupComm.h	27 Apr 2005 02:48:44 -0000	1.1
--- WakeupComm.h	4 May 2005 23:23:13 -0000	1.2
***************
*** 1,4 ****
--- 1,9 ----
+ #ifndef __WAKEUPCOMM_H__
+ #define __WAKEUPCOMM_H__
+ 
  enum {
    WAKE_PERIOD = 1024,
    WAKE_LENGTH = 64,
  };
+ 
+ #endif

Index: WakeupCommC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/WakeupCommC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** WakeupCommC.nc	27 Apr 2005 02:48:44 -0000	1.1
--- WakeupCommC.nc	4 May 2005 23:23:13 -0000	1.2
***************
*** 1,2 ****
--- 1,33 ----
+ /*
+  * 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."
+  *
+  */
+ 
+ /**
+  * WakeupComm takes a message to be sent and sends it multiple times
+  * in succession, so as to ensure that it will be received by a node
+  * that is periodically waking up to check the radio channel.
+  * <p>
+  * Drip uses this as part of a sleep-wake power management system.
+  *
+  * @author Gilman Tolle <get at cs.berkeley.edu>
+  */
  includes WakeupComm;
  

Index: WakeupCommM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/WakeupCommM.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** WakeupCommM.nc	27 Apr 2005 02:48:44 -0000	1.1
--- WakeupCommM.nc	4 May 2005 23:23:13 -0000	1.2
***************
*** 1,2 ****
--- 1,27 ----
+ /*								       
+  * 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."
+  */
+ 
+ /**
+  * @author Gilman Tolle <get at cs.berkeley.edu>
+  */
+ 
  module WakeupCommM {
    provides interface SendMsg as WakeupSendMsg[uint8_t id];



More information about the Tinyos-beta-commits mailing list