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?

Best regards,
Maissa


2010/2/20 Omprakash Gnawali <[email protected]>

> 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

Reply via email to