From: scipio Date: Tue, 6 May 2008 22:21:03 +0000 (+0000) Subject: Updates to 119. X-Git-Tag: release_tinyos_2_1_0_0~426 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=c24d4b6429703a7e2489a923bb015e18a64db8ab Updates to 119. --- diff --git a/doc/html/tep119.html b/doc/html/tep119.html index caa09e70..d7000d99 100644 --- a/doc/html/tep119.html +++ b/doc/html/tep119.html @@ -313,9 +313,9 @@ TEP 1.

Abstract

The memo documents the interfaces, components, and semantics used by collection protocol in TinyOS 2.x. Collection provides a best-effort, -multihop delivery of packets to the root of a tree. There may be -multiple roots in a network, and in this case the semantics implemented -are of anycast delivery to at least one of the roots. A node sending +multihop delivery of packets to the root of a tree. There may be +multiple tree roots in a network, and in this case the semantics +are anycast delivery to at least one of the roots. A node sending a packet does not specify which root the packet is destined to.

@@ -358,52 +358,27 @@ neighbors. from introducing interference for subsequent packets. -

The rest of this document describes a set of components and interfaces -for a collection service outlined above.

+

While collection protocols can take a wide range of approaches to +address these challenges, the programming interface they provide is +typically independent of these details. The rest of this document +describes a set of components and interfaces for collection services.

2. Collection interfaces

A node can perform four different roles in collection: producer, -consumer, snooper, and in-network processor. Depending on their role, +snooper, in-network processor, and consumer. Depending on their role, the nodes use different interfaces to interact with the collection component.

-

A consumer is a root of a tree. The set of all roots and the paths that -lead to them form the collection routing infrastructure in the network. -For any connected set of nodes implementing the collection protocol -there is only one collection infrastructure, i.e., all roots in this -set active at the same time are part of the same infrastructure.

-

A node is configured to become a root by using the RootControl -interface. RootControl.setRoot() MUST make the current node a root of -the collection infrastructure. RootControl.unsetRoot() MUST make -the current root no longer a root in the collection infrastructure. -Both calls are idempotent. RootControl.setRoot() MAY be called on a -node that is already a root, to no effect. RootControl.unsetRoot() MAY -be called on a node that is not a root:

-
-interface RootControl {
-  command error_t setRoot();
-  command error_t unsetRoot();
-  command bool isRoot();
-}
-
-

Both commands MUST return SUCCESS if the node is now in the specified -state, and FAIL otherwise. For example, if a node is already a root -and an application calls RootControl.setRoot(), the call will -return SUCCESS.

The collection infrastructure can be multiplexed among independent applications, by means of a collection identifier. It is important to note that the data traffic in the protocol is multiplexed, while the control traffic is not.

The nodes that generate data to be sent to the root are producers. -The producers use the Send interface [1] to send data to the root +The producers use the Send interface [1] to send data to the root of the collection tree. The collection identifier is specified as a parameter to Send during instantiation.

-

Root nodes that receive data from the network are consumers. The -consumers use the Receive interface [1] to receive a message -delivered by collection. The collection identifier is specified -as a parameter to Receive during instantiation.

The nodes that overhear messages in transit are snoopers. The -snoopers use the Receive interface [1] to receive a snooped +snoopers use the Receive interface [1] to receive a snooped message. The collection identifier is specified as a parameter to Receive during instantiation.

The nodes can process a packet that are in transit. These in-network @@ -423,6 +398,30 @@ MUST NOT forward the packet. This interface allows a higher layer to inspect the internals of a packet and possibly suppress it if it is unnecessary or if its contents can be aggregated into an existing packet.

+

Root nodes that receive data from the network are consumers. The +consumers use the Receive interface [1] to receive a message +delivered by collection. The collection identifier is specified +as a parameter to Receive during instantiation.

+

The set of all roots and the paths that +lead to them form the collection routing infrastructure in the network. +For any connected set of nodes implementing the collection protocol +there is only one collection infrastructure, i.e., all roots in this +set active at the same time are part of the same infrastructure.

+

The RootControl interface configures whether a node is a +root:

+
+interface RootControl {
+  command error_t setRoot();
+  command error_t unsetRoot();
+  command bool isRoot();
+}
+
+

