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.

Let me demonstrate with an example using the debug output from CpmModelC:

1. DEBUG (2): SNR is 8.250000, PRR is 0.976911
2. DEBUG (2): Packet from 3 to 2
3. DEBUG (2): SNR is 8.250000, PRR is 0.976911
4.   -signaling reception
5. DEBUG (3): SNR is -5.750000, ARR is 0.001306
6.
7. DEBUG (2): SNR is -8.750000, PRR is 0.004112
8. DEBUG (2): Lost packet from 3 to 2 due to SNR being too low (-8)
9. DEBUG (2): Packet from 3 to 2
10. DEBUG (2): SNR is 8.250000, PRR is 0.976911
11.   -packet was lost.

In line 1-5 a packet passes the check twice (line 1 and 3) and reception is
signaled (line 4) before an acknowledgement is checked (line 5).
In line 7-11 a packet fails the first check (line 7-8) and is marked lost on
reception (line 11).  The outcome of the second check has no influence as
the packet is already marked lost after the first check.

Morten.
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to