You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We propose replacing the Java-based EXIficient EXI codec in PyEvJosev with a native C shared library (libcbv2g_json_wrapper) that wraps the existing libcbv2g with a JSON-based API, callable from Python via ctypes.
This RFC is opened to get maintainer feedback on the approach before submitting all protocol converters.
The current EV-side simulation stack (PyEvJosev) depends on a closed-source Java JAR (ExiCodec.jar, based on Exificient) for EXI encoding/decoding of ISO 15118 messages. This creates several issues:
The EVSE (charger) side is already Java-free — EvseV2G (C/libcbv2g) handles ISO 15118-2/DIN, and Evse15118D20 (C++/libiso15118) handles ISO 15118-20. The Java dependency is isolated to the EV simulation side.
Proposed Solution
A native C shared library (libcbv2g_json_wrapper.so) that:
Wraps libcbv2g's EXI encode/decode functions with a JSON-based API (using cJSON)
Is callable from Python via ctypes as a drop-in replacement for ExificientEXICodec
Supports all protocols: AppHandshake (SAP), DIN 70121, ISO 15118-2, ISO 15118-20 (AC, DC, WPT, ACDP, CommonMessages)
Works with both system-installed libcbv2g (Yocto) and source-tree builds
Is Apache-2.0 licensed, compatible with all EVerest dependencies
EVerest maintainer @SebaLukas discussed this exact approach in EVerest#118 — using cbexigen-generated C code with cJSON — but it was never implemented for the Python/Josev side.
Upstream Plan
We have a working implementation (~9,365 lines) split into 5 manageable PRs:
Is this approach welcome? We understand the long-term plan is a full C++ EV simulator in libiso15118 (libiso15118#125). This is intended as a bridge solution that can be used today while the C++ simulator is being developed.
Repo placement: Should this live in ext-switchev-iso15118 (current target), a separate repo (e.g., cbv2g-json-wrapper), or be integrated into libcbv2g itself?
cJSON bundling: We bundle cJSON 1.7.19 (MIT) in third_party/. Would you prefer it as an external dependency or a git submodule instead?
Summary
We propose replacing the Java-based EXIficient EXI codec in PyEvJosev with a native C shared library (
libcbv2g_json_wrapper) that wraps the existing libcbv2g with a JSON-based API, callable from Python via ctypes.This RFC is opened to get maintainer feedback on the approach before submitting all protocol converters.
Developed by the Enteligent Team.
Problem
The current EV-side simulation stack (PyEvJosev) depends on a closed-source Java JAR (
ExiCodec.jar, based on Exificient) for EXI encoding/decoding of ISO 15118 messages. This creates several issues:The EVSE (charger) side is already Java-free — EvseV2G (C/libcbv2g) handles ISO 15118-2/DIN, and Evse15118D20 (C++/libiso15118) handles ISO 15118-20. The Java dependency is isolated to the EV simulation side.
Proposed Solution
A native C shared library (
libcbv2g_json_wrapper.so) that:ExificientEXICodecArchitecture
What Exists Upstream Today — Nothing Equivalent
We surveyed all EVerest repositories and the broader ecosystem:
EVerest maintainer @SebaLukas discussed this exact approach in EVerest#118 — using cbexigen-generated C code with cJSON — but it was never implemented for the Python/Josev side.
Upstream Plan
We have a working implementation (~9,365 lines) split into 5 manageable PRs:
Questions for Maintainers
Is this approach welcome? We understand the long-term plan is a full C++ EV simulator in libiso15118 (libiso15118#125). This is intended as a bridge solution that can be used today while the C++ simulator is being developed.
Repo placement: Should this live in
ext-switchev-iso15118(current target), a separate repo (e.g.,cbv2g-json-wrapper), or be integrated intolibcbv2gitself?cJSON bundling: We bundle cJSON 1.7.19 (MIT) in
third_party/. Would you prefer it as an external dependency or a git submodule instead?Any API design feedback? PR Added support for externally provided certificate paths in libiso libiso15118#57 establishes the public API surface — we'd appreciate early review before adding all protocol converters.
Licensing
All dependencies are free and compatible:
References