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

zcbor.py: Add basic support for .default in code generation. #467

Merged

Conversation

oyvindronningstad
Copy link
Collaborator

@oyvindronningstad oyvindronningstad commented Nov 7, 2024

Support for default values in INT, TSTR, BSTR, FLOAT, BOOL

Fixes #412

zcbor/zcbor.py Outdated Show resolved Hide resolved
tests/cases/corner_cases.cddl Show resolved Hide resolved
Copy link
Collaborator Author

@oyvindronningstad oyvindronningstad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @karstenkoenig, fixed your comments. I made some more changes as well, because the code was generating different types files for encode vs. decode, which is bad when generating both at the same time (they share the types file).

tests/cases/corner_cases.cddl Show resolved Hide resolved
@karstenkoenig karstenkoenig self-requested a review November 20, 2024 07:54
Support for default values in INT, TSTR, BSTR, FLOAT, BOOL

Signed-off-by: Øyvind Rønningstad <[email protected]>
@oyvindronningstad oyvindronningstad merged commit 00a0c1e into NordicSemiconductor:main Nov 21, 2024
19 checks passed
@oyvindronningstad oyvindronningstad deleted the cddl-.default branch November 21, 2024 09:54
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.

Decoder does not support "default"
2 participants