Up to 64 bit sized bit strings supported in C code generator #100
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #99
Bit strings have only been supported up to 32 bits before. This change provides support for 64 bits. Bit strings larger than 32 bits are encoded and decoded using a new dedicated function in the OER generator (decoder_read_long_uint, encoder_append_long_uint).
I chose to not reimplement the existing 32 bit based encoding and decoding functions for ints to avoid the generation of functions with 64 bits in cases where it is not required. Introducing the uint64_t type might be an issue for smaller sized embedded systems, it also comes at a performance cost in these systems. So the existing generated code is unchanged, only bit strings with more than 32 bits in length use these new functions.
In addition, I refactored the generators by moving the strings containing the generated C functions to dedicated modules to make the main generator code more clear.