Contiki 2.5
Modules | Files | Functions
The Rime communication stack

The Rime communication stack provides a set of lightweight communication primitives ranging from best-effort anonymous local area broadcast to reliable network flooding. More...

Modules

 Rime buffer management
 The packetbuf module does Rime's buffer management.
 
 Packet queue
 The packetqueue module handles a list of queued packets.
 
 Rime queue buffer management
 The queuebuf module handles buffers that are queued.
 
 Anonymous best-effort local area broadcast
 The abc module sends packets to all local area neighbors.
 
 Announcements
 The Announcement primitive does local area announcements.
 
 Rimebroadcastannouncement
 The broadcast announcement module implements a periodic explicit announcement.
 
 Best-effort local area broadcast
 The broadcast module sends packets to all local area neighbors with an a header that identifies the sender.
 
 Link estimate management
 The link estimate module is used for computing estimations of link quality.
 
 Collect neighbor management
 The neighbor module manages the neighbor table that is used by the Collect module.
 
 Tree-based hop-by-hop reliable data collection
 The collect module implements a hop-by-hop reliable data collection mechanism.
 
 Ipolite best effort local broadcast
 The ipolite module sends one local area broadcast packet within one time interval.
 
 Mesh routing
 The mesh module sends packets using multi-hop routing to a specified receiver somewhere in the network.
 
 Best-effort multihop forwarding
 The multihop module implements a multihop forwarding mechanism.
 
 Neighbor discovery
 The neighbor-discovery module implements a periodic neighbor discovery mechanism.
 
 Best-effort network flooding
 The netflood module does best-effort flooding.
 
 Rimepoliteannouncement
 The polite announcement module implements a periodic explicit announcement.
 
 Polite anonymous best effort local broadcast
 The polite module sends one local area broadcast packet within one time interval.
 
 Rime addresses
 The rimeaddr module is an abstract representation of addresses in Rime.
 
 Rime route discovery protocol
 The route-discovery module does route discovery for Rime.
 
 Rime route table
 The route module handles the route table in Rime.
 
 Single-hop reliable bulk data transfer
 The rudolph0 module implements a single-hop reliable bulk data transfer mechanism.
 
 Multi-hop reliable bulk data transfer
 The rudolph1 module implements a multi-hop reliable bulk data transfer mechanism.
 
 Single-hop reliable unicast
 The reliable single-hop unicast primitive (runicast) reliably sends a packet to a single-hop neighbor.
 
 Stubborn best-effort local area broadcast
 The stbroadcast module provides stubborn anonymous best-effort local area broadcast.
 
 Stubborn unicast
 The stubborn single-hop unicast primitive (stunicast) repeatedly sends a packet to a single-hop neighbor using the unicast primitive.
 
 Reliable single-source multi-hop flooding
 The trickle module sends a single packet to all nodes on the network.
 
 Single-hop unicast
 The unicast module sends a packet to an identified single-hop neighbor.
 

Files

file  rime.h
 
    Header file for the Rime stack

 
file  collect-link-estimate.h
 
    Header file for the Collect link estimate

 
file  rime.c
 
    Rime initialization and common code

 

Functions

int rime_init (void)
 Initialize Rime. More...
 
void rime_input (void)
 Send an incoming packet to Rime. More...
 
void collect_link_estimate_new (struct collect_link_estimate *le)
 Initialize a new link estimate. More...
 
void collect_link_estimate_update_tx (struct collect_link_estimate *le, uint8_t num_tx)
 Update a link estimate when a packet has been sent. More...
 
void collect_link_estimate_update_tx_fail (struct collect_link_estimate *le, uint8_t num_tx)
 Update a link estimate when a packet has failed to be sent. More...
 
void collect_link_estimate_update_rx (struct collect_link_estimate *le)
 Update a link estimate when a packet has been received. More...
 
uint16_t collect_link_estimate (struct collect_link_estimate *le)
 Compute the link estimate metric for a link estimate. More...
 

Detailed Description

The Rime communication stack provides a set of lightweight communication primitives ranging from best-effort anonymous local area broadcast to reliable network flooding.

The protocols in the Rime stack are arranged in a layered fashion, where the more complex protocols are implemented using the less complex protocols.

We have chosen the communication primitives in the Rime stack based on what typical sensor network protocols use. Applications or protocols running on top of the Rime stack attach at any layer of the stack and use any of the communication primitives.

The Rime stack supports both single-hop and multi-hop communication primitives. The multi-hop primitives do not specify how packets are routed through the network. Instead, as the packet is sent across the network, the application or upper layer protocol is invoked at every node to choose the next-hop neighbor. This makes it possible to implement arbitrary routing protocols on top of the multi-hop primitives.

Protocols or applications running on top of the Rime stack can implement additional protocols that are not in the Rime stack. If a protocol or application running on top of the Rime stack would need a communication primitive that is not currently in the Rime stack, the application or protocol can implement it directly on top of other communication primitive in the stack.

For more information, see:

Adam Dunkels, Fredrik Österlind, and Zhitao He. An adaptive communication architecture for wireless sensor networks. In Proceedings of the Fifth ACM Conference on Networked Embedded Sensor Systems (SenSys 2007), Sydney, Australia, November 2007.

http://www.sics.se/~adam/dunkels07adaptive.pdf http://www.sics.se/~adam/slides/dunkels07adaptive.ppt

Function Documentation

uint16_t collect_link_estimate ( struct collect_link_estimate *  le)

Compute the link estimate metric for a link estimate.

Parameters
leA pointer to a link estimate structure
Returns
The current link estimate metric

Definition at line 109 of file collect-link-estimate.c.

void collect_link_estimate_new ( struct collect_link_estimate le)

Initialize a new link estimate.

Parameters
leA pointer to a link estimate structure
        This function initializes a link estimate.

Definition at line 64 of file collect-link-estimate.c.

void collect_link_estimate_update_rx ( struct collect_link_estimate le)

Update a link estimate when a packet has been received.

Parameters
leA pointer to a link estimate structure
        This function updates a link estimate. This function is
        called when a packet has been received. The function
        uses information from the packet buffer and its
        attributes.

Definition at line 103 of file collect-link-estimate.c.

void collect_link_estimate_update_tx ( struct collect_link_estimate le,
uint8_t  num_tx 
)

Update a link estimate when a packet has been sent.

Parameters
leA pointer to a link estimate structure
num_txThe number of times the packet was transmitted before it was ACKed
        This function updates a link estimate. This function is
        called when a packet has been sent. The function may
        use information from the packet buffer and the packet
        buffer attributes when computing the link estimate.

Definition at line 71 of file collect-link-estimate.c.

References NULL.

Referenced by collect_link_estimate_update_tx_fail().

void collect_link_estimate_update_tx_fail ( struct collect_link_estimate le,
uint8_t  num_tx 
)

Update a link estimate when a packet has failed to be sent.

Parameters
leA pointer to a link estimate structure
num_txThe number of times the packet was transmitted before it was given up on.
        This function updates a link estimate. This function is
        called when a packet has been sent. The function may
        use information from the packet buffer and the packet
        buffer attributes when computing the link estimate.

Definition at line 96 of file collect-link-estimate.c.

References collect_link_estimate_update_tx().

int rime_init ( void  )

Initialize Rime.

This function should be called from the system boot up code to initialize Rime.

Referenced by main().

void rime_input ( void  )

Send an incoming packet to Rime.

This function should be called by the network driver to hand over a packet to Rime for further processing. The packet should be placed in the packetbuf (with packetbuf_copyfrom()) before calling this function.