Skip to content

EVerest/libiso15118

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2680665 · Mar 17, 2025

History

70 Commits
Nov 26, 2024
Feb 27, 2025
Mar 17, 2025
Apr 19, 2024
Mar 17, 2025
Mar 17, 2025
Oct 18, 2023
Mar 7, 2025
Mar 13, 2025
Oct 18, 2023
Mar 6, 2025
Oct 18, 2023
Feb 6, 2025

Repository files navigation

ISO 15118 library suite

This is a C++ library implementation of ISO 15118-20, ISO15118-2 and DIN70121. The implementation of ISO15118-20 is currently under heavy development. DIN70121 and ISO15118-2 will follow and are currently covered by the EvseV2G module of everest-core.

ISO 15118-20 Support

The following table shows the current support for the listed EVSE ISO15118-20 features.

Feature Supported
TCP, TLS 1.2 & 1.3 ✔️
DC, DC_BPT ✔️
AC, AC_BPT WIP
WPT
ACDP
ExternalPayment ✔️
Plug&Charge WIP
CertificateInstallation
Scheduled Mode ✔️
Dynamic Mode (+ MobilityNeedsMode) ✔️
Private Env
Pause/Resume & Standby WIP
Schedule Renegotation
Smart Charging
Multiplex messages
Internet Service
Parking Status Service

ISO 15118 Support

ISO15118 support is distributed accross multiple repositories and modules in EVerest. Please see the following references of other ISO15118 related development:

Dependencies

To build this library you need everest-cmake checkout in the same directory as libiso15118. If no everest-cmake is available, it is retrieved via FetchContent.

For Debian GNU/Linux 12 you will need the following dependencies:

sudo apt update
sudo apt install build-essential cmake libssl-dev

For Fedora 41+ you will need the following dependencies:

sudo dnf update
sudo dnf install gcc gcc-c++ git make cmake openssl-devel 

OpenSSL version 3.0 or above is required. The build system ninja is optional.

Getting started

# Run cmake (BUILD_TESTING to enable/disable unit tests)
cmake -S . -B build -G Ninja -DBUILD_TESTING=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

# Run cmake with disabled compiler warnings
cmake -S . -B build -G Ninja -DBUILD_TESTING=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DISO15118_COMPILE_OPTIONS_WARNING=""

# Build
ninja -C build

# Running tests
ninja -C build test

# Generating a code coverage (BUILD_TESTING should be enabled)
ninja -C build iso15118_gcovr_coverage

The coverage report will be available in the index.html file in the build/iso15118_gcovr_coverage directory.

Version 8.2 or higher of gcovr is required for the coverage report. Install gcovr release from PyPI:

pip install gcovr

GDB Debugging (VS Code)

Run the cmake (from the build dir) with the debug commands on:

cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON

Run the GDB debugger with the following configuration:

{
    "name": "(gdb) Launch LIBISO TESTS",
    "type": "cppdbg",
    "request": "launch",
    "program": "${workspaceFolder}/libiso15118/build/test/iso15118/fsm/test_d20_transitions",
    "args": [],
    "stopAtEntry": false,
    "cwd": "${workspaceFolder}/libiso15118/build/test/iso15118/fsm/",
    "environment": [],
    "externalConsole": false,
    "MIMode": "gdb",
    "setupCommands": [
        {
            "description": "Enable pretty-printing for gdb",
            "text": "-enable-pretty-printing",
            "ignoreFailures": true
        },
        {
            "description": "Set Disassembly Flavor to Intel",
            "text": "-gdb-set disassembly-flavor intel",
            "ignoreFailures": true
        }
    ]
},

Replace the program path to any test executable you are debugging.

Acknowledgment

This library has thankfully received support from the German Federal Ministry for Economic Affairs and Climate Action. Information on the corresponding research project can be found here (in German only): InterBDL research project.

Logo of funding by Federal Ministry of Economic Affairs and Climate Action