If you look at getNextHops in S4StateM.nc, S4 gets the next hop information from two main data structures: ClusterTable and rootBeacons. If the destination lies in the cluster of the currently forwarding node, the currently forwarding node will have the forwarding information in ClusterTable. Otherwise, it will try to forward to the nearest beacon of the destination node using the forwaridng information in rootBeacons. These two data structures are populated in processDVMessage and updateRootBeacons (called in processMessage) in response to flooded beacons from the beacon nodes.
As far as addNextHopEntry is concerned, that function was just an additional optimization I added for my own research, but forgot to take it out when I committed the S4 code to tinyos-contrib. I'll remove it from the committed version to prevent further confusion. I hope that answers your question. Tahir. Message: 1 > Date: Tue, 19 Oct 2010 18:01:08 +0200 > From: wasif masood <[email protected]> > Subject: [Tinyos-help] Fwd: S4 implementation > To: tinyos forum <[email protected]> > Message-ID: > <[email protected]> > Content-Type: text/plain; charset="iso-8859-1" > > ---------- Forwarded message ---------- > From: wasif masood <[email protected]> > Date: Tue, Oct 19, 2010 at 5:55 PM > Subject: S4 implementation > To: tinyos forum <[email protected]> > > > > Hi, > > I am wondering how S4 gets the information of next hop because I don't find > any reference to S4Neighborhood.addNextHopEntry anywhere in the code, > I have download the code from SVN repositry. > > Without that forwarding can only work in among the nodes within same > cluster. Am I right or is there something I failed to understand? > > Kind Regards, > Wasif Masood > > > > > -- > Wasif Masood > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20101019/b9bfd459/attachment-0001.htm > > ------------------------------ > >
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
