On Fri, Feb 19, 2010 at 8:22 AM, Maisa Ben Jamaa
<[email protected]> wrote:
> Hi,
>
> I was wondering why we retrieve 1 at the computation time of estETX?
>
> if (ne->data_success == 0) {
> // if there were no successful packet transmission in the
> // last window, our current estimate is the number of failed
> // transmissions
> estETX = (ne->data_total - 1)* 10;
> } else {
> estETX = (10 * ne->data_total) / ne->data_success - 10;
> ne->data_success = 0;
> ne->data_total = 0;
> }
You are probably using an older version which computed EETX (ETX-1). I
changed the code to what you see here a few weeks ago. Hopefully this
version is more clear.
280 // update data driven ETX
281 void updateDETX(neighbor_table_entry_t *ne) {
282 uint16_t estETX;
283
284 if (ne->data_success == 0) {
285 // if there were no successful packet transmission in the
286 // last window, our current estimate is the number of failed
287 // transmissions
288 estETX = ne->data_total * 10;
289 } else {
290 estETX = (10 * ne->data_total) / ne->data_success;
291 ne->data_success = 0;
292 ne->data_total = 0;
293 }
294 updateETX(ne, estETX);
295 }
296
- om_p
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help