On Sun, Aug 16, 2009 at 1:17 PM, Swetha R<[email protected]> wrote:
>
> Hello,
>
>           Thanks a lot for your reply. Can you please suggest me how i can
> write my own protocol for my scenario. I also want to store the routing
> table information in each node which would be a static table and i want to
> manually set it up in every node.For example:
> For Example:3 by 3 grid
> 0   1   2
> 3   4   5
> 6   7   8
> Now if want to add the routing table information into node2 and so on for
> all nodes too. how can i do it ? At Node2
> Destination   Nexthop   hopcount
>  0                    1                2
>  1                    1                1
>  2                    0                0
>  3                    1                3
>  4                    1                2
>  5                    5                1
>  6                    1                4
>  7                    1                3
>  8                    5                2
>
> and next i would like to check the retrieve the respective destination and
> next_hop value for hop_count 1 ,2 and so on. How can i do this? please give
> me some suggestions or ideas regarding this .

To get an idea about how routing protocols are implemented, you should
look at MultihopLQI (tos/lib/net/lqi). In LqiRoutingEngineP.nc you
will see a function called RouteSelect.selectRoute which is called by
the forwarder before forwarding the packets. You can put your static
routing table somewhere there. Once you determine what the next hop
should be, you can change this line at the end of that function:

    call AMPacket.setDestination(msg, gbCurrentParent);

- om_p

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

Reply via email to