Skip to content

Commit a5d1c79

Browse files
committed
[wip] Added an on_try_switch function to switch to a specific network connection profile
Signed-off-by: Soumya Subramanya <s.subramanya@alfen.com>
1 parent ea12082 commit a5d1c79

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

include/ocpp/v201/charge_point.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,8 @@ class ChargePoint : ocpp::ChargingStationBase {
735735
const AttributeEnum& attribute_enum) {
736736
return this->device_model->request_value<T>(component_id, variable_id, attribute_enum);
737737
}
738+
739+
bool on_try_switch_network_connection_profile(const std::string configuration_slot);
738740
};
739741

740742
} // namespace v201

lib/ocpp/v201/charge_point.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,9 @@ void ChargePoint::init_websocket() {
657657
ocpp::get_vector_from_csv(
658658
this->device_model->get_value<std::string>(ControllerComponentVariables::NetworkConfigurationPriority))
659659
.at(this->network_configuration_priority);
660+
661+
EVLOG_info << "congfig -------> : " << configuration_slot.size();
662+
660663
const auto connection_options = this->get_ws_connection_options(std::stoi(configuration_slot));
661664
const auto network_connection_profile = this->get_network_connection_profile(std::stoi(configuration_slot));
662665

@@ -3011,6 +3014,10 @@ void ChargePoint::set_connector_operative_status(int32_t evse_id, int32_t connec
30113014
this->evses.at(evse_id)->set_connector_operative_status(connector_id, new_status, persist);
30123015
}
30133016

3017+
bool ChargePoint::on_try_switch_network_connection_profile(const std::string configuration_slot) {
3018+
EVLOG_info << "=============on_try_switch_network_profile============" << configuration_slot;
3019+
return false;
3020+
}
30143021
bool ChargePoint::are_all_connectors_effectively_inoperative() {
30153022
// Check that all connectors on all EVSEs are inoperative
30163023
for (auto& [evse_id, evse] : this->evses) {

0 commit comments

Comments
 (0)