Architecture

The heaven attained Oneness and became clear. 
The earth attained Oneness and became settled. 
The spirit attained Oneness and became numinous. 
Valleys attained Oneness and became reproductive. 
All things attained Oneness and became alive.

--- Tao Teh Ching, Lao Tzu

Introduction:

Layered Routing Architecture:

A component handles events (e.g., Packet_Received, Packet_Sent, Clock_Tick) and executes commands (e.g., Send_Packet). By default events are passed up and commands are passed down the layers. However, one can stop the flow by setting variable pass to 0 (false) for a command or event.

The minimum configuration of layers for Rmase includes the MAC layer, a routing layer, and the application layer, with the MAC layer at the bottom and the application layer at the top. The application layer is for generating the application scenarios and commands Send_Packet, the routing layer will forward packets received for other nodes or passes the received packet up if it is the destination of that packet, and the MAC layer will actually send the packet out. A packet shall arrive at the application layer if and only if the node is a destination. The MAC layer simulates the TinyOS MAC layer functionality (i.e., GenericComm). A packet can be sent to the next hop address (data.address = nodeID) or broadcast (data.address = 0). One can also set the communication mode to promiscuous, so that all neighbors can hear a packet, even if the packet is sent to the next hop node. The MAC layer also simulates energy consumption with a parameterized energy consumption model for transmitting, receiving, and idling states. A node can also switch between sleep and idle states and no energy is consumed in sleep state.

The statistics layer is added on top of the application layer for collecting routing statistics (e.g., the total number of sent packets, the total number of received packets, the time delays of received packets, etc.), for calculating the performance metrics described in the Rmase models.

Furthermore, one can have a set of control layers between the routing layer and the application layer, and a set of support layers between the MAC layer and the routing layer. The control layers are for network initialization or maintenance, e.g., building and maintaining a routing table or a spanning tree. The support layers are for adding features such as transmitting and receiving queues, data aggregation/fragmentation, neighborhood management, confirming/delaying transmissions, and checking duplications, etc. It is the algorithm designer's choice to put individual functions at different layers so that common functions can be shared by different algorithms.

Routing Data Structure:
 

Rmase defines a set of data fields for packets, however, not all the fields need to be presented for all packets.

Name

Definition

Examples

source

source ID where the data is generated; it is used for reply, or to distinguish different messages when multiple sources exist

data.source = 10

address

address of next hop; if address is 0 it means broadcast, i.e., everyone in the neighborhood receives, otherwise only the neighbor with the address receives the message; it is used at MAC layer to decide it is passing the packet up or not

data.address = 8

maxhops

the maximum hops left to travel, set by the source initially and decreased at each hop; it is used for bounded broadcast

data.maxhops = 5

from

ID of previous hop, attached at the neighborhood layer before transmit, used for neighbor management

data.from=7

msgID

msgID is given by application at the source node; typically different msgIDs are for different destinations or different types of data

data.msgID = 0

seqID

seqID is given at the application layer or generated at the support layers, to distinguish different packets of the same destination; for a given source and msgID, seqID is continuous. This is also used for detecting lost packets and duplicates

data.seqID = 2

forward

indicating if the data is received from other nodes or generated at this node; routing may have different policies for forwarding and for sending

data.forward=1

It is received from other nodes

duplicated

indicating if the packet was received more than once

data.duplicated = 1

It has been received before

delayTime specifying the time of transmission delay, normally set at the routing layer and used at the delay of transmission layer data.delayTime = 10

startTime

the time that the packet is sent from the source node; it is used for obtaining time delay

data.startTime=10

Some of the fields,  e.g., forward or duplicated, are not sent out with the packets; they are flags to mark the type of packets, which can be used by upper layers. For example, at the routing layer, duplicated packets may not be forwarded again or forwarded with lower priority. For another example, transmission delay may be added to forwarding packets but not to original packets.

Common Routing Components:


 
Zhang Ying (yzhang@parc.com)