Skip to content

Commit

Permalink
Renamed ocpp_ext + ocpp_extension to only extension
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Lukas <[email protected]>
  • Loading branch information
SebaLukas committed Jan 28, 2025
1 parent a9f270d commit 9633c97
Show file tree
Hide file tree
Showing 30 changed files with 85 additions and 88 deletions.
8 changes: 4 additions & 4 deletions config/config-sil-dc-isomux-tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ active_modules:
iso20:
- module_id: iso15118_20
implementation_id: charger
ext_ocpp2:
ext2:
- module_id: iso15118_2
implementation_id: extensions_ocpp
ext_ocpp20:
implementation_id: extensions
ext20:
- module_id: iso15118_20
implementation_id: extensions_ocpp
implementation_id: extensions
iso15118_car:
module: PyEvJosev
config_module:
Expand Down
8 changes: 4 additions & 4 deletions config/config-sil-dc-isomux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ active_modules:
iso20:
- module_id: iso15118_20
implementation_id: charger
ext_ocpp2:
ext2:
- module_id: iso15118_2
implementation_id: extensions_ocpp
ext_ocpp20:
implementation_id: extensions
ext20:
- module_id: iso15118_20
implementation_id: extensions_ocpp
implementation_id: extensions
iso15118_car:
module: PyEvJosev
config_module:
Expand Down
2 changes: 1 addition & 1 deletion config/config-sil-ocpp-pnc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ active_modules:
implementation_id: external_limits
extensions_15118:
- module_id: iso15118_charger
implementation_id: extensions_ocpp
implementation_id: extensions
evse_security:
module: EvseSecurity
config_module:
Expand Down
2 changes: 1 addition & 1 deletion config/config-sil-ocpp201-pnc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ active_modules:
implementation_id: reservation
extensions_15118:
- module_id: iso15118_charger
implementation_id: extensions_ocpp
implementation_id: extensions
evse_security:
module: EvseSecurity
config_module:
Expand Down
2 changes: 1 addition & 1 deletion modules/Evse15118D20/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ target_link_libraries(${MODULE_NAME}
target_sources(${MODULE_NAME}
PRIVATE
"charger/ISO15118_chargerImpl.cpp"
"extensions_ocpp/iso15118_extensionsImpl.cpp"
"extensions/iso15118_extensionsImpl.cpp"
)

# ev@c55432ab-152c-45a9-9d2e-7281d50c69c3:v1
Expand Down
4 changes: 2 additions & 2 deletions modules/Evse15118D20/Evse15118D20.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ namespace module {

void Evse15118D20::init() {
invoke_init(*p_charger);
invoke_init(*p_extensions_ocpp);
invoke_init(*p_extensions);
}

void Evse15118D20::ready() {
invoke_ready(*p_charger);
invoke_ready(*p_extensions_ocpp);
invoke_ready(*p_extensions);
}

} // namespace module
9 changes: 3 additions & 6 deletions modules/Evse15118D20/Evse15118D20.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,11 @@ class Evse15118D20 : public Everest::ModuleBase {
public:
Evse15118D20() = delete;
Evse15118D20(const ModuleInfo& info, std::unique_ptr<ISO15118_chargerImplBase> p_charger,
std::unique_ptr<iso15118_extensionsImplBase> p_extensions_ocpp, Conf& config) :
ModuleBase(info),
p_charger(std::move(p_charger)),
p_extensions_ocpp(std::move(p_extensions_ocpp)),
config(config){};
std::unique_ptr<iso15118_extensionsImplBase> p_extensions, Conf& config) :
ModuleBase(info), p_charger(std::move(p_charger)), p_extensions(std::move(p_extensions)), config(config){};

const std::unique_ptr<ISO15118_chargerImplBase> p_charger;
const std::unique_ptr<iso15118_extensionsImplBase> p_extensions_ocpp;
const std::unique_ptr<iso15118_extensionsImplBase> p_extensions;
const Conf& config;

// ev@1fce4c5e-0ab8-41bb-90f7-14277703d2ac:v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "iso15118_extensionsImpl.hpp"

namespace module {
namespace extensions_ocpp {
namespace extensions {

void iso15118_extensionsImpl::init() {
}
Expand All @@ -17,5 +17,5 @@ void iso15118_extensionsImpl::handle_set_get_certificate_response(
// your code for cmd set_get_certificate_response goes here
}

} // namespace extensions_ocpp
} // namespace extensions
} // namespace module
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Pionix GmbH and Contributors to EVerest
#ifndef EXTENSIONS_OCPP_ISO15118_EXTENSIONS_IMPL_HPP
#define EXTENSIONS_OCPP_ISO15118_EXTENSIONS_IMPL_HPP
#ifndef extensions_ISO15118_EXTENSIONS_IMPL_HPP
#define extensions_ISO15118_EXTENSIONS_IMPL_HPP

//
// AUTO GENERATED - MARKED REGIONS WILL BE KEPT
Expand All @@ -17,15 +17,15 @@
// ev@75ac1216-19eb-4182-a85c-820f1fc2c091:v1

namespace module {
namespace extensions_ocpp {
namespace extensions {

struct Conf {};

class iso15118_extensionsImpl : public iso15118_extensionsImplBase {
public:
iso15118_extensionsImpl() = delete;
iso15118_extensionsImpl(Everest::ModuleAdapter* ev, const Everest::PtrContainer<Evse15118D20>& mod, Conf& config) :
iso15118_extensionsImplBase(ev, "extensions_ocpp"), mod(mod), config(config){};
iso15118_extensionsImplBase(ev, "extensions"), mod(mod), config(config){};

// ev@8ea32d28-373f-4c90-ae5e-b4fcc74e2a61:v1
// insert your public definitions here
Expand Down Expand Up @@ -56,7 +56,7 @@ class iso15118_extensionsImpl : public iso15118_extensionsImplBase {
// insert other definitions here
// ev@3d7da0ad-02c2-493d-9920-0bbbd56b9876:v1

} // namespace extensions_ocpp
} // namespace extensions
} // namespace module

#endif // EXTENSIONS_OCPP_ISO15118_EXTENSIONS_IMPL_HPP
#endif // extensions_ISO15118_EXTENSIONS_IMPL_HPP
2 changes: 1 addition & 1 deletion modules/Evse15118D20/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ provides:
interface: ISO15118_charger
description: >-
This interface provides limited access to iso15118-20
extensions_ocpp:
extensions:
interface: iso15118_extensions
description: >-
This interface is used to share data between ISO15118 and OCPP modules
Expand Down
2 changes: 1 addition & 1 deletion modules/EvseV2G/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ endif()
target_sources(${MODULE_NAME}
PRIVATE
"charger/ISO15118_chargerImpl.cpp"
"extensions_ocpp/iso15118_extensionsImpl.cpp"
"extensions/iso15118_extensionsImpl.cpp"
)

# ev@c55432ab-152c-45a9-9d2e-7281d50c69c3:v1
Expand Down
6 changes: 3 additions & 3 deletions modules/EvseV2G/EvseV2G.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace module {

void EvseV2G::init() {
/* create v2g context */
v2g_ctx = v2g_ctx_create(&(*p_charger), &(*p_extensions_ocpp), &(*r_security));
v2g_ctx = v2g_ctx_create(&(*p_charger), &(*p_extensions), &(*r_security));

if (v2g_ctx == nullptr)
return;
Expand All @@ -49,7 +49,7 @@ void EvseV2G::init() {
#endif // EVEREST_MBED_TLS

invoke_init(*p_charger);
invoke_init(*p_extensions_ocpp);
invoke_init(*p_extensions);
}

void EvseV2G::ready() {
Expand Down Expand Up @@ -80,7 +80,7 @@ void EvseV2G::ready() {
}

invoke_ready(*p_charger);
invoke_ready(*p_extensions_ocpp);
invoke_ready(*p_extensions);

rv = sdp_listen(v2g_ctx);

Expand Down
8 changes: 4 additions & 4 deletions modules/EvseV2G/EvseV2G.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ class EvseV2G : public Everest::ModuleBase {
EvseV2G() = delete;
EvseV2G(const ModuleInfo& info, Everest::MqttProvider& mqtt_provider,
std::unique_ptr<ISO15118_chargerImplBase> p_charger,
std::unique_ptr<iso15118_extensionsImplBase> p_extensions_ocpp,
std::unique_ptr<evse_securityIntf> r_security, Conf& config) :
std::unique_ptr<iso15118_extensionsImplBase> p_extensions, std::unique_ptr<evse_securityIntf> r_security,
Conf& config) :
ModuleBase(info),
mqtt(mqtt_provider),
p_charger(std::move(p_charger)),
p_extensions_ocpp(std::move(p_extensions_ocpp)),
p_extensions(std::move(p_extensions)),
r_security(std::move(r_security)),
config(config){};

Everest::MqttProvider& mqtt;
const std::unique_ptr<ISO15118_chargerImplBase> p_charger;
const std::unique_ptr<iso15118_extensionsImplBase> p_extensions_ocpp;
const std::unique_ptr<iso15118_extensionsImplBase> p_extensions;
const std::unique_ptr<evse_securityIntf> r_security;
const Conf& config;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "v2g_ctx.hpp"

namespace module {
namespace extensions_ocpp {
namespace extensions {

void iso15118_extensionsImpl::init() {
if (!v2g_ctx) {
Expand All @@ -30,5 +30,5 @@ void iso15118_extensionsImpl::handle_set_get_certificate_response(
pthread_mutex_unlock(&v2g_ctx->mqtt_lock);
}

} // namespace extensions_ocpp
} // namespace extensions
} // namespace module
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Pionix GmbH and Contributors to EVerest
#ifndef EXTENSIONS_OCPP_ISO15118_EXTENSIONS_IMPL_HPP
#define EXTENSIONS_OCPP_ISO15118_EXTENSIONS_IMPL_HPP
#ifndef extensions_ISO15118_EXTENSIONS_IMPL_HPP
#define extensions_ISO15118_EXTENSIONS_IMPL_HPP

//
// AUTO GENERATED - MARKED REGIONS WILL BE KEPT
Expand All @@ -18,15 +18,15 @@ extern struct v2g_context* v2g_ctx;
// ev@75ac1216-19eb-4182-a85c-820f1fc2c091:v1

namespace module {
namespace extensions_ocpp {
namespace extensions {

struct Conf {};

class iso15118_extensionsImpl : public iso15118_extensionsImplBase {
public:
iso15118_extensionsImpl() = delete;
iso15118_extensionsImpl(Everest::ModuleAdapter* ev, const Everest::PtrContainer<EvseV2G>& mod, Conf& config) :
iso15118_extensionsImplBase(ev, "extensions_ocpp"), mod(mod), config(config){};
iso15118_extensionsImplBase(ev, "extensions"), mod(mod), config(config){};

// ev@8ea32d28-373f-4c90-ae5e-b4fcc74e2a61:v1
// insert your public definitions here
Expand Down Expand Up @@ -57,7 +57,7 @@ class iso15118_extensionsImpl : public iso15118_extensionsImplBase {
// insert other definitions here
// ev@3d7da0ad-02c2-493d-9920-0bbbd56b9876:v1

} // namespace extensions_ocpp
} // namespace extensions
} // namespace module

#endif // EXTENSIONS_OCPP_ISO15118_EXTENSIONS_IMPL_HPP
#endif // extensions_ISO15118_EXTENSIONS_IMPL_HPP
2 changes: 1 addition & 1 deletion modules/EvseV2G/iso_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ static bool publish_iso_certificate_installation_exi_req(struct v2g_context* ctx

certificate_request.iso15118_schema_version = ISO_15118_2013_MSG_DEF;
certificate_request.certificate_action = types::iso15118_charger::CertificateActionEnum::Install;
ctx->p_extensions_ocpp->publish_iso15118_certificate_request(certificate_request);
ctx->p_extensions->publish_iso15118_certificate_request(certificate_request);

#ifdef EVEREST_MBED_TLS
exit:
Expand Down
2 changes: 1 addition & 1 deletion modules/EvseV2G/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ provides:
description: >-
This module implements the ISO15118-2 implementation of
an AC or DC charger
extensions_ocpp:
extensions:
interface: iso15118_extensions
description: >-
This interface is used to share data between ISO15118 and OCPP modules
Expand Down
6 changes: 3 additions & 3 deletions modules/EvseV2G/tests/iso15118_extensionsImplStub.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Pionix GmbH and Contributors to EVerest

#ifndef ISO15118_OCPP_EXTENTSIONSIMPLSTUB_H
#define ISO15118_OCPP_EXTENTSIONSIMPLSTUB_H
#ifndef ISO15118_EXTENTSIONSIMPLSTUB_H
#define ISO15118_EXTENTSIONSIMPLSTUB_H

#include <iostream>

Expand All @@ -28,4 +28,4 @@ class iso15118_extensionsImplStub : public iso15118_extensionsImplBase {

} // namespace module::stub

#endif // ISO15118_OCPP_EXTENTSIONSIMPLSTUB_H
#endif // ISO15118_EXTENTSIONSIMPLSTUB_H
8 changes: 4 additions & 4 deletions modules/EvseV2G/tests/v2g_ctx_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class V2gCtxTest : public testing::Test {
module::stub::QuietModuleAdapterStub adapter;
module::stub::ISO15118_chargerImplStub charger;
module::stub::evse_securityIntfStub security;
module::stub::iso15118_extensionsImplStub ocpp_extensions;
module::stub::iso15118_extensionsImplStub extensions;

V2gCtxTest() : charger(adapter), security(adapter) {
}
Expand Down Expand Up @@ -61,7 +61,7 @@ class V2gCtxTest : public testing::Test {
}

void SetUp() override {
auto ptr = v2g_ctx_create(&charger, &ocpp_extensions, &security);
auto ptr = v2g_ctx_create(&charger, &extensions, &security);
ctx = std::unique_ptr<v2g_context, v2g_contextDeleter>(ptr, v2g_contextDeleter());
module::stub::clear_logs();
}
Expand Down Expand Up @@ -164,8 +164,8 @@ TEST(valgrind, memcheck) {
module::stub::QuietModuleAdapterStub adapter;
module::stub::ISO15118_chargerImplStub charger(adapter);
module::stub::evse_securityIntfStub security(adapter);
module::stub::iso15118_extensionsImplStub ocpp_extensions;
auto ptr = v2g_ctx_create(&charger, &ocpp_extensions, &security);
module::stub::iso15118_extensionsImplStub extensions;
auto ptr = v2g_ctx_create(&charger, &extensions, &security);
v2g_ctx_free(ptr);
}

Expand Down
4 changes: 2 additions & 2 deletions modules/EvseV2G/tests/v2g_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ int main(int argc, char** argv) {
module::stub::ModuleAdapterStub adapter;
module::stub::ISO15118_chargerImplStub charger(adapter);
EvseSecurity security(adapter);
module::stub::iso15118_extensionsImplStub extensions_ocpp;
module::stub::iso15118_extensionsImplStub extensions;

auto* ctx = v2g_ctx_create(&charger, &extensions_ocpp, &security);
auto* ctx = v2g_ctx_create(&charger, &extensions, &security);

if (ctx == nullptr) {
std::cerr << "failed to create context" << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion modules/EvseV2G/v2g.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ struct v2g_context {

evse_securityIntf* r_security;
ISO15118_chargerImplBase* p_charger;
iso15118_extensionsImplBase* p_extensions_ocpp;
iso15118_extensionsImplBase* p_extensions;

struct event_base* event_base;
pthread_t event_thread;
Expand Down
4 changes: 2 additions & 2 deletions modules/EvseV2G/v2g_ctx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ void v2g_ctx_init_charging_values(struct v2g_context* const ctx) {
}

struct v2g_context* v2g_ctx_create(ISO15118_chargerImplBase* p_chargerImplBase,
iso15118_extensionsImplBase* p_extensions_ocpp, evse_securityIntf* r_security) {
iso15118_extensionsImplBase* p_extensions, evse_securityIntf* r_security) {
struct v2g_context* ctx;

// TODO There are c++ objects within v2g_context and calloc doesn't call initialisers.
Expand All @@ -304,7 +304,7 @@ struct v2g_context* v2g_ctx_create(ISO15118_chargerImplBase* p_chargerImplBase,

ctx->r_security = r_security;
ctx->p_charger = p_chargerImplBase;
ctx->p_extensions_ocpp = p_extensions_ocpp;
ctx->p_extensions = p_extensions;

ctx->tls_security = TLS_SECURITY_PROHIBIT; // default

Expand Down
2 changes: 1 addition & 1 deletion modules/EvseV2G/v2g_ctx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static const char* selected_energy_transfer_mode_string[] = {
};

struct v2g_context* v2g_ctx_create(ISO15118_chargerImplBase* p_chargerImplBase,
iso15118_extensionsImplBase* p_extensions_ocpp, evse_securityIntf* r_security);
iso15118_extensionsImplBase* p_extensions, evse_securityIntf* r_security);

/*!
* \brief v2g_ctx_init_charging_session This funcion inits a charging session.
Expand Down
2 changes: 1 addition & 1 deletion modules/IsoMux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ev_setup_cpp_module()
target_sources(${MODULE_NAME}
PRIVATE
"charger/ISO15118_chargerImpl.cpp"
"extensions_ocpp/iso15118_extensionsImpl.cpp"
"extensions/iso15118_extensionsImpl.cpp"
)

# ev@c55432ab-152c-45a9-9d2e-7281d50c69c3:v1
Expand Down
Loading

0 comments on commit 9633c97

Please sign in to comment.