23 #ifndef LIAISONACOMMS20140626H 24 #define LIAISONACOMMS20140626H 26 #include <Wt/Chart/WCartesianChart> 27 #include <Wt/WCssDecorationStyle> 29 #include <Wt/WProgressBar> 34 #include "goby/common/liaison_container.h" 35 #include "goby/moos/moos_node.h" 36 #include "goby/moos/protobuf/liaison_config.pb.h" 37 #include "goby/moos/protobuf/pAcommsHandler_config.pb.h" 46 QueueBar(Wt::WContainerWidget* parent = 0) : Wt::WProgressBar(parent) {}
47 Wt::WString text()
const;
50 class MACBar :
public Wt::WProgressBar
53 MACBar(Wt::WContainerWidget* parent = 0) : Wt::WProgressBar(parent) {}
54 Wt::WString text()
const;
61 Wt::WContainerWidget* parent = 0);
64 void process_acomms_config();
69 void dccl_analyze(
const Wt::WMouseEvent&
event);
70 void dccl_select(Wt::WString msg);
71 void dccl_message(
const Wt::WMouseEvent& event);
73 void queue_info(
const Wt::WMouseEvent& event,
int id);
74 void queue_flush(
const Wt::WMouseEvent& event,
int id);
76 void mac_info(
const Wt::WMouseEvent& event,
int id);
79 void update_driver_stats(
int now, DriverStats* driver_stats);
80 void handle_modem_message(DriverStats* driver_stats,
bool good,
83 void driver_info(
const Wt::WMouseEvent& event, DriverStats* driver_stats);
84 void mm_check(
int axis,
int column,
bool checked);
85 void mm_range(
double range);
87 void focus() { timer_.start(); }
89 void unfocus() { timer_.stop(); }
91 std::string format_seconds(
int sec);
94 boost::mutex dccl_mutex_;
97 Wt::WPushButton* dccl_analyze_;
98 Wt::WPushButton* dccl_message_;
99 Wt::WText* dccl_analyze_text_;
100 Wt::WText* dccl_message_text_;
101 Wt::WComboBox* dccl_combo_;
102 Wt::WTable* queue_table_;
104 Wt::WContainerWidget* amac_box_;
106 std::map<dccl::int32, QueueBar*> queue_bars_;
109 std::map<dccl::int32, int> queue_cfg_;
112 std::map<int, Wt::WContainerWidget*> mac_slots_;
113 std::map<int, MACBar*> mac_bars_;
115 Wt::WCssDecorationStyle mac_slot_style_;
119 QueueStats() : last_rx_time(-1) {}
122 Wt::WText* last_rx_time_text;
124 std::map<dccl::int32, QueueStats> queue_stats_;
129 bool have_acomms_config_;
131 Wt::WPanel* driver_panel_;
132 WContainerWidget* driver_box_;
142 DriverStats(Direction d) : direction(d), last_time(-1) {}
146 Wt::WText* last_time_text;
151 DriverStats driver_rx_;
152 DriverStats driver_tx_;
154 Wt::WGroupBox* mm_rx_stats_box_;
155 Wt::WStandardItemModel* mm_rx_stats_model_;
156 Wt::Chart::WCartesianChart* mm_rx_stats_graph_;
166 PERCENT_BAD_FRAMES_COLUMN = 6,
170 int mm_rx_stats_range_;
173 std::map<int, std::map<int, Wt::WCheckBox*> > mm_rx_chks_;
The global namespace for the Goby project.