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

Reply via email to