Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider replacing config syntax with TOML #172

Open
chrismurf opened this issue Dec 18, 2020 · 0 comments
Open

Consider replacing config syntax with TOML #172

chrismurf opened this issue Dec 18, 2020 · 0 comments

Comments

@chrismurf
Copy link
Contributor

On a current program, we've been using TOML to configure multiple elements of the system from a single config file. TOML is nice because it looks a lot like the traditional "INI" file, but has some limited support for arrays, structs, and date/time types. That makes it a lot easier to represent some complex objects, like TDMA schedules.

We've been using TOML++, which has worked out well so far.

Example:

[database]
host = 'localhost'
port = 12345
name = 'db_name'
poll_period = 00:00:01.000

[node]
address = "192.168.1.1"
name = "Node"

[node.tdma]
lead_time = 00:00:01

[node.tdma.schedule]
length = 00:02:00
slots = [
  {offset = 00:00:00, queues = ["queue_a", "queue_b"]},
  {offset = 00:01:00, queues = ["queue_a"]}
]

I think we should consider moving Gravity to it. It would reduce the number of custom parts of Gravity, and I think it would largely support all the functionality we use today. The only obviously missing piece is the ability to do math in config files - I'm not sure how widely used that is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant