[Tinyos-devel] message_t thoughts: encapsulations and interfaces

Eric Decker cire831 at gmail.com
Tue May 26 05:42:54 PDT 2009


Structurally what do we want the interface between layers to look like?
What do the interfaces look like and what is the resultant change in
encapsulation that
the packet has as stored in the message buffer?

Is it sufficient to have each layer let the packet go as it is handed down
the stack?  That is no random access.  That once a header is written and
handed off then that header isn't changed while it is not at the front of
the packet.  Headers get added on the way down towards the front of the
packet and stripped off on the way up.

Component Interconnect:

At any given layer it would be nice to simply pass the packet to the next
level and the encapsulation would automatically happen.  This would be
determined by the wiring.  That way if we wanted to put the current layer on
top of a different module it would be a simple rewiring.

However, life is not that simple.  We need to specify certain encapsulation
dependent parameters.  Things like addresses, etc.  This is very dependent
on the encapsulation.  4 bytes for IP addresses, 64 bits/16 bits for 15.4
addresses, and other encapsulation specific items may need to be specified.

So I don't think that we can achieve the niceity of simple wiring changes.
 A given layer needs to know how to specify encapsulation specific
parameters and that changes the calling symantic.

So I would propose we split things up into two parts.

1) Writing encapsulations.

needed for AM: dest(16), src(16), len (8), group(8), and type(8)

ie.  simple AMencap(dest,  type) which would default to compiled in static
definitions for the other values or more complete AMencap_full(dest, src,
len, group, type).

2) Handing the packet off to a different layer...

send?   send(msg).



thoughts,

eric


-- 
Eric B. Decker
Senior (over 50 :-) Researcher
Autonomous Systems Lab
Jack Baskin School of Engineering
UCSC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-devel/attachments/20090526/99c22baa/attachment.htm 


More information about the Tinyos-devel mailing list