I'm with David, having a config file for each app would make life so much
easier down the road. I'd especially like to a see a quasi-standards based
format used. I'd suggest TOML <https://github.com/toml-lang/toml> which is
essentially a formalized INI type config. While I haven't personally used
it I know that there's an open source C implementation called libtoml
<https://github.com/ajwans/libtoml> that might be worth looking at.

On Fri Nov 07 2014 at 2:37:40 PM David Lyon <[email protected]> wrote:

> On 2014-11-08 00:17, Martin wrote:
> > Hi all,
> >
> > I'm working on a FIB for RIOT, and have thought about providing a
> > centralized managed generic address representation.
> ..
>
> > I made a prototype implementation that shows a possibility for a
> > generic address use.
> > The specific files for the generic address can be found in [1] and [2].
>
> Seem to be heading in the right direction.
>
> I'd only make one [positive] suggestion. In this day and age, it's
> too-late to be embedding all constants in the source code. I realise
> this is how software is often taught. The end result/implication is that
> network addresses will go in code, and to change them will imply a
> edit/build/deploy step.
>
> What I'd like to suggest is putting a configuration file with every
> Riot-Application. Then have the network addressses stored in that. If
> you think about any IoT application, transmitting temperature, etc,
> destination and node addresses shouldn't need to be hardcoded.
>
> For example:
>
> project: house-temp-sensor (a directory)
>
> Files:
>           house-temp-sensor.ini
>           house-temp-sensor.cpp
>           Makefile
>
> --house-temp-sensor.ini---------------------------------------
>
> [Node]
> name=garden-birdpond
>
> [Access-Point]
> name=MYDSP-AP
>
> --------------------------------------------------------------
>
> What I think is really needed is when you start up your program, the
> network stack can read the configuration file and configure the network
> interface for you.
>
> If you wish to have 20x sensors, after the program is written, just
> change the configuration data for each.
>
> There's definitely some small and lightweight configuration libraries
> for embedded devices - so implementation shouldn't be a big issue.
>
> Regards
>
> David
>
> _______________________________________________
> devel mailing list
> [email protected]
> http://lists.riot-os.org/mailman/listinfo/devel
>
_______________________________________________
devel mailing list
[email protected]
http://lists.riot-os.org/mailman/listinfo/devel

Reply via email to