diff --git a/modules/SatelliteAgent/SatelliteAgent.cpp b/modules/SatelliteAgent/SatelliteAgent.cpp index 4f5ef6c..0c5004a 100644 --- a/modules/SatelliteAgent/SatelliteAgent.cpp +++ b/modules/SatelliteAgent/SatelliteAgent.cpp @@ -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) { diff --git a/modules/SatelliteController/evse_manager/evse_managerImpl.cpp b/modules/SatelliteController/evse_manager/evse_managerImpl.cpp index 1ed0b07..44df2b4 100644 --- a/modules/SatelliteController/evse_manager/evse_managerImpl.cpp +++ b/modules/SatelliteController/evse_manager/evse_managerImpl.cpp @@ -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 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(); + return this->mod->rpc->call("evse_manager_enable_disable", connector_id, j.dump()).as(); } void evse_managerImpl::handle_authorize_response(types::authorization::ProvidedIdToken& provided_token,