Skip to content

Commit 95a6a1a

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 ccbea6d commit 95a6a1a

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

@@ -3004,6 +3007,10 @@ void ChargePoint::set_connector_operative_status(int32_t evse_id, int32_t connec
30043007
this->evses.at(evse_id)->set_connector_operative_status(connector_id, new_status, persist);
30053008
}
30063009

3010+
bool ChargePoint::on_try_switch_network_connection_profile(const std::string configuration_slot) {
3011+
EVLOG_info << "=============on_try_switch_network_profile============" << configuration_slot;
3012+
return false;
3013+
}
30073014
bool ChargePoint::are_all_connectors_effectively_inoperative() {
30083015
// Check that all connectors on all EVSEs are inoperative
30093016
for (auto& [evse_id, evse] : this->evses) {

0 commit comments

Comments
 (0)