This is an initial commit of an implementation of the Chameleon

architecture for the Rime stack for Contiki. The Chameleon
architecture separates the header processing from the Rime protocol
logic. Instead of having each protocol create its own part of the
packet header, protocols use packet attributes. Before sending a
packet, a special Chameleon header processing module creates a packet
header from the packet attributes. The same Chameleon module parses
incoming packets and creates packet attributes from the header.

The details are in our SenSys 2007 paper:

Adam Dunkels, Fredrik Osterlind, 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

This is a rewrite of the code that was developed for the paper.
This commit is contained in:
adamdunkels 2008-02-25 02:14:34 +00:00
parent 39abed8672
commit 412facb831
29 changed files with 1357 additions and 159 deletions

View file

@ -46,7 +46,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: abc.h,v 1.13 2008/02/24 22:05:27 adamdunkels Exp $
* $Id: abc.h,v 1.14 2008/02/25 02:14:34 adamdunkels Exp $
*/
/**
* \file
@ -59,9 +59,12 @@
#define __ABC_H__
#include "net/rime/rimebuf.h"
#include "net/rime/channel.h"
struct abc_conn;
#define ABC_ATTRIBUTES
/**
* \brief Callback structure for abc
*
@ -71,17 +74,8 @@ struct abc_callbacks {
void (* recv)(struct abc_conn *ptr);
};
#ifdef CHAMELEON
#include "net/chameleon/chameleon.h"
#endif /* CHAMELEON */
struct abc_conn {
#ifdef CHAMELEON
struct chameleon_channel channel;
#else /* CHAMELEON */
struct abc_conn *next;
uint16_t channel;
#endif /* CHAMELEON */
struct channel channel;
const struct abc_callbacks *u;
};
@ -139,7 +133,8 @@ int abc_send(struct abc_conn *c);
* directly.
*
*/
void abc_input_packet(void);
void abc_input(struct channel *channel);
#endif /* __ABC_H__ */
/** @} */