Both commands MUST return SUCCESS if the node is now in the specified +state, and FAIL otherwise. For example, if a node is already a root +and an application calls RootControl.setRoot(), the call will +return SUCCESS. If setRoot() returns SUCCESS, then a subsequent call +to isRoot() MUST return TRUE. If unsetRoot() returns SUCCESS, then +a subsequent call to isRoot() MUST return FALSE.

3 Collection Services

@@ -445,10 +444,10 @@ configuration CollectionC { } } -

CollectionC MAY have additional interfaces, but they MUST have -default functions on all outgoing invocations (commands for uses, -events for provides) of those interfaces so that it can operate -properly if they are not wired.

+

CollectionC MAY have additional interfaces. These additional +interfaces MUST have default functions on all outgoing invocations +(commands for uses, events for provides) of those interfaces so that +it can operate properly if they are not wired.

Components SHOULD NOT wire to CollectionC.Send. The generic component CollectionSenderC (described in section 3.1) provides a virtualized sending interface.

@@ -459,7 +458,7 @@ different am_id_t values represent different protocols operating on top of active messages. All packets sent with a particular collection_id_t generally have the same payload format, so that snoopers, intercepters, and receivers can parse it properly.

-

Receive.receive MUST NOT be signaled on non-root +

ColletionC MUST NOT signal Receive.receive on non-root nodes. CollectionC MAY signal Receive.receive on a root node when a data packet successfully arrives at that node. If a root node calls Send, CollectionC MUST treat it as it if were a received packet. @@ -473,7 +472,7 @@ is supposed to forward, it MAY signal Snoop.receive.

RootControl allows a node to be made a collection tree root. CollectionC SHOULD NOT configure a node as a root by default.

Packet and CollectionPacket allow components to access collection -data packet fields [1].

+data packet fields [1].

3.1 CollectionSenderC

Collection has a virtualized sending abstraction, the generic @@ -487,7 +486,7 @@ generic configuration CollectionSenderC(collection_id_t collectid) { }

This abstraction follows a similar virtualization approach to -AMSenderC [1], except that it is parameterized by a collection_id_t +AMSenderC [1], except that it is parameterized by a collection_id_t rather than an am_id_t. As with am_id_t, every collection_id_t SHOULD have a single packet format, so that receivers can parse a packet based on its collection ID and contents.

@@ -499,10 +498,10 @@ based on its collection ID and contents.

tinyos-2.x/tos/lib/net/ctp and tinyos-2.x/tos/lib/net/4bitle, in the CTP protocol. It is beyond the scope of this document to fully describe CTP, but we outline its main components. CTP will be -described in an upcoming TEP [2]. This implementation is a +described in an upcoming TEP [2]. This implementation is a reference implementation, and is not the only possibility. It consists of three major components, which are wired together to form -a CollectionC: LinkEstimatorP, CtpTreeRoutingEngineP, and +a CollectionC: LinkEstimatorP, CtpRoutingEngineP, and CtpForwardingEngineP.

This decomposition tries to encourage evolution of components and ease of use through modularization. Neighbor management and link @@ -512,24 +511,32 @@ forwarding policies, such as queueing and timing.

4.1 LinkEstimatorP

LinkEstimatorP estimates the quality of link to or from each -neighbor. Link estimation can be done in a variety of ways, and we -do not impose one here. It is decoupled from the establishment of -routes. There is a narrow interface -- LinkEstimator -- between the -link estimator and the routing engine. The one requirement is that -the quality returned is standardized. A smaller return value from -LinkEstimator.getQuality(), LinkEstimator.getforwardQuality(), -LinkEstimator.getReverseQuality() MUST imply that the link to the +neighbor. In this TEP, we briefly describe the reference +implementation in ''tinyos-2.x/tos/lib/4bitle'' and refer the readers +to [3] for detailed description of the estimator.

+

Link estimation is decoupled from the establishment of routes. There +is a narrow interface -- LinkEstimator and CompareBit -- between the +link estimator and the routing engine. The one requirement is that the +quality returned is standardized. A smaller return value from +LinkEstimator.getLinkQuality() MUST imply that the link to the neighbor is estimated to be of a higher quality than the one that results in a larger return value. The range of value SHOULD be -[0,255] and the variation in link quality in that range SHOULD be +[0,65535] and the variation in link quality in that range SHOULD be linear. Radio provided values such as LQI or RSI, beacon based link estimation to compute ETX, or their combination are some possible -approaches to estimating link qualities.

