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

Improving enum documentation #319

Merged
merged 1 commit into from
Aug 24, 2021
Merged

Conversation

erikbosch
Copy link
Collaborator

Fixing two flaws in enum documentation

  1. Enums can (and are) also used for attributes, not only sensors and actuators
  2. Enums can be used for both strings and ints.
    Current example only showed int-example, while VSS so far just use
    strings.

Also moving down enum to after attributes

@erikbosch
Copy link
Collaborator Author

Discussed at meeting 2021-08-10. Remove old example with int, as we do not use int enums in VSS. To be further discussed in subsequent meetings

Fixing two flaws in enum documentation

1. Enums can (and are) also used for attributes, not only sensors and actuators
2. Enums can be used for both strings and ints.
   Current example only showed int-example, while VSS so far just use
   strings.

Also moving down enum to after attributes
@erikbosch
Copy link
Collaborator Author

In the meeting 2021-08-10 it was discussed if supporting integer-types with enums makes sense. We do not actively use it today in VSS, but I could see a possible use for it in some cases, like when representing OBD-signals where enums are defined by numbers rather than by name (like https://en.wikipedia.org/wiki/OBD-II_PIDs#Service_01_PID_1C). By specifying exactly which values that are allowed a VSS-server could theoretically log an error if someone reports the value 14 (reserved) for PID 1C. If we only specify datatype (uint8) or min/max (0-250) this will not be detected

@gunnarx gunnarx merged commit b42ee41 into COVESA:master Aug 24, 2021
@SebastianSchildt
Copy link
Collaborator

Meeting 08/28 merge this, and keep discussing the enum issue

@erikbosch erikbosch deleted the enum_improvements branch January 10, 2022 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants