@@ -26,7 +26,7 @@ const auto DEFAULT_MAX_MESSAGE_SIZE = 65000;
26
26
bool Callbacks::all_callbacks_valid () const {
27
27
return this ->is_reset_allowed_callback != nullptr and this ->reset_callback != nullptr and
28
28
this ->stop_transaction_callback != nullptr and this ->pause_charging_callback != nullptr and
29
- // this->connector_effective_operative_status_changed_callback != nullptr and
29
+ this ->connector_effective_operative_status_changed_callback != nullptr and
30
30
this ->get_log_request_callback != nullptr and this ->unlock_connector_callback != nullptr and
31
31
this ->remote_start_transaction_callback != nullptr and this ->is_reservation_for_token_callback != nullptr and
32
32
this ->update_firmware_request_callback != nullptr and
@@ -691,6 +691,21 @@ void ChargePoint::init_websocket(std::optional<std::string> config_slot) {
691
691
return ;
692
692
case std::future_status::ready:
693
693
EVLOG_info << " ready!" ;
694
+ // store the future output
695
+ this ->config_network_profile_result = config_status.get ();
696
+
697
+ if (!this ->config_network_profile_result .success ) {
698
+ EVLOG_warning
699
+ << " NetworkConnectionProfile could not be retrieved or configuration of network with the given "
700
+ " profile failed" ;
701
+ this ->websocket_timer .timeout (
702
+ [this ]() {
703
+ this ->next_network_configuration_priority ();
704
+ this ->start_websocket ();
705
+ },
706
+ WEBSOCKET_INIT_DELAY);
707
+ return ;
708
+ }
694
709
break ;
695
710
}
696
711
}
@@ -3021,25 +3036,21 @@ void ChargePoint::set_connector_operative_status(int32_t evse_id, int32_t connec
3021
3036
}
3022
3037
3023
3038
bool ChargePoint::on_try_switch_network_connection_profile (const std::string configuration_slot) {
3024
- EVLOG_info << " =============on_try_switch_network_profile============" << configuration_slot;
3039
+ EVLOG_info << " =============on_try_switch_network_profile============" << configuration_slot;
3025
3040
3026
3041
// check if the configuration slot is valid
3027
- try
3028
- {
3029
- // call disconnect
3030
- this ->disconnect_websocket (); // normal close
3031
- while (!this ->is_offline ())
3032
- {
3042
+ try {
3043
+ // call disconnect
3044
+ this ->disconnect_websocket (); // normal close
3045
+ while (!this ->is_offline ()) {
3033
3046
/* code */
3034
3047
}
3035
-
3036
- // call connect with the config_slot option
3048
+
3049
+ // call connect with the config_slot option
3037
3050
this ->connect_websocket (configuration_slot);
3038
3051
return true ;
3039
-
3040
- }
3041
- catch (std::exception &e)
3042
- {
3052
+
3053
+ } catch (std::exception & e) {
3043
3054
EVLOG_info << " ERROR===============>" ;
3044
3055
return false ;
3045
3056
}
0 commit comments