Hello Omprakash :
2008/6/18 Omprakash Gnawali <[EMAIL PROTECTED]>:
> On Tue, Jun 17, 2008 at 5:42 AM, jiwen zhang <[EMAIL PROTECTED]>
> wrote:
> > Hello Omprakash :
> >
> > maybe i don't express my problems distinctly .
> >
> > 1 . the field "etx" in the struct route_info_t . Is it the current
> > node's ETX through it's parent ? or is it the parent's ETX ?
>
> That neighbor's ETX or the cost from that neighbor to the root. If
> that neighbor is the parent, then it would be the cost from the parent
> to the root.
>
> > 2. what are the meaning of commands "getNeighborLinkQuality(uint8_t
> > neighbor)" and "getNeighborRouteQuality(uint8_t neighbor)" in the
> interface
> > of CtpInfo ?
> > in my opinion , the command "getNeighborLinkQuality" returns the
> ext
> > between the current node and one neighbor in routetable , and the
> > command
> > "getNeighborRouteQuality" returns the etx between current node
> and
> > root throught the neighbor . am i right ? can you expalin it detailedly ?
>
> You are right.
>
> > 3 . i have seen the implementation of the interface CtpInfo , and the
> > command getNeighborRouteQuality which is
> > command uint16_t CtpInfo.getNeighborRouteQuality(uint8_t n) {
> > return (n < routingTableActive)? call
> > LinkEstimator.getLinkQuality(routingTable[n].neighbor) +
> > routingTable[n].info.etx:0xfffff;
> > }
> >
> > if it returns the value of the neighbor's ETX through this neighbor's
> parent
> > , i think it should be changed into :
> > command uint16_t CtpInfo.getNeighborRouteQuality(uint8_t n) {
> > return (n < routingTableActive)? routingTable[n].info.etx:0xfffff;
> > }
> > because routingTable[n].info.etx is the neighbor's ETX through this
> > neighbor's parent , why do you add the link quality between the current
> node
> > and this neighbor ?
>
> What we are trying to do is return the path quality from the current
> node, through the given neighbor, to the root. So, we need to add the
> cost from the node to the parent (link quality) to the cost from the
> parent to the root (getNeighborRouteQuality).
I understand what you have said . there is also a problem :
i see in the task updateRouteTask() which is in component CtpRoutingEngineP
, it computes the current node's ETX throught all it's neighbors including
it's parent .
it uses :
linkEtx = evaluateEtx(call LinkEstimator.getLinkQuality(entry->neighbor));
pathEtx = linkEtx + entry->info.etx;
and
uint16_t evaluateEtx(uint16_t quality) {
return (quality + 10);
}
so i think the implementation of CtpInfo.getNeighborRouteQuality should
change into :
command uint16_t CtpInfo.getNeighborRouteQuality(uint8_t n) {
return (n < routingTableActive)? evaluateEtx(call
LinkEstimator.getLinkQuality(routingTable[n].neighbor)) +
routingTable[n].info.etx:0xfffff;
}
what do you think , Omprakash ?
a bug :
in component CtpSenderP , it use the component CtpC , i don't find the
component . can you check it , Omprakash ?
another question :
today , i write an application using CTP , when i compile it , it can be
compiled successfully , but gives some warnings like :
/home/Administrator/local2/src/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.n
c: In function `CtpForwardingEngineP$0$sendTask$runTask':
/home/Administrator/local2/src/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.n
c:493: warning: comparison is always false due to limited range of data type
/home/Administrator/local2/src/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.n
c: In function `CtpForwardingEngineP$0$SubSend$sendDone':
/home/Administrator/local2/src/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.n
c:575: warning: comparison is always false due to limited range of data type
/home/Administrator/local2/src/tinyos-2.x/tos/lib/net/ctp/CtpForwardingEngineP.n
c:597: warning: comparison is always false due to limited range of data type
i am using tinyos2.x CVS tree , Do you know the reason , Omprakash ?
thank you !!
>
> - om_p
>
--
zhang jiwen
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help