[Tinyos-devel] [Tinyos-help] Regarding 4 bit link estimation

Omprakash Gnawali gnawali at usc.edu
Thu Jul 16 18:12:10 PDT 2009


2009/7/13 Mehmet Akif Antepli <akifantepli at gmail.com>:
> Hi Omprakash,
>
> About the inage field,
> In the code below, first there is the check for the neighbor table entry to
> update. Inage field is only decremented for the neighbor that sent beacon
> msg !
>
>   // update the inbound link quality by
>   // munging receive, fail count since last update
>   void updateNeighborTableEst(am_addr_t n) {
>     uint8_t i, totalPkt;
>     neighbor_table_entry_t *ne;
>     uint8_t newEst;
>     uint8_t minPkt;
>     minPkt = BLQ_PKT_WINDOW;
>     dbg("LI", "%s\n", __FUNCTION__);
>     for (i = 0; i < NEIGHBOR_TABLE_SIZE; i++) {
>       ne = &NeighborTable[i];
>       if (ne->ll_addr == n) {
>  if (ne->flags & VALID_ENTRY) {
>    if (ne->inage > 0)
>      ne->inage--;
>
> But i think inage field should be decremented when the following condition
> holds, isn't it?

You caught a bug. This code became a bug when we changed from updating
all the entries in the link table to selectively updating the link
table. When all the entries were updated periodically, we would
decrement the age for all the entries and refresh the age only on the
entries that were heard from recently. We don't do such wholesome
periodic updates anymore. Thanks for catching this.

- om_p



More information about the Tinyos-devel mailing list