[Tinyos-2-commits] CVS: tinyos-2.x/apps/tests/TestSimComm test-asym.py, NONE, 1.1 README, 1.1, 1.2

Phil Levis scipio at users.sourceforge.net
Mon May 21 14:35:57 PDT 2007


Update of /cvsroot/tinyos/tinyos-2.x/apps/tests/TestSimComm
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv622/apps/tests/TestSimComm

Modified Files:
	README 
Added Files:
	test-asym.py 
Log Message:
Improved accuracy of acknowledgement delivery by considering SNR
curves. Currently, ack reception is based on the same SNR/PRR curve
as packet delivery. This is pessimistic, due to the fact that acks
are shorter than packets. I need to measure the ARR/SNR curve to
put it something more accurate. Also, currently TOSSIM does not model
false positives, something I will be adding shortly.


--- NEW FILE: test-asym.py ---
from TOSSIM import *
import sys
import time

t = Tossim([])
r = t.radio();

t.addChannel("TestComm", sys.stdout)
t.addChannel("SNRLoss", sys.stdout)

#t.addChannel("Acks", sys.stdout)
#t.addChannel("Gain", sys.stdout)
#t.addChannel("CpmModelC", sys.stdout)
#t.addChannel("AM", sys.stdout)


start = time.time();
m1 = t.getNode(1)
m2 = t.getNode(2)
m3 = t.getNode(3)

# Set up a hidden terminal problem, where 1 and 3
# are closely synchronized, but cannot hear each other.
m1.bootAtTime(345321);
m2.bootAtTime(82123411);
m3.bootAtTime(345325);
r.add(1, 2, -60.0);
r.add(2, 1, -80.0);
r.add(3, 2, -60.0);
r.add(2, 3, -80.0);

noise = open("meyer-short.txt", "r")
lines = noise.readlines()
for line in lines:
  str = line.strip()
  if (str != ""):
    val = int(str)
    m1.addNoiseTraceReading(val)
    m2.addNoiseTraceReading(val)
    m3.addNoiseTraceReading(val)

m1.createNoiseModel()
m2.createNoiseModel()
m3.createNoiseModel()

for i in range(0, 1000000):
    t.runNextEvent();

    

Index: README
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestSimComm/README,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** README	17 May 2007 22:06:35 -0000	1.1
--- README	21 May 2007 21:35:54 -0000	1.2
***************
*** 1,3 ****
! TestTimer, 5/17/07 
  
  This application tests the TOSSIM radio model by setting up a simple
--- 1,3 ----
! TestTimer, 5/22/07 
  
  This application tests the TOSSIM radio model by setting up a simple
***************
*** 11,16 ****
  test-equal.py: Tests whether two nodes that are hidden terminals
  cause collisions. The two nodes have equal signal strengths, so a
! collision should corrupt both packets. If one packet is lost,
! the other should be too.
  
  test-unequal.py: Tests whether two nodes that are hidden terminals
--- 11,17 ----
  test-equal.py: Tests whether two nodes that are hidden terminals
  cause collisions. The two nodes have equal signal strengths, so a
! collision should corrupt both packets. If one packet is lost due to
! a collision, the other should be too. Note that packets can be 
! lost in the absence of collisions due to external interference.
  
  test-unequal.py: Tests whether two nodes that are hidden terminals
***************
*** 22,25 ****
--- 23,33 ----
  stronger.
  
+ test-asym.py: Tests whether asymmetric links can have high delivery
+ rates but low acknowledgement rates. Checks that acknowledgements
+ follow SNR curves properly. In this test, both 1 and 3 have high
+ quality links (-60 dBm) to node 2, but the reverse links (2 to 1 and
+ 2 to 3) are much worse (-80 dBm). You should see packet deliveries
+ like test-equal.py but few acknowledgements.
+ 
  Philip Levis
  



More information about the Tinyos-2-commits mailing list