From: bengreenstein Date: Tue, 6 Feb 2007 05:54:27 +0000 (+0000) Subject: html generated and reference fixed X-Git-Tag: tinyos/2.0.1~196 X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;h=6e74558ff03399a0cd9e3dcaa68f372f1564ac1b;p=tinyos-2.x.git html generated and reference fixed --- diff --git a/doc/html/tep113.html b/doc/html/tep113.html index cbbf279c..5791c0a3 100644 --- a/doc/html/tep113.html +++ b/doc/html/tep113.html @@ -11,21 +11,30 @@ /* :Author: David Goodger :Contact: goodger@users.sourceforge.net -:date: $Date$ -:version: $Revision$ -:copyright: This stylesheet has been placed in the public domain. +:Date: $Date$ +:Revision: $Revision$ +:Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. + +See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to +customize this style sheet. */ -body { - font-family: Times; - font-size: 16px; -} + +/* used to remove borders from tables and images */ +.borderless, table.borderless td, table.borderless th { + border: 0 } + +table.borderless td, table.borderless th { + /* Override padding for "table.docutils td" with "! important". + The right padding separates the table cells. */ + padding: 0 0.5em 0 0 ! important } .first { + /* Override more specific margin styles with "! important". */ margin-top: 0 ! important } -.last { +.last, .with-subtitle { margin-bottom: 0 ! important } .hidden { @@ -38,11 +47,11 @@ a.toc-backref { blockquote.epigraph { margin: 2em 5em ; } -dd { +dl.docutils dd { margin-bottom: 0.5em } -/* Uncomment (& remove this text!) to get bold-faced definition list terms -dt { +/* Uncomment (and remove this text!) to get bold-faced definition list terms +dl.docutils dt { font-weight: bold } */ @@ -53,12 +62,18 @@ div.abstract p.topic-title { font-weight: bold ; text-align: center } -div.attention, div.caution, div.danger, div.error, div.hint, -div.important, div.note, div.tip, div.warning, div.admonition { +div.admonition, div.attention, div.caution, div.danger, div.error, +div.hint, div.important, div.note, div.tip, div.warning { margin: 2em ; border: medium outset ; padding: 1em } +div.admonition p.admonition-title, div.hint p.admonition-title, +div.important p.admonition-title, div.note p.admonition-title, +div.tip p.admonition-title { + font-weight: bold ; + font-family: sans-serif } + div.attention p.admonition-title, div.caution p.admonition-title, div.danger p.admonition-title, div.error p.admonition-title, div.warning p.admonition-title { @@ -66,11 +81,14 @@ div.warning p.admonition-title { font-weight: bold ; font-family: sans-serif } -div.hint p.admonition-title, div.important p.admonition-title, -div.note p.admonition-title, div.tip p.admonition-title, -div.admonition p.admonition-title { - font-weight: bold ; - font-family: sans-serif } +/* Uncomment (and remove this text!) to get reduced vertical space in + compound paragraphs. +div.compound .compound-first, div.compound .compound-middle { + margin-bottom: 0.5em } + +div.compound .compound-last, div.compound .compound-middle { + margin-top: 0.5em } +*/ div.dedication { margin: 2em 5em ; @@ -82,9 +100,11 @@ div.dedication p.topic-title { font-style: normal } div.figure { - margin-left: 2em } + margin-left: 2em ; + margin-right: 2em } div.footer, div.header { + clear: both; font-size: smaller } div.line-block { @@ -100,7 +120,7 @@ div.line-block div.line-block { div.sidebar { margin-left: 1em ; border: medium outset ; - padding: 0em 1em ; + padding: 1em ; background-color: #ffffee ; width: 40% ; float: right ; @@ -127,32 +147,25 @@ div.system-message p.system-message-title { div.topic { margin: 2em } -h1 { - font-family: Arial, sans-serif; - font-size: 20px; -} +h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, +h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { + margin-top: 0.4em } h1.title { - text-align: center; - font-size: 32px; -} - -h2 { - font-size: 16px; - font-family: Arial, sans-serif; -} + text-align: center } h2.subtitle { text-align: center } -h3 { - font-size: 12px; - font-family: Arial, sans-serif; -} - -hr { +hr.docutils { width: 75% } +img.align-left { + clear: left } + +img.align-right { + clear: right } + ol.simple, ul.simple { margin-bottom: 1em } @@ -209,18 +222,10 @@ pre.address { font-family: serif ; font-size: 100% } -pre.line-block { - font-family: serif ; - font-size: 100% } - pre.literal-block, pre.doctest-block { margin-left: 2em ; margin-right: 2em ; - background-color: #eeeeee; - border-color: #000000; - border-width: thin; - font-size: 14px -} + background-color: #eeeeee } span.classifier { font-family: sans-serif ; @@ -236,46 +241,49 @@ span.interpreted { span.option { white-space: nowrap } -span.option-argument { - font-style: italic } - span.pre { white-space: pre } span.problematic { color: red } -table { - margin-top: 0.5em ; - margin-bottom: 0.5em } +span.section-subtitle { + /* font-size relative to parent (h1..h6 element) */ + font-size: 80% } table.citation { - border-left: solid thin gray ; - padding-left: 0.5ex } + border-left: solid 1px gray; + margin-left: 1px } table.docinfo { - margin: 2em 4em; -} + margin: 2em 4em } + +table.docutils { + margin-top: 0.5em ; + margin-bottom: 0.5em } table.footnote { - border-left: solid thin black ; - padding-left: 0.5ex } + border-left: solid 1px black; + margin-left: 1px } -td, th { +table.docutils td, table.docutils th, +table.docinfo td, table.docinfo th { padding-left: 0.5em ; padding-right: 0.5em ; vertical-align: top } -th.docinfo-name, th.field-name { +table.docutils th.field-name, table.docinfo th.docinfo-name { font-weight: bold ; text-align: left ; - white-space: nowrap; - } + white-space: nowrap ; + padding-left: 0 } -h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { +h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, +h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { font-size: 100% } -tt {} +tt.docutils { + background-color: #eeeeee } ul.auto-toc { list-style-type: none } @@ -303,9 +311,9 @@ ul.auto-toc { Ben Greenstein and Philip Levis Draft-Created:11-Jul-2005 -Draft-Version:1.1.2.4 +Draft-Version:1.8 -Draft-Modified:2006-06-14 +Draft-Modified:2007-02-06 Draft-Discuss:TinyOS Developer List <tinyos-devel at mail.millennium.berkeley.edu> @@ -332,7 +340,7 @@ applications can communicate with arbitrary motes.

1. Introduction

Users need to read data out of a TinyOS network. The most common -approach is to attach a mote to a PC or latop with a wired +approach is to attach a mote to a PC or laptop with a wired connection. While the interface on the PC side can vary from a serial cable to a USB device to IP, the mote generally talks to a serial port (UART). In TinyOS 1.x, the UART packet format is platform-specific, @@ -341,9 +349,9 @@ in order to discover and properly handle platform diversity. TinyOS 2.0 introduces the notion of packet format dispatch, so a mote can support multiple UART packet formats simultaneously. This allows transparent bridging (e.g., an 802.15.4 base station) to exist in -parallel with platform-independent communication, which allows -simplifies the PC toolchain. This memo documents the protocols and -structure of the TinyOS 2.x serial communication stack.

+parallel with platform-independent communication, which simplifies the +PC toolchain. This memo documents the protocols and structure of the +TinyOS 2.x serial communication stack.

2. Serial Stack Structure

@@ -379,7 +387,7 @@ provides a packet-level interface. The top three are all platform-independent: only the UART is platform-specific code.

The lowest level of the stack is the raw UART. This HIL component provides functionality for configuring the UART (speed, stop bytes, -etc.) as well as sending/receiving bytes.

+etc.), sending/receiving bytes, and flushing the UART.

The Encoder/Framer sits above the raw UART. This component translates raw data bytes into packet bytes using a serial protocol's encoding. The Encoder/Framer assumes that a protocol's encoding has @@ -404,7 +412,7 @@ particular packet format begins (based on its header size). Section

3. The 2.x Serial Stack Implementation

Section 2 describes the basic structure of the TinyOS 2.x serial -stack structure. This section describes its actual implementation, +stack. This section describes its actual implementation, including SerialActiveMessageC, which sits on top of the Dispatcher. All of the components except for UartC are part of the serial library that lives in tos/lib/serial.

@@ -420,9 +428,24 @@ interface SerialByteComm { async event void putDone(); } -

It also provides interfaces for configuring the serial port. NOTE: -These are not codified yet, and so working out the UART HIL seems like -a good idea.

+

Alternatively, UartC may provide the UartStream multi-byte level +interface. See the Low-Level I/O TEP [TEP117] for details.

+

Additionally, UartC provides a split-phase interface to signal when +the UART is idle. There are situations (such as when powering down the +usart, when switching from TX to RX on a radio with a UART data line, +etc.) when we need explicit information that the data sent over the +UART has actually been transmitted in full. The problem is that on +MCUs that double-buffer UART communication (such as the msp430), a +putDone event signifies that the UART is ready to accept another byte, +but NOT that the UART is idle.

+
+interface SerialFlush {
+  command void flush();
+  event void flushDone();
+}
+
+

It may provide additional interfaces for configuring the serial +port. This TEP does not consider this topic.

3.2 Encoder/Framer: HdlcTranslateC

@@ -466,20 +489,18 @@ stored data byte.

like framing (See RFC 1662[RFC1662]). Type dispatch and buffer management are left to higher layers in the serial stack. The protocol is currently stop-and-wait in the host-to-mote direction and best -effort in the mote-to-host direction. The first performance upgrade of -this module will be to implement sliding window reliability in both -directions.

+effort in the mote-to-host direction.

SerialP provides two byte-level interfaces to the upper layer for sending and receiving packets, respectively called SendBytePacket and ReceiveBytePacket.

On the sending side, SerialP is responsible for encapsulation of upper layer packets. An upper layer component such as SerialDispatcherC -initiates the sending of a packet by calling startSend, passing the +initiates the sending of a packet by calling startSend(), passing the first byte to send. SerialP collects subsequent bytes by signalling -nextByte. Within the nextByte handler or between calls to nextByte, +nextByte(). Within the nextByte handler or between calls to nextByte(), the upper layer should indicate the end-of-packet by calling -completeSend. If completeSend is called from within a nextByte -handler, SerialP will ignore the return of the call to nextByte.

+completeSend(). If completeSend is called from within a nextByte() +handler, SerialP will ignore the return of the call to nextByte().

 interface SendBytePacket {
   async command error_t startSend(uint8_t first_byte);
@@ -491,14 +512,14 @@ interface SendBytePacket {
 

SerialP maintains a small window of bytes that have been received by the upper layer and not yet sent to the UART. Depending on the timing requirements of the underlying UART, the size of this window can be -changed. SerialP uses repeated calls to nextByte to keep this window +changed. SerialP uses repeated calls to nextByte() to keep this window filled.

-

SerialP uses SerialFrameComm to send a delimiter between frames, -a serial-level type field, the bytes of the packet, and a two-byte -frame CRC. For mote-to-host gap detection and link reliability, a -sequence number may also be sent (not currently activated).

-

After sending an entire frame and receiving the last putDone event -from below, SerialP signals sendCompleted to indicate the success or +

SerialP uses SerialFrameComm to send a delimiter between frames, a +serial-level type field, the bytes of the packet, and a two-byte frame +CRC. For mote-to-host gap detection and link reliability, a sequence +number may also be sent (not activated in the default implementation).

+

After sending an entire frame and receiving the last putDone() event +from below, SerialP signals sendCompleted() to indicate the success or failure of a requested transmission.

Packet reception is also managed by SerialP and the interface provided to the upper layer is ReceiveBytePacket:

@@ -511,14 +532,10 @@ interface ReceiveBytePacket {

Upon receiving an interframe delimiter and a new frame's header, SerialP signals the upper layer indicating that a packet is -arriving. For each byte received, SerialP signals byteReceived. (Note: -SerialP signals on byte k-2 when byte k arrives, because the -implementation precludes it from knowing when it has encountered the -2-byte CRC in the frame footer until after it has received it. Lagging -behind by two bytes makes it possible to hide all frame details from -the upper layer.) Once SerialP receives the complete frame it signals -endPacket with a value of SUCCESS. If instead it loses sync during -reception it signals endPacket with FAIL.

+arriving. For each byte received, SerialP signals byteReceived(). +Once SerialP receives the complete frame it signals endPacket with a +value of SUCCESS. If instead it loses sync during reception it signals +endPacket with FAIL.

SerialP acknowledges frames it receives. Acknowledgements have a higher priority than data transmissions and consequently, data frames may be slightly delayed. However, acknowledgement information is @@ -546,12 +563,12 @@ interface SerialPacketInfo {

When SerialDispatcherC receives the first data byte of a packet from SerialP, it stores it as the packet type and calls -SerialPacketInfo.offset() to determine where in a message_t that +offset() to determine where in a message_t that packet format begins. It then spools data bytes in, filling them into its message_t buffer. Similarly, on the send side, it first sends the type byte and spools out data bytes starting from the index denoted by the call to offset(). SerialDispatcherC uses the two length commands, -dataLinkLength and upperLength, to translate between the two notions +dataLinkLength() and upperLength(), to translate between the two notions of packet length: above, length refers to the payload excluding header, while below it refers to the payload plus header.

A component that provides communication over the serial port with @@ -658,7 +675,7 @@ depth one. Therefore, it does not have to contend with other SerialAMSender instantiations for queue space. The underlying implementation schedulers the packets in these queues using some form of fair-share queueing. SerialAMReceiverC provides the virtualized -abstraction for reception. These abstraction are very similar to +abstraction for reception. These abstractions are very similar to TinyOS's radio abstractions, namely, AMSenderC and AMReceiverC. See Section 4 of TEP 116[TEP116] for more information. Unlike the services in the TEP 116, the serial component virtualizations provide @@ -678,12 +695,12 @@ no snooping capabilities.



Ben Greenstein
-
Center for Embedded Networked Sensing
-
UCLA 3563 Boelter Hall
-
Los Angeles, CA 90095-1596
+
Intel Research Seattle
+
1100 NE 45th Street, 6th Floor
+
Seattle, WA 98105

-
phone - +1 310 206 3925
- +
phone - +1 206 206 545 2501
+
@@ -706,6 +723,12 @@ no snooping capabilities.

[TEP116]TEP 116: Packet Protocols. tinyos-2.x/doc/txt/tep116.txt + + + + + +
[TEP117]TEP 117: Low-Level I/O. tinyos-2.x/doc/txt/tep117.txt
diff --git a/doc/txt/tep113.txt b/doc/txt/tep113.txt index bcf94e19..edaf9fd8 100644 --- a/doc/txt/tep113.txt +++ b/doc/txt/tep113.txt @@ -467,6 +467,8 @@ no snooping capabilities. .. [TEP116] TEP 116: Packet Protocols. tinyos-2.x/doc/txt/tep116.txt +.. [TEP117] TEP 117: Low-Level I/O. tinyos-2.x/doc/txt/tep117.txt + .. [HDLC] International Organization For Standardization, ISO Standard 3309-1979, "Data communication - High-level data link control procedures - Frame structure", 1979. .. [RFC1662] PPP in HDLC-like Framing, Internet Engineering Task Force (IETF), 1994