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
Approach to make named mode default #69
Labels
enhancement
New feature or request
Comments
@nielsvd Would you prefer that
|
I actually think both options would be fine. Perhaps 2, with a fall-back to 1 in case the explicit choice is missing (also for backwards compatibility)? |
norro
added a commit
that referenced
this issue
Jun 11, 2021
#69 Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com>
norro
added a commit
that referenced
this issue
Jun 11, 2021
Default mode can now be defined by * Naming a mode '__DEFAULT__' (backword compatible) * Specifying the parameter '__default' * Neither of these two, then te first mode of a part will be its default #69 Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com>
norro
added a commit
that referenced
this issue
Jun 17, 2021
* Now parsing default modes for all system parts first, including its custom name * Introduced new matching function that considers custom default mode names #69 Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com>
norro
added a commit
that referenced
this issue
Jul 21, 2021
Default mode can now be defined by * Naming a mode '__DEFAULT__' (backword compatibility) * Specifying the parameter '__default' * Neither of these two, then the first mode of a part will be its default #69 Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Assuming my current understanding of this package is sufficient. Let us say (for simplicity) we want to assign two modes to an
example_node
: modeA
and modeB
. In both modes, we would like to redefine a long list of parameters. The package needs a__DEFAULT__
mode to be defined that is actually named as such, assume that we choose modeA
to be default, the current working approaches that I found is to either:A
to__DEFAULT__
, meaning ourexample_node
has modes__DEFAULT__
andB
. Effective, but not very idiomatic.__DEFAULT__
mode, meaning ourexample_node
has modesA
,B
,__DEFAULT__
. To ensure thatA
and__DEFAULT__
are effectively the same, it is necessary to keep the parameters in their configuration are identical. Especially when there are many parameters this becomes tedious.I'm not sure how to do this most effectively. But it would be nice if we can define modes
A
andB
and choose the default in some other way, perhaps through another key in the yaml file (next totype
andmodes
)?The text was updated successfully, but these errors were encountered: