[Tinyos-2-commits] CVS: tinyos-2.x/doc/html tep111.html,1.7,1.8

Phil Levis scipio at users.sourceforge.net
Mon Feb 5 12:23:38 PST 2007


Update of /cvsroot/tinyos/tinyos-2.x/doc/html
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15311/html

Modified Files:
	tep111.html 
Log Message:
Include suggestions from community review.


Index: tep111.html
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/doc/html/tep111.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** tep111.html	10 Jan 2007 18:33:38 -0000	1.7
--- tep111.html	5 Feb 2007 20:23:35 -0000	1.8
***************
*** 304,310 ****
  <tr class="field"><th class="docinfo-name">Draft-Created:</th><td class="field-body">11-Jul-2005</td>
  </tr>
! <tr class="field"><th class="docinfo-name">Draft-Version:</th><td class="field-body">1.5</td>
  </tr>
! <tr class="field"><th class="docinfo-name">Draft-Modified:</th><td class="field-body">2006-12-12</td>
  </tr>
  <tr class="field"><th class="docinfo-name">Draft-Discuss:</th><td class="field-body">TinyOS Developer List &lt;tinyos-devel at mail.millennium.berkeley.edu&gt;</td>
--- 304,310 ----
  <tr class="field"><th class="docinfo-name">Draft-Created:</th><td class="field-body">11-Jul-2005</td>
  </tr>
! <tr class="field"><th class="docinfo-name">Draft-Version:</th><td class="field-body">1.6</td>
  </tr>
! <tr class="field"><th class="docinfo-name">Draft-Modified:</th><td class="field-body">2007-01-10</td>
  </tr>
  <tr class="field"><th class="docinfo-name">Draft-Discuss:</th><td class="field-body">TinyOS Developer List &lt;tinyos-devel at mail.millennium.berkeley.edu&gt;</td>
***************
*** 323,327 ****
  <p>This memo covers the TinyOS 2.x message buffer abstraction, <tt class="docutils literal"><span class="pre">message_t</span></tt>.
  It describes the message buffer design considerations, how and where
! <tt class="docutils literal"><span class="pre">message_t</span></tt> is specified, and how data link layers should access it.</p>
  </div>
  <div class="section">
--- 323,329 ----
  <p>This memo covers the TinyOS 2.x message buffer abstraction, <tt class="docutils literal"><span class="pre">message_t</span></tt>.
  It describes the message buffer design considerations, how and where
! <tt class="docutils literal"><span class="pre">message_t</span></tt> is specified, and how data link layers should access it.
! The major goal of <tt class="docutils literal"><span class="pre">message_t</span></tt> is to allow datagrams to be passed between
! different link layers as a contiguous region of memory with zero copies.</p>
  </div>
  <div class="section">
***************
*** 412,416 ****
  header fields. This is very difficult to do in C.</p>
  <p>The <tt class="docutils literal"><span class="pre">data</span></tt> payload is especially problematic. Many
! components refer to this field, so it must be at a fixed offset.
  Depending on the underlying link layer, the header fields
  preceding it might have different lengths, and packet-level radios
--- 414,419 ----
  header fields. This is very difficult to do in C.</p>
  <p>The <tt class="docutils literal"><span class="pre">data</span></tt> payload is especially problematic. Many
! components refer to this field, so it must be at a fixed offset
! from the beginning of the structure.
  Depending on the underlying link layer, the header fields
  preceding it might have different lengths, and packet-level radios
***************
*** 434,438 ****
  } message_t;
  </pre>
! <p>This format keeps data at a fixed but platform dependent offset, which
  is important when
  passing a message buffer between two different link layers. If the
--- 437,441 ----
  } message_t;
  </pre>
! <p>This format keeps data at a fixed offset on a platform, which
  is important when
  passing a message buffer between two different link layers. If the
***************
*** 451,458 ****
  structures. These structures MUST be external structs (<tt class="docutils literal"><span class="pre">nx_struct</span></tt>),
  and all of their fields MUST be external types (<tt class="docutils literal"><span class="pre">nx_*</span></tt>), for two
! reasons. First, external types ensure cross-platform compatibility.
  Second, it forces structures to be aligned on byte boundaries,
  circumventing issues with the
! alignment of packet buffers and field offsets within them.
  For example, the CC1000 radio implementation defines
  its structures in <tt class="docutils literal"><span class="pre">CC1000Msg.h</span></tt>:</p>
--- 454,463 ----
  structures. These structures MUST be external structs (<tt class="docutils literal"><span class="pre">nx_struct</span></tt>),
  and all of their fields MUST be external types (<tt class="docutils literal"><span class="pre">nx_*</span></tt>), for two
! reasons. First, external types ensure cross-platform compatibility <a class="footnote-reference" href="#id5" id="id2" name="id2">[1]</a>.
  Second, it forces structures to be aligned on byte boundaries,
  circumventing issues with the
