Hell :
Thank you for your answer to my questions , Om_p.
I still have some questions :
1. what are uses of the inage and outage defined in struct
neighbor_table_entry in LinkEstimator.h? in file LinkEstimatorP.nc, it
defines MAX_AGE=6,which is "maximum link update rounds before we expire the
link". i want to know what is the meaning of "link update rounds" ?
2.In LInkEstimatorP.nc,there are some functions :
void updateEETX(neighbor_table_entry_t *ne, uint16_t newEst) {
ne->eetx = (ALPHA * ne->eetx + (10 - ALPHA) * newEst)/10;
}
// update data driven EETX
void updateDEETX(neighbor_table_entry_t *ne) {
uint16_t 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;
}
updateEETX(ne, estETX);
}
// EETX (Extra Expected number of Transmission)
// EETX = ETX - 1
// computeEETX returns EETX*10
uint8_t computeEETX(uint8_t q1) {
uint16_t q;
if (q1 > 0) {
q = 2550 / q1 - 10;
if (q > 255) {
q = INFINITY;
}
return (uint8_t)q;
} else {
return INFINITY;
}
}
// BidirETX = 1 / (q1*q2)
// BidirEETX = BidirETX - 1
// computeBidirEETX return BidirEETX*10
uint8_t computeBidirEETX(uint8_t q1, uint8_t q2) {
uint16_t q;
if ((q1 > 0) && (q2 > 0)) {
q = 65025u / q1;
q = (10*q) / q2 - 10;
if (q > 255) {
q = LARGE_EETX_VALUE;
}
return (uint8_t)q;
} else {
return LARGE_EETX_VALUE;
}
}
I can't understand the arithmetic used in the functions such as "ne->eetx =
(ALPHA * ne->eetx + (10 - ALPHA) * newEst)/10" in updateEETX ,"estETX =
(ne->data_total - 1)* 10" " estETX = (10 * ne->data_total) /
ne->data_success - 10" in updateDEETX and others in computeEETX and
computeBidirEETX. i think there should be some reasons why they write the
programem link that. can someone give me a detail explains or give me a clue
where i can find the reason ?
2008/3/17, Omprakash Gnawali <[EMAIL PROTECTED]>:
>
> On Sun, Mar 16, 2008 at 7:35 AM, jiwen zhang <[EMAIL PROTECTED]>
> wrote:
> > Hello all :
> > today , i spend some time reading the LinkEstimatorP and have soem
> > questions about it :
> > 1.in LinkEstimator.h,the struct linkest_footer has an array member
> > neighborList which is the type of neighbor_stat_entry_t and the size is
> > one. but at line 130 in file LinkEstimatorP
> "footer->neighborList[j].ll_addr
> > = NeighborTable[k].ll_addr;
> > footer->neighborList[j].inquality = NeighborTable[k].inquality" , the
> > variable "j" can be 0 to maxEntries . i can't understand this. can
> somebody
> > give me an explain ?
>
> This is a C trick that allows you to address that region of the
> payload as an array even though you don't know apriori how many
> elements you have.
>
>
> > 2. In the file LinkEstimatorP.nc, there is a function
> "linkest_footer_t*
> > getFooter(message_t* m, uint8_t len)" ,it return the address of neighbor
> > entries. i want to what is meaning of the parameter len ?
>
> It is the size of the payload sent by the component that uses the link
> estimator.
>
> > I have seen TEP124
> > , it said the LEEP frame includes a header, the payload and a footer .
> In my
> > opinion , the len should be the length of a header and the payload .
>
> No.
>
> > if my
> > opioion is right , i still have a question. Is the parameter len in the
> > function of addLinkEstHeaderAndFooter(message_t *msg, uint8_t len) the
> same
> > as the one in getFooter ?
>
> Yes.
>
> > if yes , i have doubt to the sentence "maxEntries
> > = ((call SubPacket.maxPayloadLength() - len -
> > sizeof(linkest_header_t)/sizeof(linkest_footer_t))" in
> > addLinkEstHeaderAndFooter , because the len includes the length of the
> > header so i think it should be " maxEntries = ((call
> > SubPacket.maxPayloadLength() - len)/ sizeof(linkest_footer_t))" . am i
> right
> > ?
>
> No. "len" does not include the linkest header.
>
>
> > 3.in the function addLinkEstHeaderAndFooter in LinkEstimatorP.nc, it
> > defines a pointer hdr which points to the header of the payload , then
> it
> > gives some value to the field of seq and flag. if the payload is not
> null
> > and have some useful data, does it cover the primary data with the
> header? i
> > really can't understand.
>
> Packet.getPayload() makes sure that we leave room for the header. That
> is why we do not overwrite payload when we assign fields to the
> header.
>
> > 4.what is the meaning of "Data-driven Link Quality" and
> "Beacon-driven
> > Link Quality" ? what are the functions of them and what are the
> differcnces
> > between them ?
>
> Estimating the quality of link based on data transmission statistics
> vs. just using beacons. For more details, please read this paper about
> the link estimator used by CTP:
> http://enl.usc.edu/papers/abstract/Fonseca07.html
>
> - om_p
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help