Skip to content

Commit

Permalink
Merge branch 'main' into feature/327-use-case-h01-reservation
Browse files Browse the repository at this point in the history
  • Loading branch information
maaikez committed Nov 13, 2024
2 parents 925e08f + 5e96735 commit f205906
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion modules/EvseV2G/charger/ISO15118_chargerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ void ISO15118_chargerImpl::handle_session_setup(std::vector<types::iso15118_char
void ISO15118_chargerImpl::handle_certificate_response(
types::iso15118_charger::ResponseExiStreamStatus& exi_stream_status) {
pthread_mutex_lock(&v2g_ctx->mqtt_lock);
if (exi_stream_status.exi_response.has_value()) {
if (exi_stream_status.exi_response.has_value() and not exi_stream_status.exi_response.value().empty()) {
v2g_ctx->evse_v2g_data.cert_install_res_b64_buffer = std::string(exi_stream_status.exi_response.value());
}
v2g_ctx->evse_v2g_data.cert_install_status =
Expand Down
6 changes: 5 additions & 1 deletion modules/OCPP/OCPP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,12 @@ void OCPP::ready() {
const ocpp::v201::CertificateActionEnum& certificate_action) {
types::iso15118_charger::ResponseExiStreamStatus response;
response.status = conversions::to_everest_iso15118_charger_status(certificate_response.status);
response.exi_response.emplace(certificate_response.exiResponse.get());
response.certificate_action = conversions::to_everest_certificate_action_enum(certificate_action);
if (not certificate_response.exiResponse.get().empty()) {
// since exi_response is an optional in the EVerest type we only set it when not empty
response.exi_response.emplace(certificate_response.exiResponse.get());
}

this->r_evse_manager.at(this->connector_evse_index_map.at(connector_id))
->call_set_get_certificate_response(response);
});
Expand Down
11 changes: 7 additions & 4 deletions modules/OCPP201/OCPP201.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -838,10 +838,13 @@ void OCPP201::ready() {
conversions::to_ocpp_get_15118_certificate_request(certificate_request));
EVLOG_debug << "Received response from get_15118_ev_certificate_request: " << ocpp_response;
// transform response, inject action, send to associated EvseManager
const auto everest_response_status =
conversions::to_everest_iso15118_charger_status(ocpp_response.status);
const types::iso15118_charger::ResponseExiStreamStatus everest_response{
everest_response_status, certificate_request.certificate_action, ocpp_response.exiResponse};
types::iso15118_charger::ResponseExiStreamStatus everest_response;
everest_response.status = conversions::to_everest_iso15118_charger_status(ocpp_response.status);
everest_response.certificate_action = certificate_request.certificate_action;
if (not ocpp_response.exiResponse.get().empty()) {
// since exi_response is an optional in the EVerest type we only set it when not empty
everest_response.exi_response = ocpp_response.exiResponse.get();
}
this->r_evse_manager.at(evse_id - 1)->call_set_get_certificate_response(everest_response);
});

Expand Down

0 comments on commit f205906

Please sign in to comment.