+approaches to estimating link qualities. The routing engine instructs +LinkEstimatorP to insert the neighbor, through which a high quality +path to the root can be constructed, into the neighbor table by +returning TRUE when LinkEstimatorP signals Comparebit.shouldInsert() +for the newly discovered neighbor.

LinkEstimatorP MAY have its own control messages to compute -bi-directional link qualities. LinkEstimatorP provides calls -(txAck(), txNoAck(), and clearDLQ()) to update the link estimates -based on successful or unsuccessful data transmission to the -neighbors.

+bi-directional link qualities. LinkEstimatorP provides calls (txAck(), +txNoAck(), and clearDLQ()) to update the link estimates based on +successful or unsuccessful data transmission to the +neighbors. LinkEstimatorP uses the LinkPacketMetadata interface to +determine if the channel was of high quality when a packet is received +from a neighbor to consider the link to that neighbor for insertion +into the neighbor table.

The user of LinkEstimatorP can call insertNeighbor() to manually insert a node in the neighbor table, pinNeighbor() to prevent a neighbor from being evicted, and unpinNeighbor() to restore eviction @@ -545,14 +552,24 @@ LinkEstimatorP { interface LinkEstimator; interface Init; interface Packet; - interface LinkSrcPacket; + interface CompareBit; + } + uses { + interface AMSend; + interface AMPacket as SubAMPacket; + interface Packet as SubPacket; + interface Receive as SubReceive; + interface LinkPacketMetadata; + interface Random; } } +interface CompareBit { + event bool shouldInsert(message_t *msg, void* payload, uint8_t len, bool white_bit); +} + interface LinkEstimator { - command uint8_t getLinkQuality(uint16_t neighbor); - command uint8_t getReverseQuality(uint16_t neighbor); - command uint8_t getForwardQuality(uint16_t neighbor); + command uint16_t getLinkQuality(uint16_t neighbor); command error_t insertNeighbor(am_addr_t neighbor); command error_t pinNeighbor(am_addr_t neighbor); command error_t unpinNeighbor(am_addr_t neighbor); @@ -594,13 +611,13 @@ generic module CtpRoutingEngineP(uint8_t routingTableSize, interface Receive as BeaconReceive; interface LinkEstimator; interface AMPacket; - interface LinkSrcPacket; interface SplitControl as RadioControl; interface Timer<TMilli> as BeaconTimer; interface Timer<TMilli> as RouteTimer; interface Random; interface CollectionDebug; interface CtpCongestion; + interface Comparebit; } } @@ -725,16 +742,22 @@ well as the configuration MultihopLqiP.

6. Citations

