From 0650a014b5e5cb79a6587d6bc783f51e4def119e Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Sat, 31 Mar 2007 18:31:27 +0000 Subject: [PATCH] Documentation updates --- core/net/rime/abc.c | 13 +++--- core/net/rime/abc.h | 13 ++++-- core/net/rime/ctimer.c | 8 +++- core/net/rime/ctimer.h | 18 +++++++- core/net/rime/ibc.h | 9 +++- core/net/rime/mesh.h | 11 ++++- core/net/rime/mh.c | 10 ++++- core/net/rime/mh.h | 26 ++++++++++- core/net/rime/neighbor.c | 8 +++- core/net/rime/neighbor.h | 14 +++++- core/net/rime/nf.c | 8 +++- core/net/rime/nf.h | 21 ++++++++- core/net/rime/queuebuf.c | 21 ++++++++- core/net/rime/queuebuf.h | 4 +- core/net/rime/rime.c | 10 ++++- core/net/rime/rimeaddr.c | 10 ++++- core/net/rime/rimeaddr.h | 78 ++++++++++++++++++++++++++++++--- core/net/rime/rimebuf.c | 8 +++- core/net/rime/rimebuf.h | 16 ++++++- core/net/rime/route-discovery.c | 8 +++- core/net/rime/route-discovery.h | 21 ++++++++- core/net/rime/route.c | 10 ++++- core/net/rime/route.h | 17 ++++++- core/net/rime/rudolph0.c | 12 ++--- core/net/rime/rudolph0.h | 26 ++++++++++- core/net/rime/rudolph1.c | 8 +++- core/net/rime/rudolph1.h | 25 ++++++++++- core/net/rime/sabc.c | 8 +++- core/net/rime/sabc.h | 8 +++- core/net/rime/sibc.c | 8 +++- core/net/rime/sibc.h | 24 +++++++++- core/net/rime/suc.c | 27 +++++++++--- core/net/rime/suc.h | 23 +++++++++- core/net/rime/tree.h | 27 ++++++++++-- core/net/rime/trickle.c | 8 +++- core/net/rime/trickle.h | 21 ++++++++- core/net/rime/uabc.c | 8 +++- core/net/rime/uabc.h | 11 +++-- core/net/rime/uc.c | 10 ++++- core/net/rime/uc.h | 23 +++++++++- core/net/rime/uibc.h | 10 +++-- 41 files changed, 565 insertions(+), 84 deletions(-) diff --git a/core/net/rime/abc.c b/core/net/rime/abc.c index a7ef59885..b5733a93b 100644 --- a/core/net/rime/abc.c +++ b/core/net/rime/abc.c @@ -1,3 +1,9 @@ +/** + * \addtogroup rimeabc + * @{ + */ + + /* * Copyright (c) 2004, Swedish Institute of Computer Science. * All rights reserved. @@ -30,12 +36,7 @@ * * Author: Adam Dunkels * - * $Id: abc.c,v 1.11 2007/03/29 23:18:22 adamdunkels Exp $ - */ - -/** - * \addtogroup rimeabc - * @{ + * $Id: abc.c,v 1.12 2007/03/31 18:31:27 adamdunkels Exp $ */ /** diff --git a/core/net/rime/abc.h b/core/net/rime/abc.h index 951db442a..ef68de033 100644 --- a/core/net/rime/abc.h +++ b/core/net/rime/abc.h @@ -4,11 +4,16 @@ */ /** - * \defgroup rimeabc Anonymous best-effort local area broadcast (abc) + * \defgroup rimeabc Anonymous best-effort local area broadcast * @{ * - * The abc module sends packets to all local area neighbors without - * any extra headers that idendtify the sender or receiver. + * The abc module sends packets to all local area neighbors. The abc + * module adds no headers to outgoing packets. + * + * \section channels Channels + * + * The abc module uses 1 channel. + * */ /* @@ -41,7 +46,7 @@ * * This file is part of the Contiki operating system. * - * $Id: abc.h,v 1.10 2007/03/29 23:18:47 adamdunkels Exp $ + * $Id: abc.h,v 1.11 2007/03/31 18:31:27 adamdunkels Exp $ */ /** * \file diff --git a/core/net/rime/ctimer.c b/core/net/rime/ctimer.c index e2c032036..d3554e526 100644 --- a/core/net/rime/ctimer.c +++ b/core/net/rime/ctimer.c @@ -1,3 +1,8 @@ +/** + * \addtogroup ctimer + * @{ + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: ctimer.c,v 1.3 2007/03/29 23:18:22 adamdunkels Exp $ + * $Id: ctimer.c,v 1.4 2007/03/31 18:31:27 adamdunkels Exp $ */ /** @@ -120,3 +125,4 @@ ctimer_stop(struct ctimer *c) list_remove(ctimer_list, c); } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/ctimer.h b/core/net/rime/ctimer.h index 07843e057..fbbd4add9 100644 --- a/core/net/rime/ctimer.h +++ b/core/net/rime/ctimer.h @@ -1,3 +1,17 @@ +/** + * \addtogroup rime + * @{ + */ + +/** + * \defgroup ctimer Callback timer + * @{ + * + * The ctimer module provides a timer mechanism that calls a specified + * C function when a ctimer expires. + * + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +42,7 @@ * * This file is part of the Contiki operating system. * - * $Id: ctimer.h,v 1.2 2007/03/25 12:05:51 adamdunkels Exp $ + * $Id: ctimer.h,v 1.3 2007/03/31 18:31:27 adamdunkels Exp $ */ /** @@ -60,3 +74,5 @@ void ctimer_stop(struct ctimer *c); void ctimer_init(void); #endif /* __CTIMER_H__ */ +/** @} */ +/** @} */ diff --git a/core/net/rime/ibc.h b/core/net/rime/ibc.h index f26cf9166..ab2864cf4 100644 --- a/core/net/rime/ibc.h +++ b/core/net/rime/ibc.h @@ -4,11 +4,16 @@ */ /** - * \defgroup rimeibc Identified best-effort local area broadcast (ibc) + * \defgroup rimeibc Identified best-effort local area broadcast * @{ * * The ibc module sends packets to all local area neighbors with an a * header that identifies the sender. + * + * \section channels Channels + * + * The ibc module uses 1 channel. + * */ /* @@ -41,7 +46,7 @@ * * This file is part of the Contiki operating system. * - * $Id: ibc.h,v 1.7 2007/03/29 23:18:48 adamdunkels Exp $ + * $Id: ibc.h,v 1.8 2007/03/31 18:31:27 adamdunkels Exp $ */ /** diff --git a/core/net/rime/mesh.h b/core/net/rime/mesh.h index cff09e457..03645e07b 100644 --- a/core/net/rime/mesh.h +++ b/core/net/rime/mesh.h @@ -7,9 +7,16 @@ * \defgroup rimemesh Mesh routing * @{ * - * The abc module sends packets using multi-hop routing to a specified + * The mesh module sends packets using multi-hop routing to a specified * receiver somewhere in the network. * + * + * \section channels Channels + * + * The mesh module uses 3 channel; one for the multi-hop forwarding + * (\ref rimemh "mh") and two for the route disovery (\ref + * routediscovery "route-discovery"). + * */ /* @@ -42,7 +49,7 @@ * * This file is part of the Contiki operating system. * - * $Id: mesh.h,v 1.7 2007/03/29 23:18:48 adamdunkels Exp $ + * $Id: mesh.h,v 1.8 2007/03/31 18:31:27 adamdunkels Exp $ */ /** diff --git a/core/net/rime/mh.c b/core/net/rime/mh.c index f5a3bd78d..26d770a5c 100644 --- a/core/net/rime/mh.c +++ b/core/net/rime/mh.c @@ -1,3 +1,8 @@ +/** + * \addtogroup rimemh + * @{ + */ + /* * Copyright (c) 2007, Swedish Institute of Computer Science. * All rights reserved. @@ -28,12 +33,12 @@ * * This file is part of the Contiki operating system. * - * $Id: mh.c,v 1.2 2007/03/23 10:46:35 adamdunkels Exp $ + * $Id: mh.c,v 1.3 2007/03/31 18:31:28 adamdunkels Exp $ */ /** * \file - * A mesh routing protocol + * Multihop forwarding * \author * Adam Dunkels */ @@ -145,3 +150,4 @@ mh_send(struct mh_conn *c, rimeaddr_t *to) } } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/mh.h b/core/net/rime/mh.h index 30e424e3c..ba0fe537c 100644 --- a/core/net/rime/mh.h +++ b/core/net/rime/mh.h @@ -1,3 +1,23 @@ +/** + * \addtogroup rime + * @{ + */ + +/** + * \defgroup rimemh Best-effort multihop forwarding + * @{ + * + * The mh module implements a multihop forwarding mechanism. Routes + * must have already been setup with the route_add() function. Setting + * up routes is done with another Rime module such as the \ref + * routediscovery "route-discovery module". + * + * \section channels Channels + * + * The mh module uses 1 channel. + * + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,12 +48,12 @@ * * This file is part of the Contiki operating system. * - * $Id: mh.h,v 1.1 2007/03/22 17:33:15 adamdunkels Exp $ + * $Id: mh.h,v 1.2 2007/03/31 18:31:28 adamdunkels Exp $ */ /** * \file - * A brief description of what this file is. + * Multihop forwarding header file * \author * Adam Dunkels */ @@ -62,3 +82,5 @@ void mh_close(struct mh_conn *c); int mh_send(struct mh_conn *c, rimeaddr_t *to); #endif /* __MH_H__ */ +/** @} */ +/** @} */ diff --git a/core/net/rime/neighbor.c b/core/net/rime/neighbor.c index f6f1ff603..69eda1a76 100644 --- a/core/net/rime/neighbor.c +++ b/core/net/rime/neighbor.c @@ -1,3 +1,8 @@ +/** + * \addtogroup rimeneighbor + * @{ + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: neighbor.c,v 1.7 2007/03/25 12:06:28 adamdunkels Exp $ + * $Id: neighbor.c,v 1.8 2007/03/31 18:31:28 adamdunkels Exp $ */ /** @@ -221,3 +226,4 @@ neighbor_set_lifetime(int seconds) max_time = seconds; } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/neighbor.h b/core/net/rime/neighbor.h index d27379549..8dc90584e 100644 --- a/core/net/rime/neighbor.h +++ b/core/net/rime/neighbor.h @@ -1,3 +1,13 @@ +/** + * \addtogroup rime + * @{ + */ +/** + * \defgroup rimeneighbor Rime neighbor management + * @{ + * + * The neighbor module manages the neighbor table. + */ /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +38,7 @@ * * This file is part of the Contiki operating system. * - * $Id: neighbor.h,v 1.4 2007/03/25 12:06:28 adamdunkels Exp $ + * $Id: neighbor.h,v 1.5 2007/03/31 18:31:28 adamdunkels Exp $ */ /** @@ -64,3 +74,5 @@ void neighbor_set_lifetime(int seconds); #endif /* __NEIGHBOR_H__ */ +/** @} */ +/** @} */ diff --git a/core/net/rime/nf.c b/core/net/rime/nf.c index d544e2b66..ba41ce564 100644 --- a/core/net/rime/nf.c +++ b/core/net/rime/nf.c @@ -1,3 +1,8 @@ +/** + * \addtogroup rimenf + * @{ + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: nf.c,v 1.10 2007/03/25 12:06:28 adamdunkels Exp $ + * $Id: nf.c,v 1.11 2007/03/31 18:31:28 adamdunkels Exp $ */ /** @@ -201,3 +206,4 @@ nf_cancel(struct nf_conn *c) ctimer_stop(&c->t); } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/nf.h b/core/net/rime/nf.h index 332affca9..3628a4959 100644 --- a/core/net/rime/nf.h +++ b/core/net/rime/nf.h @@ -1,3 +1,20 @@ +/** + * \addtogroup rime + * @{ + */ + +/** + * \defgroup rimenf Best-effort network flooding + * @{ + * + * The nf module does best-effort flooding. + * + * \section channels Channels + * + * The nf module uses 1 channel. + * + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +45,7 @@ * * This file is part of the Contiki operating system. * - * $Id: nf.h,v 1.8 2007/03/25 12:06:28 adamdunkels Exp $ + * $Id: nf.h,v 1.9 2007/03/31 18:31:28 adamdunkels Exp $ */ /** @@ -72,3 +89,5 @@ void nf_close(struct nf_conn *c); int nf_send(struct nf_conn *c); #endif /* __SIBC_H__ */ +/** @} */ +/** @} */ diff --git a/core/net/rime/queuebuf.c b/core/net/rime/queuebuf.c index 7b61ebd06..273d5249b 100644 --- a/core/net/rime/queuebuf.c +++ b/core/net/rime/queuebuf.c @@ -1,3 +1,8 @@ +/** + * \addtogroup rimequeuebuf + * @{ + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: queuebuf.c,v 1.7 2007/03/29 23:18:48 adamdunkels Exp $ + * $Id: queuebuf.c,v 1.8 2007/03/31 18:31:28 adamdunkels Exp $ */ /** @@ -68,6 +73,15 @@ struct queuebuf_ref { MEMB(bufmem, struct queuebuf, QUEUEBUF_NUM); MEMB(refbufmem, struct queuebuf_ref, QUEUEBUF_REF_NUM); + +#define DEBUG 0 +#if DEBUG +#include +#define PRINTF(...) printf(__VA_ARGS__) +#else +#define PRINTF(...) +#endif + /*---------------------------------------------------------------------------*/ void queuebuf_init(void) @@ -88,12 +102,16 @@ queuebuf_new_from_rimebuf(void) rbuf->len = rimebuf_datalen(); rbuf->ref = rimebuf_reference_ptr(); rbuf->hdrlen = rimebuf_copyto_hdr(rbuf->hdr); + } else { + PRINTF("queuebuf_new_from_rimebuf: could not allocate a reference queuebuf\n"); } return (struct queuebuf *)rbuf; } else { buf = memb_alloc(&bufmem); if(buf != NULL) { buf->len = rimebuf_copyto(buf->data); + } else { + PRINTF("queuebuf_new_from_rimebuf: could not allocate a queuebuf\n"); } return buf; } @@ -145,3 +163,4 @@ queuebuf_datalen(struct queuebuf *b) return b->len; } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/queuebuf.h b/core/net/rime/queuebuf.h index 986f2386f..69b512fe5 100644 --- a/core/net/rime/queuebuf.h +++ b/core/net/rime/queuebuf.h @@ -7,7 +7,7 @@ * \defgroup rimequeuebuf Rime queue buffer management * @{ * - * The Rime queue buffer management handles buffers that are queued. + * The queuebuf module handles buffers that are queued. * */ @@ -41,7 +41,7 @@ * * This file is part of the Contiki operating system. * - * $Id: queuebuf.h,v 1.4 2007/03/29 23:18:48 adamdunkels Exp $ + * $Id: queuebuf.h,v 1.5 2007/03/31 18:31:28 adamdunkels Exp $ */ /** diff --git a/core/net/rime/rime.c b/core/net/rime/rime.c index 56c5d36ee..8bf8a41e7 100644 --- a/core/net/rime/rime.c +++ b/core/net/rime/rime.c @@ -1,3 +1,8 @@ +/** + * \addtogroup rime + * @{ + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,12 +33,12 @@ * * This file is part of the Contiki operating system. * - * $Id: rime.c,v 1.6 2007/03/22 23:57:19 adamdunkels Exp $ + * $Id: rime.c,v 1.7 2007/03/31 18:31:28 adamdunkels Exp $ */ /** * \file - * A brief description of what this file is. + * Rime initialization and common code * \author * Adam Dunkels */ @@ -55,3 +60,4 @@ rime_input(void) abc_input_packet(); } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/rimeaddr.c b/core/net/rime/rimeaddr.c index 19feffb9d..5e51116b4 100644 --- a/core/net/rime/rimeaddr.c +++ b/core/net/rime/rimeaddr.c @@ -1,3 +1,8 @@ +/** + * \addtogroup rimeaddr + * @{ + */ + /* * Copyright (c) 2007, Swedish Institute of Computer Science. * All rights reserved. @@ -28,12 +33,12 @@ * * This file is part of the Contiki operating system. * - * $Id: rimeaddr.c,v 1.4 2007/03/24 16:42:21 adamdunkels Exp $ + * $Id: rimeaddr.c,v 1.5 2007/03/31 18:31:28 adamdunkels Exp $ */ /** * \file - * A brief description of what this file is. + * Functions for manipulating Rime addresses * \author * Adam Dunkels */ @@ -62,3 +67,4 @@ rimeaddr_set_node_addr(rimeaddr_t *t) rimeaddr_copy(&rimeaddr_node_addr, t); } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/rimeaddr.h b/core/net/rime/rimeaddr.h index 38f17f7e5..454e627f8 100644 --- a/core/net/rime/rimeaddr.h +++ b/core/net/rime/rimeaddr.h @@ -1,3 +1,17 @@ +/** + * \addtogroup rime + * @{ + */ + +/** + * \defgroup rimeaddr Rime addresses + * @{ + * + * The rimeaddr module is an abstract repressentation of addresses in + * Rime. + * + */ + /* * Copyright (c) 2007, Swedish Institute of Computer Science. * All rights reserved. @@ -28,12 +42,12 @@ * * This file is part of the Contiki operating system. * - * $Id: rimeaddr.h,v 1.2 2007/03/21 23:22:11 adamdunkels Exp $ + * $Id: rimeaddr.h,v 1.3 2007/03/31 18:31:28 adamdunkels Exp $ */ /** * \file - * A brief description of what this file is. + * Header file for the Rime address repressentation * \author * Adam Dunkels */ @@ -46,12 +60,66 @@ typedef union { unsigned short u16[1]; } rimeaddr_t; -void rimeaddr_copy(rimeaddr_t *dest, const rimeaddr_t *from); -int rimeaddr_cmp(const rimeaddr_t *addr1, const rimeaddr_t *addr2); -void rimeaddr_set_node_addr(rimeaddr_t *t); +/** + * \brief Copy a Rime address + * \param dest The destination + * \param from The source + * + * This function copies a Rime address from one location + * to another. + * + */ +void rimeaddr_copy(rimeaddr_t *dest, const rimeaddr_t *from); + +/** + * \brief Compare two Rime addresses + * \param addr1 The first address + * \param addr2 The second address + * \return Non-zero if the addresses are the same, zero if they are different + * + * This function compares two Rime addresses and returns + * the result of the comparison. The function acts like + * the '==' operator and returns non-zero if the addresses + * are the same, and zero if the addresses are different. + * + */ +int rimeaddr_cmp(const rimeaddr_t *addr1, const rimeaddr_t *addr2); + + +/** + * \brief Set the address of the current node + * \param addr The address + * + * This function sets the Rime address of the node. + * + */ +void rimeaddr_set_node_addr(rimeaddr_t *addr); + +/** + * \brief The Rime address of the node + * + * This variable contains the Rime address of the + * node. This variable should not be changed directly; + * rather, the rimeaddr_set_node_addr() function should be + * used. + * + */ extern rimeaddr_t rimeaddr_node_addr; +/** + * \brief The null Rime address + * + * This variable contains the null Rime address. The null + * address is used in route tables to indicate that the + * table entry is unused. Nodes with no configured address + * has the null address. Nodes with their node address set + * to the null address will have problems communicating + * with other nodes. + * + */ extern const rimeaddr_t rimeaddr_null; #endif /* __RIMEADDR_H__ */ +/** @} */ +/** @} */ diff --git a/core/net/rime/rimebuf.c b/core/net/rime/rimebuf.c index c5ab86ecc..02ca972ad 100644 --- a/core/net/rime/rimebuf.c +++ b/core/net/rime/rimebuf.c @@ -1,3 +1,8 @@ +/** + * \addtogroup rimebuf + * @{ + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rimebuf.c,v 1.7 2007/03/29 23:18:22 adamdunkels Exp $ + * $Id: rimebuf.c,v 1.8 2007/03/31 18:31:28 adamdunkels Exp $ */ /** @@ -219,3 +224,4 @@ rimebuf_totlen(void) return rimebuf_hdrlen() + rimebuf_datalen(); } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/rimebuf.h b/core/net/rime/rimebuf.h index 6f8049446..ab5aad763 100644 --- a/core/net/rime/rimebuf.h +++ b/core/net/rime/rimebuf.h @@ -1,3 +1,15 @@ +/** + * \addtogroup rime + * @{ + */ + +/** + * \defgroup rimebuf Rime buffer management + * @{ + * + * The rimebuf module does Rime's buffer management. + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +40,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rimebuf.h,v 1.7 2007/03/29 22:22:20 adamdunkels Exp $ + * $Id: rimebuf.h,v 1.8 2007/03/31 18:31:28 adamdunkels Exp $ */ /** @@ -288,3 +300,5 @@ int rimebuf_hdrreduce(int size); #endif /* __RIMEBUF_H__ */ +/** @} */ +/** @} */ diff --git a/core/net/rime/route-discovery.c b/core/net/rime/route-discovery.c index c599f6bfc..7b8a306f6 100644 --- a/core/net/rime/route-discovery.c +++ b/core/net/rime/route-discovery.c @@ -1,3 +1,8 @@ +/** + * \addtogroup routediscovery + * @{ + */ + /* * Copyright (c) 2007, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: route-discovery.c,v 1.4 2007/03/29 22:22:44 adamdunkels Exp $ + * $Id: route-discovery.c,v 1.5 2007/03/31 18:31:28 adamdunkels Exp $ */ /** @@ -244,3 +249,4 @@ route_discovery_discover(struct route_discovery_conn *c, rimeaddr_t *addr, send_rreq(c, addr); } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/route-discovery.h b/core/net/rime/route-discovery.h index 476db093e..69abf8a0d 100644 --- a/core/net/rime/route-discovery.h +++ b/core/net/rime/route-discovery.h @@ -1,3 +1,20 @@ +/** + * \addtogroup rime + * @{ + */ + +/** + * \defgroup routediscovery Rime route discovery protocol + * @{ + * + * The route-discovery module does route discovery for Rime. + * + * \section channels Channels + * + * The ibc module uses 2 channels; one for the flooded route request + * packets and one for the unicast route replies. + * + */ /* * Copyright (c) 2007, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +45,7 @@ * * This file is part of the Contiki operating system. * - * $Id: route-discovery.h,v 1.2 2007/03/25 12:06:28 adamdunkels Exp $ + * $Id: route-discovery.h,v 1.3 2007/03/31 18:31:28 adamdunkels Exp $ */ /** @@ -72,3 +89,5 @@ void route_discovery_discover(struct route_discovery_conn *c, rimeaddr_t *dest, void route_discovery_close(struct route_discovery_conn *c); #endif /* __ROUTE_DISCOVERY_H__ */ +/** @} */ +/** @} */ diff --git a/core/net/rime/route.c b/core/net/rime/route.c index f7b651603..5422115a5 100644 --- a/core/net/rime/route.c +++ b/core/net/rime/route.c @@ -1,3 +1,8 @@ +/** + * \addtogroup rimeroute + * @{ + */ + /* * Copyright (c) 2007, Swedish Institute of Computer Science. * All rights reserved. @@ -28,12 +33,12 @@ * * This file is part of the Contiki operating system. * - * $Id: route.c,v 1.5 2007/03/25 12:03:59 adamdunkels Exp $ + * $Id: route.c,v 1.6 2007/03/31 18:31:28 adamdunkels Exp $ */ /** * \file - * Routing tables for the mesh routing protocol + * Rime route table * \author * Adam Dunkels */ @@ -163,3 +168,4 @@ route_set_lifetime(int seconds) max_time = seconds; } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/route.h b/core/net/rime/route.h index c0e62f572..ed7eba75b 100644 --- a/core/net/rime/route.h +++ b/core/net/rime/route.h @@ -1,3 +1,14 @@ +/** + * \addtogroup rime + * @{ + */ +/** + * \defgroup rimeroute Rime route table + * @{ + * + * The route module handles the route table in Rime. + */ + /* * Copyright (c) 2005, Swedish Institute of Computer Science. * All rights reserved. @@ -28,12 +39,12 @@ * * This file is part of the Contiki operating system. * - * $Id: route.h,v 1.4 2007/03/25 12:03:59 adamdunkels Exp $ + * $Id: route.h,v 1.5 2007/03/31 18:31:28 adamdunkels Exp $ */ /** * \file - * Routing tables for the micro implementation of the AODV ad hoc routing protocol + * Header file for the Rime route table * \author * Adam Dunkels */ @@ -62,3 +73,5 @@ void route_flush_all(void); void route_set_lifetime(int seconds); #endif /* __ROUTE_H__ */ +/** @} */ +/** @} */ diff --git a/core/net/rime/rudolph0.c b/core/net/rime/rudolph0.c index 986043a80..b45093a70 100644 --- a/core/net/rime/rudolph0.c +++ b/core/net/rime/rudolph0.c @@ -1,3 +1,8 @@ +/** + * \addtogroup rudolph0 + * @{ + */ + /* * Copyright (c) 2007, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rudolph0.c,v 1.2 2007/03/25 21:29:02 oliverschmidt Exp $ + * $Id: rudolph0.c,v 1.3 2007/03/31 18:31:28 adamdunkels Exp $ */ /** @@ -119,10 +124,6 @@ recv(struct sabc_conn *sabc) struct rudolph0_conn *c = (struct rudolph0_conn *)sabc; struct rudolph0_datapacket *p = rimebuf_dataptr(); - /* if(rand() & 1) { - return; - }*/ - if(p->h.type == TYPE_DATA) { if(c->current.h.version != p->h.version) { PRINTF("rudolph0 new version %d\n", p->h.version); @@ -229,3 +230,4 @@ rudolph0_set_version(struct rudolph0_conn *c, int version) c->current.h.version = version; } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/rudolph0.h b/core/net/rime/rudolph0.h index 2b7bc0b99..e769368c3 100644 --- a/core/net/rime/rudolph0.h +++ b/core/net/rime/rudolph0.h @@ -1,3 +1,22 @@ +/** + * \addtogroup rime + * @{ + */ + +/** + * \defgroup rudolph0 Single-hop reliable bulk data transfer + * @{ + * + * The rudolph0 module implements a single-hop reliable bulk data + * transfer mechanism. + * + * \section channels Channels + * + * The rudolph0 module uses 2 channels; one for data packets and one + * for NACK and repair packets. + * + */ + /* * Copyright (c) 2007, Swedish Institute of Computer Science. * All rights reserved. @@ -28,12 +47,12 @@ * * This file is part of the Contiki operating system. * - * $Id: rudolph0.h,v 1.1 2007/03/25 11:56:59 adamdunkels Exp $ + * $Id: rudolph0.h,v 1.2 2007/03/31 18:31:28 adamdunkels Exp $ */ /** * \file - * A brief description of what this file is. + * Header file for the single-hop reliable bulk data transfer module * \author * Adam Dunkels */ @@ -93,3 +112,6 @@ void rudolph0_set_version(struct rudolph0_conn *c, int version); int rudolph0_version(struct rudolph0_conn *c); #endif /* __RUDOLPH0_H__ */ +/** @} */ +/** @} */ + diff --git a/core/net/rime/rudolph1.c b/core/net/rime/rudolph1.c index 154aa6464..f0062d8e8 100644 --- a/core/net/rime/rudolph1.c +++ b/core/net/rime/rudolph1.c @@ -1,3 +1,8 @@ +/** + * \addtogroup rudolph1 + * @{ + */ + /* * Copyright (c) 2007, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: rudolph1.c,v 1.4 2007/03/28 19:52:27 adamdunkels Exp $ + * $Id: rudolph1.c,v 1.5 2007/03/31 18:31:28 adamdunkels Exp $ */ /** @@ -263,3 +268,4 @@ rudolph1_stop(struct rudolph1_conn *c) ctimer_stop(&c->t); } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/rudolph1.h b/core/net/rime/rudolph1.h index ac859247c..9c9001527 100644 --- a/core/net/rime/rudolph1.h +++ b/core/net/rime/rudolph1.h @@ -1,3 +1,22 @@ +/** + * \addtogroup rime + * @{ + */ + +/** + * \defgroup rudolph1 Multi-hop reliable bulk data transfer + * @{ + * + * The rudolph1 module implements a multi-hop reliable bulk data + * transfer mechanism. + * + * \section channels Channels + * + * The rudolph1 module uses 2 channels; one for data transmissions and + * one for NACKs and repair packets. + * + */ + /* * Copyright (c) 2007, Swedish Institute of Computer Science. * All rights reserved. @@ -28,12 +47,12 @@ * * This file is part of the Contiki operating system. * - * $Id: rudolph1.h,v 1.1 2007/03/25 11:58:09 adamdunkels Exp $ + * $Id: rudolph1.h,v 1.2 2007/03/31 18:31:28 adamdunkels Exp $ */ /** * \file - * A brief description of what this file is. + * Header file for the multi-hop reliable bulk data transfer mechanism * \author * Adam Dunkels */ @@ -79,3 +98,5 @@ void rudolph1_send(struct rudolph1_conn *c); void rudolph1_stop(struct rudolph1_conn *c); #endif /* __RUDOLPH1_H__ */ +/** @} */ +/** @} */ diff --git a/core/net/rime/sabc.c b/core/net/rime/sabc.c index a32283d5a..ee540da5e 100644 --- a/core/net/rime/sabc.c +++ b/core/net/rime/sabc.c @@ -1,3 +1,8 @@ +/** + * \addtogroup rimesabc + * @{ + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: sabc.c,v 1.6 2007/03/25 12:03:41 adamdunkels Exp $ + * $Id: sabc.c,v 1.7 2007/03/31 18:31:28 adamdunkels Exp $ */ /** @@ -113,3 +118,4 @@ sabc_cancel(struct sabc_conn *c) ctimer_stop(&c->t); } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/sabc.h b/core/net/rime/sabc.h index d86065594..724657b0f 100644 --- a/core/net/rime/sabc.h +++ b/core/net/rime/sabc.h @@ -4,7 +4,7 @@ */ /** - * \defgroup rimesabc Stubborn Anonymous best-effort local area BroadCast + * \defgroup rimesabc Stubborn anonymous best-effort local area broadcast * @{ * * The sabc module provides stubborn anonymous best-effort local area @@ -12,6 +12,10 @@ * either the mssage is canceled or a new message is sent. Messages * sent with the sabc module are not identified with a sender ID. * + * \section channels Channels + * + * The sabc module uses 1 channel. + * */ /* @@ -44,7 +48,7 @@ * * This file is part of the Contiki operating system. * - * $Id: sabc.h,v 1.6 2007/03/29 23:18:48 adamdunkels Exp $ + * $Id: sabc.h,v 1.7 2007/03/31 18:31:28 adamdunkels Exp $ */ /** diff --git a/core/net/rime/sibc.c b/core/net/rime/sibc.c index d3f818a98..22ba95abc 100644 --- a/core/net/rime/sibc.c +++ b/core/net/rime/sibc.c @@ -1,3 +1,8 @@ +/** + * \addtogroup rimesibc + * @{ + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: sibc.c,v 1.5 2007/03/19 22:10:17 adamdunkels Exp $ + * $Id: sibc.c,v 1.6 2007/03/31 18:31:28 adamdunkels Exp $ */ /** @@ -111,3 +116,4 @@ sibc_cancel(struct sibc_conn *c) ctimer_stop(&c->t); } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/sibc.h b/core/net/rime/sibc.h index de0116b10..ef76d71a4 100644 --- a/core/net/rime/sibc.h +++ b/core/net/rime/sibc.h @@ -1,3 +1,23 @@ +/** + * \addtogroup rime + * @{ + */ + +/** + * \defgroup rimesibc Stubborn identified broadcast + * @{ + * + * The sibc module provides stubborn identified best-effort local area + * broadcast. A message sent with the sibc module is repeated until + * either the mssage is canceled or a new message is sent. Messages + * sent with the sibc module are identified with a sender ID. + * + * \section channels Channels + * + * The sibc module uses 1 channel. + * + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +48,7 @@ * * This file is part of the Contiki operating system. * - * $Id: sibc.h,v 1.5 2007/03/19 22:10:17 adamdunkels Exp $ + * $Id: sibc.h,v 1.6 2007/03/31 18:31:29 adamdunkels Exp $ */ /** @@ -69,3 +89,5 @@ void sibc_cancel(struct sibc_conn *c); void sibc_set_timer(struct sibc_conn *c, clock_time_t t); #endif /* __SIBC_H__ */ +/** @} */ +/** @} */ diff --git a/core/net/rime/suc.c b/core/net/rime/suc.c index f4f9459f6..c8190fe13 100644 --- a/core/net/rime/suc.c +++ b/core/net/rime/suc.c @@ -1,3 +1,8 @@ +/** + * \addtogroup rimesuc + * @{ + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,12 +33,12 @@ * * This file is part of the Contiki operating system. * - * $Id: suc.c,v 1.8 2007/03/29 23:18:22 adamdunkels Exp $ + * $Id: suc.c,v 1.9 2007/03/31 18:31:29 adamdunkels Exp $ */ /** * \file - * A brief description of what this file is. + * Stubborn unicast * \author * Adam Dunkels */ @@ -55,8 +60,9 @@ static void recv_from_uc(struct uc_conn *uc, rimeaddr_t *from) { register struct suc_conn *c = (struct suc_conn *)uc; - PRINTF("%d: suc: recv_from_uc from %d %p\n", - rimeaddr_node_addr.u16, from->u16, c); + PRINTF("%d.%d: suc: recv_from_uc from %d.%d\n", + rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1], + from->u8[0], from->u8[1]); if(c->u->recv != NULL) { c->u->recv(c, from); } @@ -87,8 +93,9 @@ send(void *ptr) { struct suc_conn *c = ptr; - PRINTF("%d: suc: resend to %d\n", - rimeaddr_node_addr.u16, c->receiver.u16); + PRINTF("%d.%d: suc: resend to %d.%d\n", + rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1], + c->receiver.u8[0], c->receiver.u8[1]); queuebuf_to_rimebuf(c->buf); uc_send(&c->c, &c->receiver); suc_set_timer(c, CLOCK_SECOND); @@ -116,7 +123,9 @@ suc_send_stubborn(struct suc_conn *c, rimeaddr_t *receiver) rimeaddr_copy(&c->receiver, receiver); ctimer_set(&c->t, CLOCK_SECOND, send, c); - PRINTF("%d: suc_send_stubborn to %d\n", rimeaddr_node_addr.u16, c->receiver.u16); + PRINTF("%d.%d: suc_send_stubborn to %d.%d\n", + rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1], + c->receiver.u8[0],c->receiver.u8[1]); uc_send(&c->c, &c->receiver); if(c->u->sent != NULL) { c->u->sent(c); @@ -129,6 +138,9 @@ suc_send_stubborn(struct suc_conn *c, rimeaddr_t *receiver) int suc_send(struct suc_conn *c, rimeaddr_t *receiver) { + PRINTF("%d.%d: suc_send to %d.%d\n", + rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1], + receiver->u8[0], receiver->u8[1]); return uc_send(&c->c, receiver); } /*---------------------------------------------------------------------------*/ @@ -138,3 +150,4 @@ suc_cancel(struct suc_conn *c) ctimer_stop(&c->t); } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/suc.h b/core/net/rime/suc.h index ab85c2198..061f890ee 100644 --- a/core/net/rime/suc.h +++ b/core/net/rime/suc.h @@ -1,3 +1,20 @@ +/** + * \addtogroup rime + * @{ + */ + +/** + * \defgroup rimesuc Stubborn unicast + * @{ + * + * The suc module takes one packet and sends it repetedly. + * + * \section channels Channels + * + * The suc module uses 1 channel. + * + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,12 +45,12 @@ * * This file is part of the Contiki operating system. * - * $Id: suc.h,v 1.6 2007/03/20 12:27:32 adamdunkels Exp $ + * $Id: suc.h,v 1.7 2007/03/31 18:31:29 adamdunkels Exp $ */ /** * \file - * A brief description of what this file is. + * Stubborn unicast header file * \author * Adam Dunkels */ @@ -72,3 +89,5 @@ int suc_send(struct suc_conn *c, rimeaddr_t *receiver); void suc_set_timer(struct suc_conn *c, clock_time_t t); #endif /* __SUC_H__ */ +/** @} */ +/** @} */ diff --git a/core/net/rime/tree.h b/core/net/rime/tree.h index a37bfc76b..ca0155d57 100644 --- a/core/net/rime/tree.h +++ b/core/net/rime/tree.h @@ -1,3 +1,22 @@ +/** + * \addtogroup rime + * @{ + */ + +/** + * \defgroup rimetree Tree-based hop-by-hop reliable data collection + * @{ + * + * The tree module implements a hop-by-hop reliable data collection + * mechanism. + * + * \section channels Channels + * + * The tree module uses 2 channels; one for neighbor discovery and one + * for data packets. + * + */ + /* * Copyright (c) 2007, Swedish Institute of Computer Science. * All rights reserved. @@ -28,12 +47,12 @@ * * This file is part of the Contiki operating system. * - * $Id: tree.h,v 1.5 2007/03/25 12:06:39 adamdunkels Exp $ + * $Id: tree.h,v 1.6 2007/03/31 18:31:29 adamdunkels Exp $ */ /** * \file - * A brief description of what this file is. + * Header file for hop-by-hop reliable data collection * \author * Adam Dunkels */ @@ -46,7 +65,7 @@ struct tree_callbacks { void (* recv)(rimeaddr_t *originator, u8_t seqno, - u8_t hops, u8_t retransmissions); + u8_t hops); }; struct tree_conn { @@ -71,3 +90,5 @@ int tree_depth(struct tree_conn *c); #define TREE_MAX_DEPTH 63 #endif /* __TREE_H__ */ +/** @} */ +/** @} */ diff --git a/core/net/rime/trickle.c b/core/net/rime/trickle.c index 30be43f7c..e40319139 100644 --- a/core/net/rime/trickle.c +++ b/core/net/rime/trickle.c @@ -1,3 +1,8 @@ +/** + * \addtogroup trickle + * @{ + */ + /* * Copyright (c) 2007, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: trickle.c,v 1.3 2007/03/23 10:46:35 adamdunkels Exp $ + * $Id: trickle.c,v 1.4 2007/03/31 18:31:29 adamdunkels Exp $ */ /** @@ -192,3 +197,4 @@ trickle_send(struct trickle_conn *c, u8_t interval) reset_interval(c); } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/trickle.h b/core/net/rime/trickle.h index d0f7e66a4..ef1d3cf4f 100644 --- a/core/net/rime/trickle.h +++ b/core/net/rime/trickle.h @@ -1,3 +1,20 @@ +/** + * \addtogroup rime + * @{ + */ + +/** + * \defgroup trickle Reliable single-source multi-hop flooding + * @{ + * + * The trickle module sends a single packet to all nodes on the network. + * + * \section channels Channels + * + * The trickle module uses 1 channel. + * + */ + /* * Copyright (c) 2007, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +45,7 @@ * * This file is part of the Contiki operating system. * - * $Id: trickle.h,v 1.2 2007/03/21 23:23:02 adamdunkels Exp $ + * $Id: trickle.h,v 1.3 2007/03/31 18:31:29 adamdunkels Exp $ */ /** @@ -70,3 +87,5 @@ void trickle_close(struct trickle_conn *c); void trickle_send(struct trickle_conn *c, u8_t interval); #endif /* __TRICKLE_H__ */ +/** @} */ +/** @} */ diff --git a/core/net/rime/uabc.c b/core/net/rime/uabc.c index 36a2857da..2f5e68c0d 100644 --- a/core/net/rime/uabc.c +++ b/core/net/rime/uabc.c @@ -1,3 +1,8 @@ +/** + * \addtogroup rimeuabc + * @{ + */ + /* * Copyright (c) 2007, Swedish Institute of Computer Science. * All rights reserved. @@ -28,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: uabc.c,v 1.4 2007/03/25 21:44:23 adamdunkels Exp $ + * $Id: uabc.c,v 1.5 2007/03/31 18:31:29 adamdunkels Exp $ */ /** @@ -118,3 +123,4 @@ uabc_send(struct uabc_conn *c, clock_time_t interval) return 0; } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/uabc.h b/core/net/rime/uabc.h index 6285a4703..862af8b1e 100644 --- a/core/net/rime/uabc.h +++ b/core/net/rime/uabc.h @@ -4,10 +4,15 @@ */ /** - * \defgroup uabc Unique Anonymous best effort local area BroadCast + * \defgroup rimeuabc Unique anonymous best effort local area broadcast * @{ * - * Send one packet that is unique within a time interval. + * The uabc module sends one anonymous packet that is unique within a + * time interval. + * + * \section channels Channels + * + * The uabc module uses 1 channel. * */ @@ -41,7 +46,7 @@ * * This file is part of the Contiki operating system. * - * $Id: uabc.h,v 1.1 2007/03/20 11:59:55 adamdunkels Exp $ + * $Id: uabc.h,v 1.2 2007/03/31 18:31:29 adamdunkels Exp $ */ /** diff --git a/core/net/rime/uc.c b/core/net/rime/uc.c index c31fd226e..968e6e1e2 100644 --- a/core/net/rime/uc.c +++ b/core/net/rime/uc.c @@ -1,3 +1,8 @@ +/** + * \addtogroup rimeuc + * @{ + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,12 +33,12 @@ * * This file is part of the Contiki operating system. * - * $Id: uc.c,v 1.8 2007/03/29 23:18:22 adamdunkels Exp $ + * $Id: uc.c,v 1.9 2007/03/31 18:31:29 adamdunkels Exp $ */ /** * \file - * A brief description of what this file is. + * Single-hop unicast * \author * Adam Dunkels */ @@ -96,3 +101,4 @@ uc_send(struct uc_conn *c, rimeaddr_t *receiver) return 0; } /*---------------------------------------------------------------------------*/ +/** @} */ diff --git a/core/net/rime/uc.h b/core/net/rime/uc.h index 1d52338b4..832b570a4 100644 --- a/core/net/rime/uc.h +++ b/core/net/rime/uc.h @@ -1,3 +1,20 @@ +/** + * \addtogroup rime + * @{ + */ + +/** + * \defgroup rimeuc Single-hop unicast + * @{ + * + * The uc module sends a packet to a single receiver. + * + * \section channels Channels + * + * The uc module uses 1 channel. + * + */ + /* * Copyright (c) 2006, Swedish Institute of Computer Science. * All rights reserved. @@ -28,12 +45,12 @@ * * This file is part of the Contiki operating system. * - * $Id: uc.h,v 1.5 2007/03/19 22:10:17 adamdunkels Exp $ + * $Id: uc.h,v 1.6 2007/03/31 18:31:29 adamdunkels Exp $ */ /** * \file - * A brief description of what this file is. + * Header file for Rime's single-hop unicast * \author * Adam Dunkels */ @@ -61,3 +78,5 @@ void uc_close(struct uc_conn *c); int uc_send(struct uc_conn *c, rimeaddr_t *receiver); #endif /* __UC_H__ */ +/** @} */ +/** @} */ diff --git a/core/net/rime/uibc.h b/core/net/rime/uibc.h index 650580d0b..b07f8a8a7 100644 --- a/core/net/rime/uibc.h +++ b/core/net/rime/uibc.h @@ -4,10 +4,14 @@ */ /** - * \defgroup rimeuibc Unique Identified best effort local area Broadcast + * \defgroup rimeuibc Unique identified best effort local area broadcast * @{ * - * Send one packet that is unique within a time interval. + * The uibc module sends one packet that is unique within a time interval. + * + * \section channels Channels + * + * The uibc module uses 1 channel. * */ @@ -41,7 +45,7 @@ * * This file is part of the Contiki operating system. * - * $Id: uibc.h,v 1.3 2007/03/28 19:51:54 adamdunkels Exp $ + * $Id: uibc.h,v 1.4 2007/03/31 18:31:29 adamdunkels Exp $ */ /**