Add extracted tools: CitrineOS, OpenOCPP, ShapeShifter

- CitrineOS core extracted (CSMS OCPP 2.0.1)
- OpenOCPP extracted (firmware OCPP 1.6J/2.0.1)
- ShapeShifter library installed (pip install -e)
- ShapeShifter specification extracted
- EVerest extracted

TODO updated with progress
This commit is contained in:
Eric F
2026-06-08 00:38:27 -04:00
parent 468cfeaa50
commit d398a6ced2
7326 changed files with 1177561 additions and 7 deletions

View File

@@ -0,0 +1,18 @@
load("@rules_cc//cc:defs.bzl", "cc_library")
cc_library(
name = "external_energy_limits",
srcs = [
"src/external_energy_limits.cpp",
],
hdrs = [
"include/everest/external_energy_limits/external_energy_limits.hpp",
],
copts = ["-std=c++17"],
includes = ["include"],
visibility = ["//visibility:public"],
deps = [
"//lib/everest/framework:framework",
"//interfaces:interfaces_lib",
],
)

View File

@@ -0,0 +1,23 @@
# External Energy Limits
add_library(external_energy_limits STATIC)
add_library(everest::external_energy_limits ALIAS external_energy_limits)
ev_register_library_target(external_energy_limits)
target_sources(external_energy_limits
PRIVATE
src/external_energy_limits.cpp
)
target_include_directories(external_energy_limits
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
"$<TARGET_PROPERTY:generate_cpp_files,EVEREST_GENERATED_INCLUDE_DIR>"
)
add_dependencies(external_energy_limits generate_cpp_files)
target_link_libraries(external_energy_limits
PRIVATE
everest::framework
)

View File

@@ -0,0 +1,23 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2024 Pionix GmbH and Contributors to EVerest
#pragma once
#include <generated/interfaces/external_energy_limits/Interface.hpp>
namespace external_energy_limits {
/// \brief Checks if \p r_evse_energy_sink vector contains an element that has a mapping to the given \p evse_id
/// \param r_evse_energy_sink
/// \param evse_id
/// \return
bool is_evse_sink_configured(const std::vector<std::unique_ptr<external_energy_limitsIntf>>& r_evse_energy_sink,
const int32_t evse_id);
/// \brief Returns the reference of external_energy_limitsIntf in \p r_evse_energy_sink that maps to the given \p
/// evse_id \param r_evse_energy_sink \param evse_id \return
external_energy_limitsIntf&
get_evse_sink_by_evse_id(const std::vector<std::unique_ptr<external_energy_limitsIntf>>& r_evse_energy_sink,
const int32_t evse_id);
} // namespace external_energy_limits

View File

@@ -0,0 +1,41 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2024 Pionix GmbH and Contributors to EVerest
#include <everest/external_energy_limits/external_energy_limits.hpp>
namespace external_energy_limits {
bool is_evse_sink_configured(const std::vector<std::unique_ptr<external_energy_limitsIntf>>& r_evse_energy_sink,
const int32_t evse_id) {
for (const auto& evse_sink : r_evse_energy_sink) {
if (not evse_sink->get_mapping().has_value()) {
EVLOG_critical << "Please configure an evse mapping in your configuration file for the connected "
"r_evse_energy_sink with module_id: "
<< evse_sink->module_id;
throw std::runtime_error("No mapping configured for evse_id: " + std::to_string(evse_id));
}
if (evse_sink->get_mapping().value().evse == evse_id) {
return true;
}
}
return false;
}
external_energy_limitsIntf&
get_evse_sink_by_evse_id(const std::vector<std::unique_ptr<external_energy_limitsIntf>>& r_evse_energy_sink,
const int32_t evse_id) {
for (const auto& evse_sink : r_evse_energy_sink) {
if (not evse_sink->get_mapping().has_value()) {
EVLOG_critical << "Please configure an evse mapping in your configuration file for the connected "
"r_evse_energy_sink with module_id: "
<< evse_sink->module_id;
throw std::runtime_error("No mapping configured for evse_id: " + std::to_string(evse_id));
}
if (evse_sink->get_mapping().value().evse == evse_id) {
return *evse_sink;
}
}
throw std::runtime_error("No mapping configured for evse_id: " + std::to_string(evse_id));
}
} // namespace external_energy_limits