contiki/platform
Robert Quattlebaum 28a1e40ebd core/lib/settings: Generalized Settings Manager to work on any platform
This commit moves the Settings Manager from the AVR codebase
into the Contiki core library. Any platform that implements
the Contiki EEPROM API can now use the Settings Manager's
key-value store for storing their persistent configuration info.

The Settings Manager is a EEPROM-based key-value store. Keys
are 16-bit integers and values may be up to 16,383 bytes long.
It is intended to be used to store configuration-related information,
like network settings, radio channels, etc.

 * Robust data format which requires no initialization.
 * Supports multiple values with the same key.
 * Data can be appended without erasing EEPROM.
 * Max size of settings data can be easily increased in the future,
   as long as it doesn't overlap with application data.

The format was inspired by the [OLPC manufacturing data format][].

Since the beginning of EEPROM often contains application-specific
information, the best place to store settings is at the end of EEPROM
(the "top"). Because we are starting at the end of EEPROM, it makes
sense to grow the list of key-value pairs downward, toward the start of
EEPROM.

Each key-value pair is stored in memory in the following format:

Order    | Size     | Name         | Description
--------:|---------:|--------------|-------------------------------
       0 |        2 | `key`        | 16-bit key
      -2 |        1 | `size_check` | One's-complement of next byte
      -3 |   1 or 2 | `size`       | The size of `value`, in bytes
-4 or -5 | variable | `value`      | Value associated with `key`

The end of the key-value pairs is denoted by the first invalid entry.
An invalid entry has any of the following attributes:

 * The `size_check` byte doesn't match the one's compliment of the
   `size` byte (or `size_low` byte).
 * The key has a value of 0x0000.

[OLPC manufacturing data format]: http://wiki.laptop.org/go/Manufacturing_data
2013-03-20 11:57:13 -07:00
..
apple2enh Reorganized web page attribute data handling. 2013-03-06 16:29:36 +01:00
atari Reorganized web page attribute data handling. 2013-03-06 16:29:36 +01:00
avr-atmega128rfa1 Updated to the latest uip-ds6-route API 2012-11-27 23:04:34 +01:00
avr-raven core/lib/settings: Generalized Settings Manager to work on any platform 2013-03-20 11:57:13 -07:00
avr-ravenlcd Add polyphonic ringtones for received messages. 2010-12-20 20:03:56 +00:00
avr-ravenusb core/lib/settings: Generalized Settings Manager to work on any platform 2013-03-20 11:57:13 -07:00
avr-rcb Add clock_delay_us and clock_set_seconds to clock.h. Modify clock_wait to use clock_time_t. 2012-04-09 15:49:53 -04:00
avr-zigbit core/lib/settings: Generalized Settings Manager to work on any platform 2013-03-20 11:57:13 -07:00
c64 Reorganized web page attribute data handling. 2013-03-06 16:29:36 +01:00
c128 Reorganized web page attribute data handling. 2013-03-06 16:29:36 +01:00
cc2530dk Makefiles: Allow setting UIP_CONF_IPV6=0 to work as expected. 2013-01-14 22:03:42 -08:00
cooja Makefiles: Allow setting UIP_CONF_IPV6=0 to work as expected. 2013-01-14 22:03:42 -08:00
econotag Merge pull request #82 from darconeous/master 2013-03-10 12:51:03 -07:00
esb Cleanup of the node-id.h files. The node-id.h file contains 2012-11-20 19:59:46 +01:00
exp5438 Makefiles: Allow setting UIP_CONF_IPV6=0 to work as expected. 2013-01-14 22:03:42 -08:00
iris Makefiles: Allow setting UIP_CONF_IPV6=0 to work as expected. 2013-01-14 22:03:42 -08:00
jcreate Removed all old RCS tags in the Contiki source tree. Those RCS tags are not used any more, as we are now using git to manage the Contiki source tree 2012-10-26 15:54:49 +02:00
mb851 Cleanup and refactoring of the STM32w port 2013-03-18 13:31:26 +01:00
mbxxx Makefiles: Allow setting UIP_CONF_IPV6=0 to work as expected. 2013-01-14 22:03:42 -08:00
micaz Avoid multiple definitions of NETSTACK_CONF_MAC. Turn on RPL by default. 2012-11-21 20:11:22 +01:00
minimal-net Merge pull request #82 from darconeous/master 2013-03-10 12:51:03 -07:00
msb430 Cleanup of the node-id.h files. The node-id.h file contains 2012-11-20 19:59:46 +01:00
native native: Fix trailing whitespace 2013-03-19 20:00:26 +01:00
pc-6001 Removed web browser settings that aren't actually different from the defaults. 2013-03-06 15:17:39 +01:00
redbee-dev Makefiles: Allow setting UIP_CONF_IPV6=0 to work as expected. 2013-01-14 22:03:42 -08:00
redbee-econotag Makefiles: Allow setting UIP_CONF_IPV6=0 to work as expected. 2013-01-14 22:03:42 -08:00
seedeye Makefiles: Allow setting UIP_CONF_IPV6=0 to work as expected. 2013-01-14 22:03:42 -08:00
sensinode Makefiles: Allow setting UIP_CONF_IPV6=0 to work as expected. 2013-01-14 22:03:42 -08:00
sentilla-usb Removed all old RCS tags in the Contiki source tree. Those RCS tags are not used any more, as we are now using git to manage the Contiki source tree 2012-10-26 15:54:49 +02:00
sky Merge pull request #82 from darconeous/master 2013-03-10 12:51:03 -07:00
stepper-robot Simplified host OS platform detection in Makefiles 2012-02-25 10:09:33 -05:00
stk500 Removed all old RCS tags in the Contiki source tree. Those RCS tags are not used any more, as we are now using git to manage the Contiki source tree 2012-10-26 15:54:49 +02:00
stk501 Add clock_delay_us and clock_set_seconds to clock.h. Modify clock_wait to use clock_time_t. 2012-04-09 15:49:53 -04:00
stm32test Simplified host OS platform detection in Makefiles 2012-02-25 10:09:33 -05:00
win32 Added configurations of the new resolver. 2013-03-14 23:17:59 +01:00
wismote Makefiles: Allow setting UIP_CONF_IPV6=0 to work as expected. 2013-01-14 22:03:42 -08:00
z1 Merge pull request #82 from darconeous/master 2013-03-10 12:51:03 -07:00
z1sp Removed all old RCS tags in the Contiki source tree. Those RCS tags are not used any more, as we are now using git to manage the Contiki source tree 2012-10-26 15:54:49 +02:00