Skip to content

Commit

Permalink
Adapt SatelliteAgent/SatelliteController to change evse_manager inter…
Browse files Browse the repository at this point in the history
…face

EVerest release 2024.5.0 introduced a change in the evse_manager interface:
see EVerest/everest-core#505

So a small adaption is needed in both modules to cover the
new/replaced command(s).

Signed-off-by: Michael Heimpold <[email protected]>
  • Loading branch information
mhei committed Jun 5, 2024
1 parent b6d9e3e commit fa90713
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
8 changes: 2 additions & 6 deletions modules/SatelliteAgent/SatelliteAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,8 @@ void SatelliteAgent::init_rpc_binds() {
return j.dump();
});

this->rpc->bind("evse_manager_enable", [&](int& connector_id) {
return this->r_evse_manager->call_enable(connector_id);
});

this->rpc->bind("evse_manager_disable", [&](int& connector_id) {
return this->r_evse_manager->call_disable(connector_id);
this->rpc->bind("evse_manager_enable_disable", [&](int& connector_id, std::string& cmd_source) {
return this->r_evse_manager->call_enable_disable(connector_id, json::parse(cmd_source));
});

this->rpc->bind("evse_manager_authorize_response", [&](std::string& provided_token, std::string& validation_result) {
Expand Down
8 changes: 3 additions & 5 deletions modules/SatelliteController/evse_manager/evse_managerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ types::evse_manager::Evse evse_managerImpl::handle_get_evse() {
return j;
}

bool evse_managerImpl::handle_enable(int& connector_id) {
return this->mod->rpc->call("evse_manager_enable", connector_id).as<bool>();
}
bool evse_managerImpl::handle_enable_disable(int& connector_id, types::evse_manager::EnableDisableSource& cmd_source) {
json j = cmd_source;

bool evse_managerImpl::handle_disable(int& connector_id) {
return this->mod->rpc->call("evse_manager_disable", connector_id).as<bool>();
return this->mod->rpc->call("evse_manager_enable_disable", connector_id, j.dump()).as<bool>();
}

void evse_managerImpl::handle_authorize_response(types::authorization::ProvidedIdToken& provided_token,
Expand Down

0 comments on commit fa90713

Please sign in to comment.