Adam Hunt <[email protected]> writes:

> house-temp-sensor.ini

Human-readable config files are great for systems you log in to.

Pekka Nikander has shown how to do this for very constrained devices:
Just link in the config data, in binary (i.e., directly usable) form.
This requires a couple more lines in the Makefile, but much less Flash
for not-so-useful initialization code on the device.

If it needs to be a separate data item, use a format that you also use
for communication, so you need only one parser on the device.  That
might be JSON for the larger (JSON+HTTP+TCP) nodes, or CBOR for the
smaller ones (CBOR+CoAP+UDP).  Neither is really that great for
hand-editing (e.g., JSON doesn't have comments), so thats still a couple
of lines in the Makefile.  The source for the config can then be
anything you have a Ruby/Python/Perl script for, even TOML.

Gruesse, Carsten
_______________________________________________
devel mailing list
[email protected]
http://lists.riot-os.org/mailman/listinfo/devel

Reply via email to