Skip to content

Commit

Permalink
SatelliteAgent/SatelliteController: adapt for change evse_manager int…
Browse files Browse the repository at this point in the history
…erface

This adapts for the following PR in everest-core:
- EVerest/everest-core#872
- EVerest/everest-core#924

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
  • Loading branch information
mhei committed Oct 21, 2024
1 parent 81b06fc commit 40cab98
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
8 changes: 4 additions & 4 deletions modules/SatelliteAgent/SatelliteAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ void SatelliteAgent::init() {
this->add_to_event_list("evse_manager", "powermeter", value);
});

this->r_evse_manager->subscribe_powermeter_public_key_ocmf([&](std::string value) {
this->add_to_event_list("evse_manager", "powermeter_public_key_ocmf", value);
});

this->r_evse_manager->subscribe_evse_id([&](std::string value) {
this->add_to_event_list("evse_manager", "evse_id", value);
});
Expand Down Expand Up @@ -287,10 +291,6 @@ void SatelliteAgent::init_rpc_binds() {
return this->r_evse_manager->call_force_unlock(connector_id);
});

this->rpc->bind("evse_manager_set_external_limits", [&](std::string& value) {
return this->r_evse_manager->call_set_external_limits(json::parse(value));
});

this->rpc->bind("evse_manager_set_get_certificate_response", [&](std::string& certificate_response) {
this->r_evse_manager->call_set_get_certificate_response(json::parse(certificate_response));
});
Expand Down
2 changes: 2 additions & 0 deletions modules/SatelliteController/SatelliteController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ void SatelliteController::ready() {
this->p_evse_manager->publish_telemetry(event["value"]);
else if (event["var"] == "powermeter")
this->p_evse_manager->publish_powermeter(event["value"]);
else if (event["var"] == "powermeter_public_key_ocmf")
this->p_evse_manager->publish_powermeter_public_key_ocmf(event["value"]);
else if (event["var"] == "evse_id")
this->p_evse_manager->publish_evse_id(event["value"]);
else if (event["var"] == "hw_capabilities")
Expand Down
6 changes: 0 additions & 6 deletions modules/SatelliteController/evse_manager/evse_managerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ bool evse_managerImpl::handle_force_unlock(int& connector_id) {
return this->mod->rpc->call("evse_manager_force_unlock", connector_id).as<bool>();
}

void evse_managerImpl::handle_set_external_limits(types::energy::ExternalLimits& value) {
json j = value;

this->mod->rpc->call("evse_manager_set_external_limits", j.dump());
}

void evse_managerImpl::handle_set_get_certificate_response(
types::iso15118_charger::ResponseExiStreamStatus& certificate_response) {
json j = certificate_response;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class evse_managerImpl : public evse_managerImplBase {
virtual bool handle_resume_charging() override;
virtual bool handle_stop_transaction(types::evse_manager::StopTransactionRequest& request) override;
virtual bool handle_force_unlock(int& connector_id) override;
virtual void handle_set_external_limits(types::energy::ExternalLimits& value) override;
virtual void handle_set_get_certificate_response(
types::iso15118_charger::ResponseExiStreamStatus& certificate_response) override;
virtual bool handle_external_ready_to_start_charging() override;
Expand Down

0 comments on commit 40cab98

Please sign in to comment.