24 #include <wx/window.h>
26 #include "comm_overflow_dlg.h"
29 #include "model/comm_drv_registry.h"
31 static const char*
const kMessage =
32 _(R
"---(Communication overflow detected, the system is not able to process
33 all input. This is not fatal, system will continue to work but
34 will have to discard some input data.
36 It is possible to control the data discarded using filtering,
39 Please review the logfile for more info on discarded messages.
42 static const char*
const kCaption = _(
"Communication overflow");
44 CommOverflowDlg::CommOverflowDlg(wxWindow* parent) : m_parent(parent) {
45 assert(parent &&
"Null parent window");
47 ShowDialog(evt.GetString().ToStdString());
49 m_listener.Init(CommDriverRegistry::GetInstance().evt_comm_overrun, action);
52 void CommOverflowDlg::ShowDialog(
const std::string& msg) {
53 OCPNMessageBox(m_parent, kMessage, kCaption, wxICON_INFORMATION);
Adds a std::shared<void> element to wxCommandEvent.
General purpose GUI support.