On Jan 29, 2007, at 3:39 PM, migueltsilva wrote:
I'm constructing a tree with the Dissemination and TrickleTimer
code, using rssi to control them.
I already create several network topology to test application,
however it would be nice to obtain the values of gain that I define
in the files, because I can't use rssi in tossim. One solution was
to define several rssi random inside some interval, but I want to
test fixed network, so this solution was not perfect. Please can
anybody help me how to access the values of gain?
Another question is relatively to the TrickeTimer. In the function
generateTime, the value of the rval always varies between
[0...period] ?
So if I want to give some priority using value rssi, can I define
the value of rval (with a relation of rssi) smaller to execute
dissemination quicker? and if want dissemination slower, can I
define the value of rval bigger ?. Is this correct?
If anyone can help me I would be greatful,
without more, my compliments Miguel Torres
TOSSIM does not provide function to access the RSSI readings because
there's no platform-independent way to do this, and I didn't want to
promote the idea of writing code for TOSSIM which can't run on real
motes.
the core code for generateTim():
trickles[id].time = trickles[id].remainder;
time = trickles[id].period;
// Time = period/2 (period = 2^scale)
time = time << (scale - 1);
rval = call Random.rand16() % (trickles[id].period << (scale - 1));
// time += a random value in the range of [0, scale/2)
time += rval;
trickles[id].remainder = (trickles[id].period << scale) - time;
trickles[id].time += time;
It therefore generates a value in the range of [period/2,period)
Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help