On Feb 9, 2010, at 7:15 PM, Morten Tranberg Hansen wrote:

> TinyOS users and authors of CpmModelC,
> 
> The CpmModelC in tos/lib/tossim simulates packet loss based on a fixed 
> SNR->PRR curve.  A packet loss is determined by calls to shouldReceive(snr) 
> and a lost acknowledgement is determined by calls to shouldAckReceive(snr).  
> In the current implementation shouldReceive(snr) is called twice per packet - 
> when a packet is put on the event queue (CpmModelC line 388) _and_ when the 
> event is handled through the checkReceive(snr) function (CpmModelC line 308) 
> - while shouldAckReceive(snr) is only called once per acknowledgement 
> (CpmModelC line 183).
> 
> Whats the reasoning about this?  That data packets are longer than 
> acknowledgements and hence should be checked twice?  As far as I can tell, 
> the actual time on air for an acknowledgement and a data packet containing 
> 0bytes payload should be the same.

You are correct -- this is a "bug" in the sense that it means you play double 
odds on the SNR/PRR curve. But it gets at a deeper issue, that the SNR/PRR 
curve assumes a constant SNR, which might not be true. The current approach 
checks at the beginning and end of packet in case there's a packet overlap, 
basically trying to catch both interference at start and at end. It seemed like 
a good compromise compared to a dynamic per-ms calculation.

Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to