[Tinyos-help] How can I change noise level after simulation started
?
DAE HEE KIM
dahkim77 at gmail.com
Fri Jan 4 08:43:28 PST 2008
Hi...
I want to change noise level after simulation started. How can I do that in
python script?
Surely, before simulation starts, I set noise by using following python
script (the same as the tutorial 11)
###############################
# Get noise
###############################
noise = open(noiseFile, "r")
lines = noise.readlines()
for line in lines:
str = line.strip()
if (str != ""):
val = int(str)
for i in range(0, nodes):
t.getNode(i).addNoiseTraceReading(val)
for i in range(0, nodes):
#print "Creating noise model for ",i;
t.getNode(i).createNoiseModel()
Thanks.
--
DaeHee Kim (Danny)
Department of Computer Science, State University of NewYork at Binghamton.
Cell Phone : 1-607-321-9574
Address : 13-A Andrea Dr, Vestal, NY, 13850
email-address : dkim11 at binghamton.edu, dahkim77 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20080104/efd2a071/attachment.htm
More information about the Tinyos-help
mailing list