Hi,
Thanks for the suggestion Philip. I read the papers and understood how we encapsulate the TOS_MHopMsg structure inside the data field of the TOS_Msg structure.
But, why don't we encapsulate the application layer packet SurgeMsg in the data field of the TOS_Msg structure. Instead we encapsulate the routing packet TOS_MHopMsg, is it because Surge is implementing a routing algorithm?
Now, if I want to define my own structures, I guess I will have to encapsulate my structs in the data payload of TOS_Msg? Should this be my approach, please let me know if I am correct.
Can someone with knowledge in this please post their suggestions, so that I can go ahead in my work. Thanks a lot.
Thanks for the suggestion Philip. I read the papers and understood how we encapsulate the TOS_MHopMsg structure inside the data field of the TOS_Msg structure.
But, why don't we encapsulate the application layer packet SurgeMsg in the data field of the TOS_Msg structure. Instead we encapsulate the routing packet TOS_MHopMsg, is it because Surge is implementing a routing algorithm?
Now, if I want to define my own structures, I guess I will have to encapsulate my structs in the data payload of TOS_Msg? Should this be my approach, please let me know if I am correct.
Can someone with knowledge in this please post their suggestions, so that I can go ahead in my work. Thanks a lot.
Regards,
Yogesh.
Yogesh.
Philip Levis <[EMAIL PROTECTED]> wrote:
On Jan 10, 2005, at 3:45 AM, Yogesh Iyer wrote:
> Hello,
>
> For the Surge application which uses the MultiHopEngineM and
> MultiHopLEPSM modules, we have defined 3 structs viz. SurgeMsg,
> TOS_MHopMsg, TOS_Msg.
>
> All the structs have different variables declared in them. Can someone
> please explain the usage of each structure.
>
> I tried to follow whats going on. I think the actual message that is
> being sent is the TOS_Msg. The addr is set in selectRoute(), either as
> a Broadcast address or by Msg->addr = gpCurrentParent->id. Then, what
> is the need of the parentaddr in SuregeMsg?
>
> Also, what is TOS_MHopMsg used for? Is it only to maintain some values
> like sourceaddr, originaddr, hopcount, etc. in the node.
>
> In SurgeM.nc, we have define! d TOS_Msg gMsgBuffer. We pass &gMsgBuffer
> when we call the Send.getBuffer() and Send.send() functions. What is
> stored in this gMsgBuffer and where do we initialized it?
>
> My questions may be trivial but am totally confused here. I'll really
> thankful if so! meone can explain the use of the three structures and
> how are they related to each other.
I'd suggest reading three things to make your life easier. The first is
Tutorial 4. The second is the ad-hoc architecture document in
tinyos-1.x/doc. It's a bit outdated (I think one of the interfaces has
changed slightly), but the basics are still there. The third, if you
want to know the algorithms used in the collection routing -- and
understand that it's just collection routing, not any-to-any, is Alec
Woo's paper in SenSys 2003.
The three structures are just protocol layers. TOS_Msg is the AM packet
format; TOS_MHopMsg is the routing packet for! mat; SurgeMsg is the
application packet format. Since TinyOS has a buffer swap communication
interface (to remove the need for copying), components that want to
send a packet need to allocate a packet buffer (a TOS_Msg). This is
discussed in Tutorial 4.
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
