File tree Expand file tree Collapse file tree 5 files changed +10
-9
lines changed
centralsystem/chargepoint Expand file tree Collapse file tree 5 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -448,8 +448,9 @@ bool ChargePointProxy::getDiagnostics(const std::string&
448448 if (res == CallResult::Ok)
449449 {
450450 ret = true ;
451- diagnotic_filename = resp.fileName ;
452- LOG_INFO << " [" << m_identifier << " ] - Get diagnostics : filename = " << resp.fileName .str ();
451+ diagnotic_filename = resp.fileName .value ();
452+ LOG_INFO << " [" << m_identifier << " ] - Get diagnostics : filename = "
453+ << (resp.fileName .isSet () ? resp.fileName .value ().str () : " no diagnostic available" );
453454 }
454455 else
455456 {
Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ bool MaintenanceManager::handleMessage(const ocpp::messages::GetDiagnosticsReq&
329329 {
330330 // Extract filename for the response
331331 std::filesystem::path diag_file (local_diagnostic_file);
332- response.fileName .assign (diag_file.filename ().string ());
332+ response.fileName .value (). assign (diag_file.filename ().string ());
333333
334334 // Create a separate thread since the operation can be time consuming
335335 m_diagnostics_thread = new std::thread (std::bind (&MaintenanceManager::processGetDiagnostics,
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ void RequestFifoManager::requestQueued()
100100void RequestFifoManager::processFifoRequest ()
101101{
102102 std::lock_guard lock (m_process_mutex);
103-
103+
104104 // Check the connection state
105105 if (m_msg_sender.isConnected ())
106106 {
Original file line number Diff line number Diff line change @@ -434,15 +434,15 @@ void StatusManager::bootNotificationProcess()
434434
435435 // Configure hearbeat
436436 std::chrono::seconds interval (boot_conf.interval );
437- if (boot_conf.interval == 0 )
437+ if (boot_conf.interval == 0 )
438438 {
439439 interval = m_ocpp_config.heartbeatInterval ();
440440 }
441441 else
442442 {
443443 m_ocpp_config.heartbeatInterval (interval);
444444 }
445-
445+
446446 m_heartbeat_timer.start (std::chrono::milliseconds (interval));
447447 }
448448 else
@@ -559,15 +559,15 @@ void StatusManager::sendBootNotification()
559559
560560 // Restart hearbeat timer
561561 std::chrono::seconds interval (boot_conf.interval );
562- if (boot_conf.interval == 0 )
562+ if (boot_conf.interval == 0 )
563563 {
564564 interval = m_ocpp_config.heartbeatInterval ();
565565 }
566566 else
567567 {
568568 m_ocpp_config.heartbeatInterval (interval);
569569 }
570-
570+
571571 m_heartbeat_timer.restart (std::chrono::milliseconds (interval));
572572
573573 // Save registration status
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ struct GetDiagnosticsConf
6161 /* * @brief Optional. This contains the name of the file with diagnostic information that will
6262 be uploaded. This field is not present when no diagnostic information is
6363 available. */
64- ocpp::types::CiStringType<255 > fileName;
64+ ocpp::types::Optional<ocpp::types:: CiStringType<255 > > fileName;
6565};
6666
6767// Message converters
You can’t perform that action at this time.
0 commit comments