I suggest looking at CTP in TinyOS 2.x - the code there has more
comments, there are more documents describing the protocol, and the
code borrows some parts from the TinyOS 1.x routing protocols you
mention.

- om_p

On Tue, Apr 8, 2008 at 8:33 AM, dima . <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
> hello all , plz i need the best help i can get
>
>
>
>  i am working on impelemting a rounting algorithm and i am trying to
> understand the multihopeRoute so i could change in it ino my algorithm
> called DSAP am I on the right way to do this ???
>
>
>
> could anyone help me to find the answer about these questions??
>
>
>
> -in multihopLEPSM :
>
>
>
>
>
>
>
> -what the difference in  Origin address and Source address in the AM message
> and there's already in the TOS_Msg  struncture  the field  addr (address)?
>
>
>
> -why do I need the flags?  NBRFLAG_VALID, NBRFALG_NEW , NBRFLAG_EST_INIT …?
>
>
>
> -what the difference between a forwarded packet and an originated one?
>
>
>
> -what's the use for The struct RPEstEntry, sortEntry ?
>
>
>
> -the struct RoutePacket and its  fields "EstEntries" and "RPestEntry
> estlist[1]"  are used for what ?
>
>
>
> -what is the meaning of evicting a "previous entry" and "evicts the parent "
> in  this sentence??
>
> "
>
> Get neighbor table entry corresponding to the given address.
>
>    * If current entry doesn't exist, then create one, possibly
>
>    * evicting a previous entry.
>
>    * XXX - what if it evicts the parent???
>
>
>
>
>
> -what does the function sortByReceiveEstFcn do ?
>
>
>
> -when do I need to update the neighbor table?
>
>
>
> -what does the function SendRouteTask () do ?
>
> i didnt understand its impelentation espacillay the lines in RED
>
> _  task void SendRouteTask() {
>
>     TOS_MHopMsg *pMHMsg = (TOS_MHopMsg *) &routeMsg.data[0];
>
>     RoutePacket *pRP = (RoutePacket *)&pMHMsg->data[0];
>
>     struct SortEntry sortTbl[ROUTE_TABLE_SIZE];
>
>     uint8_t length = offsetof(TOS_MHopMsg,data) +
> offsetof(RoutePacket,estList);
>
>     uint8_t maxEstEntries;
>
>     uint8_t i,j;
>
>
>
>     if (gfSendRouteBusy) {
>
>       return;
>
>     }
>
>
>
>     dbg(DBG_ROUTE,"MultiHopLEPSM Sending route update msg.\n");
>
>
>
>     maxEstEntries = TOSH_DATA_LENGTH - length;
>
>     maxEstEntries = maxEstEntries / sizeof(RPEstEntry);
>
>
>
>     for (i = 0,j = 0;i < ROUTE_TABLE_SIZE; i++) {
>
>       if (NeighborTbl[i].flags & NBRFLAG_VALID) {
>
>         sortTbl[j].id = NeighborTbl[i].id;
>
>         sortTbl[j].receiveEst = NeighborTbl[i].receiveEst;
>
>         j++;
>
>       }
>
>     }
>
>     qsort (sortTbl,j,sizeof(struct SortEntry),sortByReceiveEstFcn);
>
>
>
>            .....
>
>             .....}
>
>
>
> thanx alot and best wishes for all
>
>
>
> DIMA
>
>
>
> ________________________________
> Connect to the next generation of MSN Messenger  Get it now!
> _______________________________________________
>  Tinyos-help mailing list
>  [email protected]
>  https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>

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

Reply via email to