Skip to content

Fix duplicated abstract choice extensions (CLReqControlMode/CLResControlMode)#89

Merged
barsnick merged 3 commits intomainfrom
bugfix/duplicated_abstract_extension_GitHub_issue_52
Nov 20, 2024
Merged

Fix duplicated abstract choice extensions (CLReqControlMode/CLResControlMode)#89
barsnick merged 3 commits intomainfrom
bugfix/duplicated_abstract_extension_GitHub_issue_52

Conversation

@barsnick
Copy link
Contributor

Describe your changes

The code to expand abstract choices ("abstract sequences") with all extended and substituted types incorrectly added an additional grammar, instead of expanding existing ones.

This fixes that issue by checking for existing particle choices which contain the expanded particle, and replacing that choice, instead of always adding it.

This should fix encoding and decoding of ISO 15118-20 ChargeLoop messages, notably the CLReqControlMode and CLResControlMode elements.

Issue ticket number and link

#52
#71

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

Signed-off-by: Moritz Barsnick <moritz.barsnick@chargebyte.com>
Signed-off-by: Moritz Barsnick <moritz.barsnick@chargebyte.com>
Copy link
Member

@SebaLukas SebaLukas left a comment

Choose a reason for hiding this comment

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

It looks good to me!
I will test this in the next few days with libcbv2g and EVerest SIL.

@SebaLukas
Copy link
Member

A signed-off-by is missing in the last commit message. Thats the reason why the DCO job is failing

When expanding "abstract sequences" (actually choices implied by abstraction
and derivation), the new choice list was accidentally added, even if one
already existed, instead of expanding the existing one(s). That led to
additional, incorrect grammars.

This fixes that by checking for existing known choice lists and expanding them
with the missing members, if necessary.

Fixes #52
Fixes #71

Signed-off-by: Moritz Barsnick <moritz.barsnick@chargebyte.com>
@barsnick barsnick force-pushed the bugfix/duplicated_abstract_extension_GitHub_issue_52 branch from 5a9d1a6 to 69204d1 Compare November 19, 2024 08:32
@barsnick
Copy link
Contributor Author

A signed-off-by is missing in the last commit message. Thats the reason why the DCO job is failing

Woah, thanks! I have no idea how that could happen.

In #52, the submitter also kindly confirmed the fix, and I also did a manual test (as well as our usual local regression tests).

@barsnick barsnick requested a review from SebaLukas November 19, 2024 08:34
Copy link
Member

@SebaLukas SebaLukas left a comment

Choose a reason for hiding this comment

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

👍 tested with libcbv2g (unit tests)

@barsnick barsnick merged commit 00f3968 into main Nov 20, 2024
@barsnick barsnick deleted the bugfix/duplicated_abstract_extension_GitHub_issue_52 branch December 3, 2024 09:23
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.

3 participants