Skip to content

ISO 15118-20 Amd1 AC-DER (DIS) and potentially AC-DER-IEC/SAE (FDIS) support#127

Draft
milindur wants to merge 7 commits intoEVerest:mainfrom
milindur:feature/ac-der-iec-support
Draft

ISO 15118-20 Amd1 AC-DER (DIS) and potentially AC-DER-IEC/SAE (FDIS) support#127
milindur wants to merge 7 commits intoEVerest:mainfrom
milindur:feature/ac-der-iec-support

Conversation

@milindur
Copy link
Copy Markdown

@milindur milindur commented Mar 31, 2026

Describe your changes

This PR adds support for the ISO 15118-20 Amd1 schema for the new DER service(s):

  • AC-DER (DIS version of Amd1)
  • AC-DER-IEC/SAE (FDIS version of Amd1)

AC-DER was tested with a few pcap files using AC-DER communication (based on the DIS version), but all of them used the same EVSE-side stack and the same EV emulation. Therefore, more tests with additional pcap files would be very welcome.

AC-DER-IEC/SAE is currently untested. The code compiles, but at the moment I do not have access to any AC-DER-IEC/SAE pcap files. Hopefully, this will change in summer, at least for IEC.

I also prepared another feature branch (see https://github.com/milindur/cbexigen/tree/feature/xml-serializer-support-for-decoder) that adds optional XML serialization to the generated decoder. The API is compatible with https://github.com/dspace-group/dsV2Gshark. A modified version of dsV2Gshark with AC-DER/AC-DER-IEC support is also available (see https://github.com/milindur/dsV2Gshark/tree/feature/ac-der-iec-support).

The (manual) tests were performed using the dsV2Gshark plugin mentioned above, as well as a Python-based EXI decoder. This decoder uses the generated EXI C decoder to decode the V2GTP messages in a pcap file, extract the XML from the decoder, and optionally convert it to JSON and print it. It has not yet been pushed to GitHub.

I will do more testing as soon as I get access to more AC-DER or AC-DER-IEC EXI streams.

Issue ticket number and link

Fixes #106.
Fixes #123.
Prepares dspace-group/dsV2Gshark#44.

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

Replace _target_dict with maps access for xmlschema 4.3.1 compat.
Fix particle dedup in empty content scan to match by name instead
of object identity. Fix off-by-one in generator loops and add
bounds guard in particle deletion.

Signed-off-by: Christian Andersen <[email protected]>
@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Mar 31, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 31 complexity . 0 duplication

Metric Results
Complexity 31
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@milindur milindur force-pushed the feature/ac-der-iec-support branch 2 times, most recently from 00efaf5 to 3e143a3 Compare March 31, 2026 23:38
milindur added 5 commits April 1, 2026 01:43
…oup types

Guard namespace particle replacement to only apply for empty/abstract
container types per EXI 8.5.4.1.3.2 (concrete types build grammars from
their own content model). Collect all derived types for substitution
group expansion per EXI 8.5.4.1.6 (set S must include all reachable
element declarations, not just the first).

Signed-off-by: Christian Andersen <[email protected]>
…nment

Their grammar productions come from the substitution group closure
(EXI 8.5.4.1.6), not from namespace imports.

Signed-off-by: Christian Andersen <[email protected]>
Sort replacement particles by (name, namespace) instead of name only.
Populate namespace on all particle factories and newly created
replacement particles so the sort key is consistent.

Signed-off-by: Christian Andersen <[email protected]>
@milindur milindur force-pushed the feature/ac-der-iec-support branch from 3e143a3 to a85cf3e Compare March 31, 2026 23:43
@SebaLukas
Copy link
Copy Markdown
Member

Very nice 👍
I'll definitely take a look here, since I've already tried to generate the AC DER: https://github.com/EVerest/cbexigen/tree/feat/adding-ac-der-support. But it only worked with a hack (see my comment in #106)
The lack of AC DER IEC/SAE streams is really a shame. I really need some to test cbexigen/libcbv2g, too 😅

@milindur
Copy link
Copy Markdown
Author

milindur commented Apr 4, 2026

The lack of AC DER IEC/SAE streams is really a shame. I really need some to test cbexigen/libcbv2g, too 😅

Hopefully, I’ll have access to some AC-DER-IEC streams in May.

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.

Future approach: Updating xmlschema ISO 15118-20 Ed. 1 Amd 1 (AC-DER) fails to create code

3 participants