From caf227975ac3623e4c6dcbb7fc9fd6c3a389ec24 Mon Sep 17 00:00:00 2001 From: "Maaike Zijderveld, iolar" Date: Tue, 6 Aug 2024 18:31:31 +0200 Subject: [PATCH 1/2] Remove config file from manifest, device model configuration is now done with the config schema's Signed-off-by: Maaike Zijderveld, iolar --- modules/OCPP201/OCPP201.cpp | 24 +++++++----------------- modules/OCPP201/OCPP201.hpp | 3 +-- modules/OCPP201/manifest.yaml | 10 +++------- 3 files changed, 11 insertions(+), 26 deletions(-) diff --git a/modules/OCPP201/OCPP201.cpp b/modules/OCPP201/OCPP201.cpp index 8e18c1423..21d37aafb 100644 --- a/modules/OCPP201/OCPP201.cpp +++ b/modules/OCPP201/OCPP201.cpp @@ -283,21 +283,12 @@ void OCPP201::ready() { } }(); - const auto device_model_schema_path = [&]() { - const auto config_device_model_schema_path = fs::path(this->config.DeviceModelSchemaPath); - if (config_device_model_schema_path.is_relative()) { - return this->ocpp_share_path / config_device_model_schema_path; + const auto device_model_config_path = [&]() { + const auto config_device_model_config_path = fs::path(this->config.DeviceModelConfigPath); + if (config_device_model_config_path.is_relative()) { + return this->ocpp_share_path / config_device_model_config_path; } else { - return config_device_model_schema_path; - } - }(); - - const auto config_file_path = [&]() { - const auto config_config_file_path = fs::path(this->config.ConfigFilePath); - if (config_config_file_path.is_relative()) { - return this->ocpp_share_path / config_config_file_path; - } else { - return config_config_file_path; + return config_device_model_config_path; } }(); @@ -534,9 +525,8 @@ void OCPP201::ready() { std::map evse_connector_structure = this->get_connector_structure(); this->charge_point = std::make_unique( evse_connector_structure, device_model_database_path, true, device_model_database_migration_path, - device_model_schema_path, config_file_path, this->ocpp_share_path.string(), this->config.CoreDatabasePath, - sql_init_path.string(), this->config.MessageLogPath, std::make_shared(*this->r_security), - callbacks); + device_model_config_path, this->ocpp_share_path.string(), this->config.CoreDatabasePath, sql_init_path.string(), + this->config.MessageLogPath, std::make_shared(*this->r_security), callbacks); const auto ev_connection_timeout_request_value_response = this->charge_point->request_value( ocpp::v201::Component{"TxCtrlr"}, ocpp::v201::Variable{"EVConnectionTimeOut"}, diff --git a/modules/OCPP201/OCPP201.hpp b/modules/OCPP201/OCPP201.hpp index 9e35e87e3..05394a253 100644 --- a/modules/OCPP201/OCPP201.hpp +++ b/modules/OCPP201/OCPP201.hpp @@ -39,8 +39,7 @@ struct Conf { std::string CoreDatabasePath; std::string DeviceModelDatabasePath; std::string DeviceModelDatabaseMigrationPath; - std::string DeviceModelSchemaPath; - std::string ConfigFilePath; + std::string DeviceModelConfigPath; bool EnableExternalWebsocketControl; int MessageQueueResumeDelay; }; diff --git a/modules/OCPP201/manifest.yaml b/modules/OCPP201/manifest.yaml index e4dba6efd..18493e090 100644 --- a/modules/OCPP201/manifest.yaml +++ b/modules/OCPP201/manifest.yaml @@ -16,14 +16,10 @@ config: description: Path to the migration files for the device model type: string default: device_model_migrations - DeviceModelSchemaPath: - description: Path to the device model component schema directory + DeviceModelConfigPath: + description: Path to the device model component config directory type: string - default: component_schemas - ConfigFilePath: - description: Path to the configuration file of libocpp - type: string - default: config.json + default: component_config EnableExternalWebsocketControl: description: If true websocket can be disconnected and connected externally type: boolean From eb28dc725a46f3c40e26d0df1681cd944b55da55 Mon Sep 17 00:00:00 2001 From: "Maaike Zijderveld, iolar" Date: Mon, 19 Aug 2024 11:55:43 +0200 Subject: [PATCH 2/2] Bump libocpp version to 0.16.0 Signed-off-by: Maaike Zijderveld, iolar --- dependencies.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.yaml b/dependencies.yaml index 6baa500ba..341964291 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -60,7 +60,7 @@ libevse-security: # OCPP libocpp: git: https://github.com/EVerest/libocpp.git - git_tag: v0.15.1 + git_tag: v0.16.0 cmake_condition: "EVEREST_DEPENDENCY_ENABLED_LIBOCPP" # Josev Josev: