On Jun 15, 2008, at 8:54 PM, jiwen zhang wrote:

> Hello Omprakash :
>    I have some questions about the interface CtpInfo .
>    Firstly , i am puzzled  to the meaning of some fields in  
> routetable.
>    in the structure routing_table_entry (TreeRouting.h), there are  
> some information of the current node . the field of parent in  
> route_info_t should be the parent of one neighbor in the  
> routetable , and what does the ETX mean ? is it the the neighbor's  
> parent's EXT or the neighbor's the ETX ?(the EXT here should be the  
> path metric to the root??) .
>
>   i have seen the implementation of CtpInfo in CtpRoutingEngineP,  
> and i have interest to the command which get the neighbors'  
> information.
>     command uint16_t CtpInfo.getNeighborLinkQuality(uint8_t n) {
>       return (n < routingTableActive)? call  
> LinkEstimator.getLinkQuality(routingTable[n].neighbor):0xffff;
>     }
>     command uint16_t CtpInfo.getNeighborRouteQuality(uint8_t n) {
>       return (n < routingTableActive)? call  
> LinkEstimator.getLinkQuality(routingTable[n].neighbor) +  
> routingTable[n].info.etx:0xfffff;
>     }
> in my opinion , the command of getNeighborLinkQuality returns a  
> value of the quality between the current node and this neighbor in  
> the routetable .
> if the field of ETX in route_info_t is the neighbor's EXT to the  
> root , i think the command  getNeighborRouteQuality returns a value  
> of path metric between the current node and the root node  through  
> this neighbor (which is the sum of this neighbor's ETX to the root  
> and the quility between the current node and the neighbor node).
>
> the command Ctp.getEtx(uint16_t* etx) will return the value of the  
> path metric between the current node and the root through the node's  
> parent. i find there are some differencs with the way in  
> CtpInfo.getNeighborRouteQuality.
> *etx = routeInfo.etx + evaluateEtx(call  
> LinkEstimator.getLinkQuality(routeInfo.parent));
> and the function evaluateEtx() is
>     uint16_t evaluateEtx(uint16_t quality) {
>         return (quality + 10);
>     }
>
> i don't know whether  i have expressed the problem distinctly , i  
> think the two ways have the difference of "10" . am i  
> right ,Omprakash ? can you give me an explain?

They do. If you read the LEEP and CTP TEPs, they talk about this. CTP  
advertises route ETX as a 16-bit fixed point number with two decimal  
fractional digits. I.e., the ETX*100. LEEP advertises link ETX as an 8- 
bit fixed point number with one decimal fractional digit. I.e., the  
ETX*10.

Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to