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

ENUM conventions: Allow exceptions for "technical enums" #68

Closed
RIFJo opened this issue Mar 8, 2023 · 1 comment
Closed

ENUM conventions: Allow exceptions for "technical enums" #68

RIFJo opened this issue Mar 8, 2023 · 1 comment
Labels
feature request Proposals which enhance the interface or add additional features.

Comments

@RIFJo
Copy link

RIFJo commented Mar 8, 2023

The enum naming conventions have rules for required fields.

"The first enum field shall always use the suffix UNKNOWN. The second enum field shall always use the suffix OTHER."

This requirement, especially the presence of the "UNKNOWN" field is not useful for some enums with technical context - there are cases where it is correct to have a clearly defined default value, using the suffix "DEFAULT = 0" as first entry.

discussions here
and here

We (the sensor modelling discussion group) suggest to rewrite the requirements to allow exceptions - for example

  • when a widely accepted default value exists
  • having "UNKNOWN" is harmful
  • the enum is "complete" and no value for "OTHER" is going to be needed
@RIFJo RIFJo added the feature request Proposals which enhance the interface or add additional features. label Mar 8, 2023
RIFJo added a commit to RIFJo/open-simulation-interface that referenced this issue Mar 8, 2023
After discussion in the sensors modelling group, we concluded that UNKNOWN should not be used here, and DEFAULT should be the first field.
Also: shorten the lines again, restore old documentation comments

see also discussion on the enum guidelines: OpenSimulationInterface/osi-documentation#68

Signed-off-by: RIFJo <jochmann@rt.rif-ev.de>
pmai pushed a commit to RIFJo/open-simulation-interface that referenced this issue Apr 16, 2023
After discussion in the sensors modelling group, we concluded that UNKNOWN should not be used here, and DEFAULT should be the first field.
Also: shorten the lines again, restore old documentation comments

see also discussion on the enum guidelines: OpenSimulationInterface/osi-documentation#68

Signed-off-by: RIFJo <jochmann@rt.rif-ev.de>
@pmai
Copy link
Contributor

pmai commented Apr 5, 2024

Closed by #72.

@pmai pmai closed this as completed Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Proposals which enhance the interface or add additional features.
Projects
None yet
Development

No branches or pull requests

2 participants