[Tinyos-2-commits] CVS: tinyos-2.x/doc/txt tep111.txt, 1.1.2.13,
1.1.2.14
Phil Levis
scipio at users.sourceforge.net
Wed Oct 4 12:57:59 PDT 2006
Update of /cvsroot/tinyos/tinyos-2.x/doc/txt
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv19415
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
tep111.txt
Log Message:
Incorporated comments from WG discussion.
Index: tep111.txt
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/doc/txt/tep111.txt,v
retrieving revision 1.1.2.13
retrieving revision 1.1.2.14
diff -C2 -d -r1.1.2.13 -r1.1.2.14
*** tep111.txt 4 Oct 2006 16:27:53 -0000 1.1.2.13
--- tep111.txt 4 Oct 2006 19:57:57 -0000 1.1.2.14
***************
*** 127,130 ****
--- 127,135 ----
complexities make specifying the format of ``TOS_Msg`` very difficult.
+ TinyOS has traditionally used statically sized packet buffers,
+ rather than more dynamic approaches, such as scatter-gather I/O
+ in UNIX sockets (see the man page for ``recv(2)`` for details).
+ TinyOS 2.x continues this approach.
+
2. message_t
====================================================================
***************
*** 260,267 ****
The message_t header field is an array of bytes whose size is
the size of a platform's union of data-link headers.
! Because packets are stored contiguously, the layout of a packet
! in memory is not the same as the layout of its nesC structure.
! A packet header does not necessarily start at the beginning of
the message_t. For example, consider the Telos platform::
--- 265,273 ----
The message_t header field is an array of bytes whose size is
the size of a platform's union of data-link headers.
! Because radio stacks often prefer packets to be stored contiguously,
! the layout of a packet in memory does not necessarily reflect the
! layout of its nesC structure.
! A packet header MAY start somewhere besides the beginning of
the message_t. For example, consider the Telos platform::
***************
*** 378,382 ****
} cc2420_metadata_t;
! 5. Implementation
====================================================================
--- 384,420 ----
} cc2420_metadata_t;
! 3.5 Variable Sized Structures
! ----------------------------------------------------------------
!
! The message_t structure is optimized for packets with fixed-size
! headers and footers. Variable-sized footers are generally easy
! to implement. Variable-sized headers are a bit more difficult.
! There are three general approaches that can be used.
!
! If the underlying link hardware is byte-based, the header can
! just be stored at the beginning of the message_t, giving it
! a known offset. There may be padding between the header and
! the data region, but assuming a byte-based send path this merely
! requires adjusting the index.
!
! If the underlying link hardware is packet-based, then the
! protocol stack can either include metadata (e.g., in the
! metadata structure) stating where the header begins or it
! can place the header at a fixed position and use ``memmove(3)``
! on reception and transmit. In this latter case, on
! reception the packet is continguously read into the message_t
! beginning at the offset of the header structure. Once the
! packet is completely received, the header can be decoded,
! its length calculated, and the data region of the packet
! can be moved to the ``data`` field. On transmission,
! the opposite occurs: the data region (and footer if need
! be) are moved to be contiguous with the header. Note that
! on completion of transmission, they need to be moved back.
! Alternatively, the radio stack can institute a single
! copy at the botttom layer.
!
!
!
! 4. Implementation
====================================================================
***************
*** 399,403 ****
``tinyos-2.x/tos/platforms/micaz/platform_message.h``.
! 6. Author's Address
====================================================================
--- 437,441 ----
``tinyos-2.x/tos/platforms/micaz/platform_message.h``.
! 5. Author's Address
====================================================================
More information about the Tinyos-2-commits
mailing list