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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
Support for default values in INT, TSTR, BSTR, FLOAT, BOOL

Signed-off-by: Øyvind Rønningstad <[email protected]>
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
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