[Tinyos-2-commits]
CVS: tinyos-2.x/tos/lib/tossim CpmModelC.nc, 1.6,
1.7 sim_noise.h, 1.4, 1.5
Phil Levis
scipio at users.sourceforge.net
Mon May 21 15:08:32 PDT 2007
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15364
Modified Files:
CpmModelC.nc sim_noise.h
Log Message:
Include false positive acknowledgements. Adjusted default constants to
reduce RAM footprint of noise model.
Index: CpmModelC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim/CpmModelC.nc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** CpmModelC.nc 21 May 2007 21:35:54 -0000 1.6
--- CpmModelC.nc 21 May 2007 22:08:29 -0000 1.7
***************
*** 330,333 ****
--- 330,346 ----
} // If the packet was lost, then we're searching for new packets again
else {
+ if (RandomUniform() < 0.001) {
+ dbg("CpmModelC,SNRLoss", "Packet was technically lost, but TOSSIM introduces an ack false positive rate.\n");
+ if (mine->ack && signal Model.shouldAck(mine->msg)) {
+ dbg_clear("CpmModelC", " scheduling ack.\n");
+ sim_gain_schedule_ack(mine->source, sim_time() + 1, mine);
+ }
+ else { // Otherwise free the receive_message_t*
+ free_receive_message(mine);
+ }
+ }
+ else {
+ free_receive_message(mine);
+ }
receiving = 0;
dbg_clear("CpmModelC,SNRLoss", " -packet was lost.\n");
Index: sim_noise.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tossim/sim_noise.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** sim_noise.h 10 Apr 2007 22:15:39 -0000 1.4
--- sim_noise.h 21 May 2007 22:08:29 -0000 1.5
***************
*** 49,54 ****
NOISE_HISTORY = 20,
NOISE_DEFAULT_ELEMENT_SIZE = 8,
! NOISE_HASHTABLE_SIZE = 8192,
! NOISE_MIN_TRACE = 1024,
};
--- 49,54 ----
NOISE_HISTORY = 20,
NOISE_DEFAULT_ELEMENT_SIZE = 8,
! NOISE_HASHTABLE_SIZE = 128,
! NOISE_MIN_TRACE = 128,
};
More information about the Tinyos-2-commits
mailing list