! alignment of packet buffers and field offsets within them. Metadata fields
! must be nx_structs for when complete packets are forwarded to the serial
! port in order to log traffic.
  For example, the CC1000 radio implementation defines
  its structures in <tt class="docutils literal"><span class="pre">CC1000Msg.h</span></tt>:</p>
***************
*** 484,488 ****
  named <tt class="docutils literal"><span class="pre">platform_message.h</span></tt>. The mica2 platform, for example, has
  two data link layers: the CC1000 radio and the TinyOS serial
! stack <a class="footnote-reference" href="#id4" id="id2" name="id2">[1]</a>. The serial packet format does not have a footer
  or metadata section. The <tt class="docutils literal"><span class="pre">platform_message.h</span></tt> of the mica2
  looks like this:</p>
--- 489,493 ----
  named <tt class="docutils literal"><span class="pre">platform_message.h</span></tt>. The mica2 platform, for example, has
  two data link layers: the CC1000 radio and the TinyOS serial
! stack <a class="footnote-reference" href="#id6" id="id3" name="id3">[2]</a>. The serial packet format does not have a footer
  or metadata section. The <tt class="docutils literal"><span class="pre">platform_message.h</span></tt> of the mica2
  looks like this:</p>
***************
*** 536,541 ****
  packet fields through interfaces.  A component that introduces
  new packet fields SHOULD provide an interface to those that
! are of interest to other components.
! For example, active messages have an interface named <tt class="docutils literal"><span class="pre">AMPacket</span></tt>
  which provides access commands to AM fields. In TinyOS 1.x, a
  component would directly access <tt class="docutils literal"><span class="pre">TOS_Msg.addr</span></tt>; in TinyOS 2.x,
--- 541,548 ----
  packet fields through interfaces.  A component that introduces
  new packet fields SHOULD provide an interface to those that
! are of interest to other components. These interfaces SHOULD take
! the form of get/set operations that take and return values, rather
! than offsts into the structure.</p>
! <p>For example, active messages have an interface named <tt class="docutils literal"><span class="pre">AMPacket</span></tt>
  which provides access commands to AM fields. In TinyOS 1.x, a
  component would directly access <tt class="docutils literal"><span class="pre">TOS_Msg.addr</span></tt>; in TinyOS 2.x,
***************
*** 543,547 ****
  The most basic of these interfaces is Packet, which provides
  access to a packet payload. TEP 116 describes common TinyOS
! packet ADT interfaces <a class="footnote-reference" href="#id5" id="id3" name="id3">[2]</a>.</p>
  <p>Link layer components MAY access packet fields differently than other
  components, as they are aware of the actual packet format. They can
--- 550,554 ----
  The most basic of these interfaces is Packet, which provides
  access to a packet payload. TEP 116 describes common TinyOS
! packet ADT interfaces <a class="footnote-reference" href="#id7" id="id4" name="id4">[3]</a>.</p>
  <p>Link layer components MAY access packet fields differently than other
  components, as they are aware of the actual packet format. They can
***************
*** 724,737 ****
  <div class="section">
  <h1><a id="citations" name="citations">6. Citations</a></h1>
! <table class="docutils footnote" frame="void" id="id4" rules="none">
  <colgroup><col class="label" /><col /></colgroup>
  <tbody valign="top">
! <tr><td class="label"><a class="fn-backref" href="#id2" name="id4">[1]</a></td><td>TEP 113: Serial Communication.</td></tr>
  </tbody>
  </table>
! <table class="docutils footnote" frame="void" id="id5" rules="none">
  <colgroup><col class="label" /><col /></colgroup>
  <tbody valign="top">
! <tr><td class="label"><a class="fn-backref" href="#id3" name="id5">[2]</a></td><td>TEP 116: Packet Protocols.</td></tr>
  </tbody>
  </table>
--- 731,750 ----
  <div class="section">
  <h1><a id="citations" name="citations">6. Citations</a></h1>
! <table class="docutils footnote" frame="void" id="id5" rules="none">
  <colgroup><col class="label" /><col /></colgroup>
  <tbody valign="top">
! <tr><td class="label"><a class="fn-backref" href="#id2" name="id5">[1]</a></td><td><a class="reference" href="http://nescc.sourceforge.net">nesC: A Programming Language for Deeply Embedded Networks.</a></td></tr>
  </tbody>
  </table>
! <table class="docutils footnote" frame="void" id="id6" rules="none">
  <colgroup><col class="label" /><col /></colgroup>
  <tbody valign="top">
! <tr><td class="label"><a class="fn-backref" href="#id3" name="id6">[2]</a></td><td>TEP 113: Serial Communication.</td></tr>
! </tbody>
! </table>
! <table class="docutils footnote" frame="void" id="id7" rules="none">
! <colgroup><col class="label" /><col /></colgroup>
! <tbody valign="top">
! <tr><td class="label"><a class="fn-backref" href="#id4" name="id7">[3]</a></td><td>TEP 116: Packet Protocols.</td></tr>
  </tbody>
  </table>



More information about the Tinyos-2-commits mailing list