[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/tossim DemoSensorC.nc, 1.1.2.1, 1.1.2.2 TossimPacketModelC.nc, 1.1.2.5, 1.1.2.6 UscGainInterferenceModelC.nc, 1.1.2.8, 1.1.2.9 sim_gain.c, 1.1.2.4, 1.1.2.5

Phil Levis scipio at users.sourceforge.net
Mon Jun 5 09:48:42 PDT 2006


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

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	DemoSensorC.nc TossimPacketModelC.nc 
	UscGainInterferenceModelC.nc sim_gain.c 
Log Message:
Bug fixes to packet layer.


Index: DemoSensorC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim/Attic/DemoSensorC.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
*** DemoSensorC.nc	19 Dec 2005 23:51:20 -0000	1.1.2.1
--- DemoSensorC.nc	5 Jun 2006 16:48:40 -0000	1.1.2.2
***************
*** 1,47 ****
  /*
!  * Copyright (c) 2004, Technische Universitaet Berlin
!  * All rights reserved.
!  *
!  * Redistribution and use in source and binary forms, with or without 
!  * modification, are permitted provided that the following conditions 
!  * are met:
!  * - Redistributions of source code must retain the above copyright notice,
!  *   this list of conditions and the following disclaimer.
!  * - Redistributions in binary form must reproduce the above copyright 
!  *   notice, this list of conditions and the following disclaimer in the 
!  *   documentation and/or other materials provided with the distribution.
!  * - Neither the name of the Technische Universitaet Berlin nor the names 
!  *   of its contributors may be used to endorse or promote products derived
!  *   from this software without specific prior written permission.
!  *
!  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
!  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
!  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
!  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
!  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
!  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 
!  * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
!  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
!  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
!  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
!  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   *
!  * - Revision -------------------------------------------------------------
!  * $Revision$
!  * $Date$
!  * @author: Jan Hauer <hauer at tkn.tu-berlin.de>
!  * ========================================================================
   */
  
! configuration DemoSensorC
! {
!   provides interface StdControl;
!   provides interface AcquireData;
  }
! implementation
! {
!   components InternalVoltageC as DemoChannel;
!   
!   StdControl = DemoChannel;
!   AcquireData = DemoChannel;
  }
--- 1,30 ----
  /*
!  * "Copyright (c) 2006 Stanford University. 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 STANFORD UNIVERSITY 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 STANFORD UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
!  * DAMAGE.
!  * 
!  * STANFORD UNIVERSITY 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 STANFORD UNIVERSITY
!  * HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
!  * ENHANCEMENTS, OR MODIFICATIONS."
   */
  
! generic configuration DemoSensorC(){
!   provides interface Read<uint16_t>;
  }
! implementation {
!   components new ConstantSensorC(uint16_t, 0xbeef);
!   Read = ConstantSensorC;
  }

Index: TossimPacketModelC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim/Attic/TossimPacketModelC.nc,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -d -r1.1.2.5 -r1.1.2.6
*** TossimPacketModelC.nc	15 May 2006 16:39:18 -0000	1.1.2.5
--- TossimPacketModelC.nc	5 Jun 2006 16:48:40 -0000	1.1.2.6
***************
*** 277,284 ****
--- 277,290 ----
    }
  
+   uint8_t error = 0;
+   
    event void GainRadioModel.acked(message_t* msg) {
      if (running) {
        tossim_metadata_t* metadata = getMetadata(sending);
        metadata->ack = 1;
+       if (msg != sending) {
+ 	error = 1;
+ 	dbg("TossimPacketModelC", "Requested ack for 0x%x, but outgoing packet is 0x%x.\n", msg, sending);
+       }
      }
    }

Index: UscGainInterferenceModelC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim/Attic/UscGainInterferenceModelC.nc,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -C2 -d -r1.1.2.8 -r1.1.2.9
*** UscGainInterferenceModelC.nc	19 May 2006 19:45:04 -0000	1.1.2.8
--- UscGainInterferenceModelC.nc	5 Jun 2006 16:48:40 -0000	1.1.2.9
***************
*** 36,40 ****
   *
   * @author Philip Levis
!  * @date   December 2 2005
   */ 
  
--- 36,40 ----
   *
   * @author Philip Levis
!  * @date   Jun 1 2006
   */ 
  

Index: sim_gain.c
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim/Attic/sim_gain.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -d -r1.1.2.4 -r1.1.2.5
*** sim_gain.c	7 Mar 2006 02:35:48 -0000	1.1.2.4
--- sim_gain.c	5 Jun 2006 16:48:40 -0000	1.1.2.5
***************
*** 38,46 ****
    if (current == NULL) {
      current = sim_gain_allocate_link(dest);
    }
    current->mote = dest;
    current->gain = gain;
-   current->next = connectivity[src];
-   connectivity[src] = current;
    dbg("Gain", "Adding link from %i to %i with gain %f\n", src, dest, gain);
    sim_set_node(temp);
--- 38,46 ----
    if (current == NULL) {
      current = sim_gain_allocate_link(dest);
+     current->next = connectivity[src];
+     connectivity[src] = current;
    }
    current->mote = dest;
    current->gain = gain;
    dbg("Gain", "Adding link from %i to %i with gain %f\n", src, dest, gain);
    sim_set_node(temp);



More information about the Tinyos-2-commits mailing list