Hi Philip,
 
Thanks for your help. I looked at app.c and saw that the Surge application is using the MultiHopEngineM.nc and MultiHopLEPSM.nc modules. I have made the following observation. Please correct me if I am wrong.
 
MultiHopEngineM has all the sending, forwarding and receiving functions & MultiHopLEPSM has all the neighbor table update & parent selection functions. Surge calls the RouteControl.getParent() function which is defined in MultiHopEngineM which in turn calls the RouteSelectCntl.getParent() function in MultiHopLEPSM, where we get the parent addr from gpCurrentParent.
 
My task is to implement static routes in Surge application. So, I am ONLY interested in the parent address. I have thought of 2 ways of implementing this:
  1. Have a case statement which sets the parent address for all the nodes in MultiHopEngineM, and then return the parent address in MultiHopEngineM itself. We can then "unwire" the MultiHopLEPSM module because we are not interested in having a nighbor table.
  2. Have a a new struct in MultiHopLEPSM which only declares the parent and point gpCurrentParent to this new struct. We then comment out everything except the StdControl functions in MultiHopLEPSM.

Can you please suggest which one of the two is a better way to implement static routes. Thanks a lot for your time and help.

Regards,
Yogesh.

 


Philip Levis <[EMAIL PROTECTED]> wrote:
On Dec 29, 2004, at 11:35 AM, Yogesh Iyer wrote:

> Hi,
>  
> I am trying to understand the multihop routing implemented by Surge.
> Surge uses the MultiHopRoute.nc for routing.
>  
> Now, In the implementation section of the MultiHopRoute.nc file, there
> are preprocessor directives defined on the OLD_ROUTING identifier. I
> wanted to know whether the Surge application executes the
> Old_routing (the MultiHopRouteM module) or the else part (the
> MultiHopLEPSM module).
>  
> Can someone please help me understand how to figure that out?
>  
> Thanks,
> Yogesh.
>  

Three ways:

1) Make docs and look at the component graph
2) take a look at build/*/app.c (the generated C file) and see which is
there
3) Run it in T! OSSIM and use gdb

Phil

---------------

"We shall not cease from exploration
And the end of all our exploring
Will be to arrive where we started
And know the place for the first time."

- T. S. Eliot, 'Little Gidding'


Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
_______________________________________________
Tinyos-users mailing list
[email protected]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users

Reply via email to