[Tinyos-2-commits]
CVS: tinyos-2.x/tos/lib/tossim CpmModelC.nc, 1.7, 1.8
Phil Levis
scipio at users.sourceforge.net
Fri Jul 20 15:35:14 PDT 2007
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9574
Modified Files:
CpmModelC.nc
Log Message:
Bug fix from Avrinash at USC; when detecting a clear channel, you care
about not just noise, but also concurrent transmissions. Before, CpmModelC
was only looking at noise, so it would transmit when other nodes nearby
were transmitting, leading to very pessimistic packet delivery rates.
Index: CpmModelC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim/CpmModelC.nc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** CpmModelC.nc 21 May 2007 22:08:29 -0000 1.7
--- CpmModelC.nc 20 Jul 2007 22:35:11 -0000 1.8
***************
*** 201,206 ****
command bool Model.clearChannel() {
! dbg("CpmModelC", "Checking clear channel @ %s: %f <= %f \n", sim_time_string(), (double)noise_hash_generation(), clearThreshold);
! return noise_hash_generation() < clearThreshold;
}
--- 201,206 ----
command bool Model.clearChannel() {
! dbg("CpmModelC", "Checking clear channel @ %s: %f <= %f \n", sim_time_string(), (double)packetNoise(NULL), clearThreshold);
! return packetNoise(NULL) < clearThreshold;
}
More information about the Tinyos-2-commits
mailing list