- +
- +
[1]TEP 116: Packet Protocols
[1]TEP 116: Packet Protocols
- +
+ + + + +
[2]TEP 123: The Collection Tree Protocol (CTP)
+ - +
[2]TEP 123: The Collection Tree Protocol (CTP)
[3]Rodrigo Fonseca, Omprakash Gnawali, Kyle Jamieson, and Philip Levis. "Four Bit Wireless Link Estimation." In Proceedings of the Sixth Workshop on Hot Topics in Networks (HotNets VI), November 2007
diff --git a/doc/txt/tep119.txt b/doc/txt/tep119.txt index d1c7b7b4..ee203b4c 100644 --- a/doc/txt/tep119.txt +++ b/doc/txt/tep119.txt @@ -24,9 +24,9 @@ Abstract The memo documents the interfaces, components, and semantics used by collection protocol in TinyOS 2.x. Collection provides a best-effort, -multihop delivery of packets to the root of *a* tree. There may be -multiple roots in a network, and in this case the semantics implemented -are of *anycast* delivery to at least one of the roots. A node sending +multihop delivery of packets to the root of a tree. There may be +multiple tree roots in a network, and in this case the semantics +are *anycast* delivery to at least one of the roots. A node sending a packet does not specify which root the packet is destined to. @@ -74,42 +74,19 @@ family: * Self-interference, preventing forwarding packets along the route from introducing interference for subsequent packets. -The rest of this document describes a set of components and interfaces -for a collection service outlined above. +While collection protocols can take a wide range of approaches to +address these challenges, the programming interface they provide is +typically independent of these details. The rest of this document +describes a set of components and interfaces for collection services. 2. Collection interfaces ==================================================================== A node can perform four different roles in collection: producer, -consumer, snooper, and in-network processor. Depending on their role, +snooper, in-network processor, and consumer. Depending on their role, the nodes use different interfaces to interact with the collection component. -A consumer is a root of a tree. The set of all roots and the paths that -lead to them form the collection routing infrastructure in the network. -For any connected set of nodes implementing the collection protocol -there is only one collection infrastructure, *i.e.*, all roots in this -set active at the same time are part of the same infrastructure. - -A node is configured to become a root by using the RootControl -interface. RootControl.setRoot() MUST make the current node a root of -the collection infrastructure. RootControl.unsetRoot() MUST make -the current root no longer a root in the collection infrastructure. -Both calls are idempotent. RootControl.setRoot() MAY be called on a -node that is already a root, to no effect. RootControl.unsetRoot() MAY -be called on a node that is not a root:: - - interface RootControl { - command error_t setRoot(); - command error_t unsetRoot(); - command bool isRoot(); - } - -Both commands MUST return SUCCESS if the node is now in the specified -state, and FAIL otherwise. For example, if a node is already a root -and an application calls RootControl.setRoot(), the call will -return SUCCESS. - The collection infrastructure can be multiplexed among independent applications, by means of a *collection identifier*. It is important to note that the *data* traffic in the protocol is multiplexed, @@ -120,11 +97,6 @@ The producers use the Send interface [1_] to send data to the root of the collection tree. The collection identifier is specified as a parameter to Send during instantiation. -Root nodes that receive data from the network are *consumers*. The -consumers use the Receive interface [1_] to receive a message -delivered by collection. The collection identifier is specified -as a parameter to Receive during instantiation. - The nodes that overhear messages in transit are *snoopers*. The snoopers use the Receive interface [1_] to receive a snooped message. The collection identifier is specified as a parameter @@ -148,6 +120,32 @@ to inspect the internals of a packet and possibly suppress it if it is unnecessary or if its contents can be aggregated into an existing packet. +Root nodes that receive data from the network are *consumers*. The +consumers use the Receive interface [1_] to receive a message +delivered by collection. The collection identifier is specified +as a parameter to Receive during instantiation. + +The set of all roots and the paths that +lead to them form the collection routing infrastructure in the network. +For any connected set of nodes implementing the collection protocol +there is only one collection infrastructure, *i.e.*, all roots in this +set active at the same time are part of the same infrastructure. + +The RootControl interface configures whether a node is a +root:: + + interface RootControl { + command error_t setRoot(); + command error_t unsetRoot(); + command bool isRoot(); + } + +Both commands MUST return SUCCESS if the node is now in the specified +state, and FAIL otherwise. For example, if a node is already a root +and an application calls RootControl.setRoot(), the call will +return SUCCESS. If setRoot() returns SUCCESS, then a subsequent call +to isRoot() MUST return TRUE. If unsetRoot() returns SUCCESS, then +a subsequent call to isRoot() MUST return FALSE. 3 Collection Services ==================================================================== @@ -172,10 +170,10 @@ which has the following signature:: } -CollectionC MAY have additional interfaces, but they MUST have -default functions on all outgoing invocations (commands for uses, -events for provides) of those interfaces so that it can operate -properly if they are not wired. +CollectionC MAY have additional interfaces. These additional +interfaces MUST have default functions on all outgoing invocations +(commands for uses, events for provides) of those interfaces so that +it can operate properly if they are not wired. Components SHOULD NOT wire to CollectionC.Send. The generic component CollectionSenderC (described in section 3.1) provides @@ -189,7 +187,7 @@ top of active messages. All packets sent with a particular collection_id_t generally have the same payload format, so that snoopers, intercepters, and receivers can parse it properly. -Receive.receive MUST NOT be signaled on non-root +ColletionC MUST NOT signal Receive.receive on non-root nodes. CollectionC MAY signal Receive.receive on a root node when a data packet successfully arrives at that node. If a root node calls Send, CollectionC MUST treat it as it if were a received packet.