Hi All,
I have no idea how to use the getNeighborAddr() of the CtpInfo interface in
CTP. From the definition given in the online tinyos's nesdoc, I understand
this method used to get the neighbors' addresses of a node.
I got a strange which I don't understand to interpret after running the
simulation.
This is what I code in the application file:
dbg("AppC","Neighbor address: %hhu\n", call CtpInfo.getNeighborAddr(3));
<- here, I am hoping to get what are the neighbor addresses for node 3
and this is what I got in simulation:
Neighbor address: 255.
I also made other attempt such as:
dbg("AppC","Neighbor address: %hhu %hhu\n", call
CtpInfo.getNeighborAddr(2)); <- here, I tried to read two addresses for
node 2
and this is what I got in simulation:
Neighbor address: 255 133
Both of them I guess wrong because node 3 and node 2 are connected to other
nodes and I don't have node 133 set in the topology.
I look into the CtpRoutingEngineP.nc, and it defines if the neighbor >
routingTableActive, it will return AM_BROADCAST_ADDR.
>From the definition: command am_addr_t
getNeighborAddr<http://www.tinyos.net/tinyos-2.x/doc/nesdoc/micaz/ihtml/tos.lib.net.ctp.CtpInfo.html#getNeighborAddr>(uint8_t
neighbor), I guess the 'neighbor' parameter here refer either to 1. How many
neighbors users want to know, or 2. Which node the user wan't to know it's
neighbors.
But still, I am confuse what the 'neighbor' parameter refers to/means here?,
and how I can use this method correctly?
I really need help to make me understand better how to use this method.
please..
thanks
Yusnaidi
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help