You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by marko kiiskila <ma...@runtime.io> on 2016/01/04 19:58:14 UTC
subsystem configuration ideas
Hi,
so we need to have a way to set/read settings for subsystems.
These are the ones to be adjusted at runtime.
What I’m thinking is to build this in a way where names of
these are strings, and that you should be able to have hierarchical
naming. E.g. to have subsystem to be part of the name.
subsystem1/variable1 = value
subsystem1/variable2 = another_value
subsystem2/var1 = yet_another_value
I’d rather use strings as identifiers as opposed to say, enumerated
values, because it would be easier to keep them unique.
As for setting/reading them, I was going to start with a CLI interface.
And have interface from newtmgr as well.
Of course, we will need to persist configuration. So there’s few
options here. Either use lua scripts, which would be read at
bootup time and they can change these settings. And/or
a simpler script interface for cases when lua is not present.
Let me know if you have comments on this,
M
Re: subsystem configuration ideas
Posted by Sterling Hughes <st...@apache.org>.
I think lua for configuration would make sense, but I agree, a simpler
mechanism is also useful for more constrained systems. I think it
would make sense that lua have hooks into the simpler configuration
system, and then more complex functions can be directly exposed by
lua. Lua can supersede the simpler config if present.
On Mon, Jan 4, 2016 at 11:48 PM, will sanfilippo <wi...@runtime.io> wrote:
> I am fine with the naming and the interface and all that. Not so sure about lua for config though. Seems like a heavyweight thing for config so I am glad you are considering something simpler :-)
>
> Will
>
>> On Jan 4, 2016, at 10:58 AM, marko kiiskila <ma...@runtime.io> wrote:
>>
>> Hi,
>>
>> so we need to have a way to set/read settings for subsystems.
>> These are the ones to be adjusted at runtime.
>>
>> What I’m thinking is to build this in a way where names of
>> these are strings, and that you should be able to have hierarchical
>> naming. E.g. to have subsystem to be part of the name.
>>
>> subsystem1/variable1 = value
>> subsystem1/variable2 = another_value
>> subsystem2/var1 = yet_another_value
>>
>> I’d rather use strings as identifiers as opposed to say, enumerated
>> values, because it would be easier to keep them unique.
>>
>> As for setting/reading them, I was going to start with a CLI interface.
>> And have interface from newtmgr as well.
>>
>> Of course, we will need to persist configuration. So there’s few
>> options here. Either use lua scripts, which would be read at
>> bootup time and they can change these settings. And/or
>> a simpler script interface for cases when lua is not present.
>>
>> Let me know if you have comments on this,
>> M
>>
>>
>
Re: subsystem configuration ideas
Posted by will sanfilippo <wi...@runtime.io>.
I am fine with the naming and the interface and all that. Not so sure about lua for config though. Seems like a heavyweight thing for config so I am glad you are considering something simpler :-)
Will
> On Jan 4, 2016, at 10:58 AM, marko kiiskila <ma...@runtime.io> wrote:
>
> Hi,
>
> so we need to have a way to set/read settings for subsystems.
> These are the ones to be adjusted at runtime.
>
> What I’m thinking is to build this in a way where names of
> these are strings, and that you should be able to have hierarchical
> naming. E.g. to have subsystem to be part of the name.
>
> subsystem1/variable1 = value
> subsystem1/variable2 = another_value
> subsystem2/var1 = yet_another_value
>
> I’d rather use strings as identifiers as opposed to say, enumerated
> values, because it would be easier to keep them unique.
>
> As for setting/reading them, I was going to start with a CLI interface.
> And have interface from newtmgr as well.
>
> Of course, we will need to persist configuration. So there’s few
> options here. Either use lua scripts, which would be read at
> bootup time and they can change these settings. And/or
> a simpler script interface for cases when lua is not present.
>
> Let me know if you have comments on this,
> M
>
>