31const int SCALE = 1000000;
32const double SCALE_F = (double)SCALE;
35 { IOG_ITEM_UNIT_PACKETS,
"Packets" },
36 { IOG_ITEM_UNIT_BYTES,
"Bytes" },
37 { IOG_ITEM_UNIT_BITS,
"Bits" },
38 { IOG_ITEM_UNIT_CALC_SUM,
"SUM(Y Field)" },
39 { IOG_ITEM_UNIT_CALC_FRAMES,
"COUNT FRAMES(Y Field)" },
40 { IOG_ITEM_UNIT_CALC_FIELDS,
"COUNT FIELDS(Y Field)" },
41 { IOG_ITEM_UNIT_CALC_MAX,
"MAX(Y Field)" },
42 { IOG_ITEM_UNIT_CALC_MIN,
"MIN(Y Field)" },
43 { IOG_ITEM_UNIT_CALC_AVERAGE,
"AVG(Y Field)" },
44 { IOG_ITEM_UNIT_CALC_THROUGHPUT,
"THROUGHPUT(Y Field)" },
45 { IOG_ITEM_UNIT_CALC_LOAD,
"LOAD(Y Field)" },
50 { IOG_ITEM_UNIT_PACKETS,
"Events" },
66 explicit IOGraph(QCustomPlot* parent);
68 QString configError()
const {
return config_err_; }
69 void setAOT(
bool asAOT);
70 bool getAOT()
const {
return asAOT_; }
71 QString filter()
const {
return filter_; }
72 bool setFilter(
const QString& filter);
73 void setVisible(
bool visible);
74 bool needRetap()
const {
return need_retap_; }
75 void setNeedRetap(
bool retap);
76 void setPlotStyle(PlotStyles style);
77 QString valueUnitLabel()
const;
79 io_graph_item_unit_t valueUnits()
const {
return val_units_; }
80 void setValueUnits(
int val_units);
81 QString valueUnitField()
const {
return vu_field_; }
82 void setValueUnitField(
const QString& vu_field);
84 unsigned int movingAveragePeriod()
const {
return moving_avg_period_; }
85 void setInterval(
int interval);
86 int packetFromTime(
double ts)
const;
87 bool hasItemToShow(
int idx,
double value)
const;
88 double getItemValue(
int idx,
const capture_file* cap_file)
const;
89 int maxInterval()
const {
return cur_idx_; }
93 unsigned int moving_avg_period_;
98 void reloadValueUnitField();
101 void requestReplot();
102 void requestRecalc();
107 static void tapReset(
void* iog_ptr);
109 static void tapDraw(
void* iog_ptr);
111 void removeTapListener();
113 bool showsZero()
const;
114 double startOffset()
const;
116 template<
class DataMap>
double maxValueFromGraphData(
const DataMap& map);
117 template<
class DataMap>
void scaleGraphData(DataMap& map,
int scalar);
120 bool tap_registered_;
123 QString full_filter_;
124 io_graph_item_unit_t val_units_;
133 std::vector<io_graph_item_t> items_;
Definition capture_event.h:21
format_size_units_e
Definition str_util.h:231
Definition packet_info.h:43
Definition value_string.h:26
Definition epan_dissect.h:28
tap_packet_status
Definition tap.h:25