EVerest / cbexigen

cbExiGen - The V2GTP EXI codec generator for cbV2G
Apache License 2.0
32 stars 17 forks source link

Remove unused signature features #75

Open Mike-M0 opened 6 months ago

Mike-M0 commented 6 months ago

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

SiebrenW commented 6 months ago

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.