On Fri, Feb 19, 2010 at 4:20 PM, Maisa Ben Jamaa <[email protected]> wrote: > Hi, > Thanks Dr Omprakash. > Actually I was searching a justification to this minus 1. I interpreted this > in case of (ne->data_success == 0) to the first transmitted packet for each > estimation window. I mean that the first packet in each estimation window is > a transmission the others are retransmissions. > so the number of retransmission are ne->data_total - 1 > > Also I interpreted the second one (that seems wrong in the new version) to > this equation > > estETX = ne->data_fail / ne->data_success; > = > estETX=(ne->data_total - ne->data_success)/ ne->data_success; > = > estETX=(ne->data_total)/ ne->data_success - 1; // that's why I see that the > new version is wrong > > Am I right?
When you compute ETX, you should sum the tx and retx. So, estETX = (tx+retx) / # pkts = data_total / data_success Does that make sense? That -1 in the earlier version was there so that we can start counting as 0 instead of 1 (minimum etx is 1) thereby allowing us to store larger link metric. Lets say, in one byte, we can store an etx of 255, but if with the -1, we store an equivalent of 256 (using the unused "0"). Turns out this was a bad idea - confusion and optimization for cases that would never appear. - om_p _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
