contiki/examples
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
..
antelope Include string.h 2012-06-27 15:44:53 +02:00
cc2530dk cc2530 udp server example is no longer RPL root by default 2013-01-09 22:46:20 +00:00
collect 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
email 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
er-rest-example Fixed legacy CoAP versions. 2013-02-13 19:22:21 +01:00
esb 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
example-shell 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
ftp Reduced program size. 2013-02-14 15:57:20 +01:00
hello-world 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
ipso-ipv6-raven removed execute flag of source files (avoids diff problems with egit) 2011-03-01 18:16:42 +01:00
ipv6 core/net/resolv: IPv6 and mDNS ("Bonjour") support. Major refactor. 2013-03-10 11:40:08 -07:00
irc 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
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 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
multi-threading 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
netperf 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
new-ipv6
ping-ipv6
powertrace 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
ravenusbstick Converted u8_t to uint8_t and u16_t to uint16_t in the examples directory. 2012-02-21 08:33:25 -05:00
rest-example Converted u8_t to uint8_t and u16_t to uint16_t in the examples directory. 2012-02-21 08:33:25 -05:00
rime Cleanup of the node-id.h files. The node-id.h file contains 2012-11-20 19:59:46 +01:00
sensinode Code style fixes: sensinode examples 2012-12-16 19:28:56 +00:00
servreg-hack 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
settings-example core/lib/settings: Generalized Settings Manager to work on any platform 2013-03-20 11:57:13 -07:00
sky Cleanup of the node-id.h files. The node-id.h file contains 2012-11-20 19:59:46 +01:00
sky-ip 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-shell 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-shell-exec 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-shell-webserver core/net/resolv: IPv6 and mDNS ("Bonjour") support. Major refactor. 2013-03-10 11:40:08 -07:00
telnet-server 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
test-ipv6 core/net/uip: Rename uip_ethaddr to uip_lladdr. 2013-03-10 11:39:11 -07:00
udp-ipv6 core/net/resolv: Misc. updates and cleanups. 2013-03-14 19:14:32 -07:00
udp-stream Cleanup of the node-id.h files. The node-id.h file contains 2012-11-20 19:59:46 +01:00
webbrowser The recent cc65 snapshot yields somewhat small programs so we can move back to the MTU size used before. 2013-02-14 15:45:33 +01:00
webserver Updated Contiki URL in sample web page. 2013-02-03 10:57:48 +01:00
webserver-ipv6 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
webserver-ipv6-raven 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
wget core/net/resolv: IPv6 and mDNS ("Bonjour") support. Major refactor. 2013-03-10 11:40:08 -07:00
z1 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
z1sp Cleaned up some files, moved z1-websense example 2011-03-16 17:41:03 +01:00