Skip to content

Commit

Permalink
437: Fix delay in bootnotification
Browse files Browse the repository at this point in the history
Signed-off-by: Maaike Zijderveld, Alfen <[email protected]>
  • Loading branch information
maaikez committed Feb 1, 2024
1 parent d3971bd commit b6992cd
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/ocpp/v201/charge_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1870,6 +1870,13 @@ void ChargePoint::handle_boot_notification_response(CallResult<BootNotificationR
this->registration_status = msg.status;

if (this->registration_status == RegistrationStatusEnum::Accepted) {
// B01.FR.06 Only use boot timestamp if TimeSource contains Heartbeat
if (this->callbacks.time_sync_callback.has_value() &&
this->device_model->get_value<std::string>(ControllerComponentVariables::TimeSource).find("Heartbeat") !=
std::string::npos) {
this->callbacks.time_sync_callback.value()(msg.currentTime);
}

this->remove_network_connection_profiles_below_actual_security_profile();

// get transaction messages from db (if there are any) so they can be sent again.
Expand All @@ -1881,12 +1888,6 @@ void ChargePoint::handle_boot_notification_response(CallResult<BootNotificationR
}
this->init_certificate_expiration_check_timers();
this->update_aligned_data_interval();
// B01.FR.06 Only use boot timestamp if TimeSource contains Heartbeat
if (this->callbacks.time_sync_callback.has_value() &&
this->device_model->get_value<std::string>(ControllerComponentVariables::TimeSource).find("Heartbeat") !=
std::string::npos) {
this->callbacks.time_sync_callback.value()(msg.currentTime);
}
this->component_state_manager->send_status_notification_all_connectors();

if (this->bootreason == BootReasonEnum::RemoteReset) {
Expand Down

0 comments on commit b6992cd

Please sign in to comment.