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

Remove unused signature features #75

Open
Mike-M0 opened this issue Mar 14, 2024 · 2 comments
Open

Remove unused signature features #75

Mike-M0 opened this issue Mar 14, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Mike-M0
Copy link

Mike-M0 commented Mar 14, 2024

Describe the problem

For embedded usages of the generated exi code, it would be nice, if some large unused types of XML signature could be excluded from generated exiDocument structure. Especially those which are mentioned as "shall not be used" in e.g. ISO15118-2 standard:
image
This would free a lot of currently reserved RAM of the exi structure.

Describe your solution

Add a list to config like iso2_fragments, where also xmlsig functions can be filtered. Those structures can be generated, but should not be added to exiDocument and xmlsigFragment struct.
If any of those types appear while encode/decode anyway, an error should be thrown.

Additional context

No response

@Mike-M0 Mike-M0 added the enhancement New feature or request label Mar 14, 2024
@SiebrenW
Copy link
Contributor

This is already done for the parameters too to limit the length of the array (though this is also done because of limitations in the generator itself)
A configuration could solve this (i.e. next to the iso2_array_optimizations you'd have the iso2_field_optimizations with an array of field names you don't want in the structs or the en/decoders of these specific fields.
Other fragments of the xmldsig schema can be left out like this too to keep the code size down.

But to me the generator itself by default should focus on creating the "correct" EXI en/decoding and only as an extension of the configuration should it leave out fields that are actually in there.

xmldsig was a mistake.

Mike-M0 pushed a commit to Mike-M0/cbexigen that referenced this issue Jun 26, 2024
- only create xmldsig framgnets which are listed (like other fragments)
- remove unused fields for optimization (per default remove "shall not be used" from standard)
removed elements are not in structure and will result in en/decoder error NOT_IMPLEMENTED when "isUsed" flag is set.
Mike-M0 pushed a commit to Mike-M0/cbexigen that referenced this issue Jun 27, 2024
- only create xmldsig framgnets which are listed (like other fragments)
- remove unused fields for optimization (per default remove "shall not be used" from standard)
removed elements are not in structure and will result in en/decoder error NOT_IMPLEMENTED when "isUsed" flag is set.

Signed-off-by: Michael Mezger <[email protected]>
barsnick pushed a commit that referenced this issue Dec 5, 2024
- only create xmldsig framgnets which are listed (like other fragments)
- remove unused fields for optimization (per default remove "shall not be used" from standard)
removed elements are not in structure and will result in en/decoder error NOT_IMPLEMENTED when "isUsed" flag is set.

Signed-off-by: Michael Mezger <[email protected]>
@barsnick
Copy link
Contributor

barsnick commented Dec 5, 2024

I have created a branch rebased on recent main, and with a modification to apply the optimizations from PR #79 to all protocols. (Should be disabled by default though, i.e config commented out. Fragment coding still needs to be fixed as well.):

https://github.com/EVerest/cbexigen/tree/feature/Mike-M0-remove-unused-fragments-PR-79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants