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);
83 unsigned int movingAveragePeriod()
const {
return moving_avg_period_; }
84 void setInterval(
int interval);
85 int packetFromTime(
double ts)
const;
86 bool hasItemToShow(
int idx,
double value)
const;
87 double getItemValue(
int idx,
const capture_file* cap_file)
const;
88 int maxInterval()
const {
return cur_idx_; }
92 unsigned int moving_avg_period_;
97 void reloadValueUnitField();
100 void requestReplot();
101 void requestRecalc();
106 static void tapReset(
void* iog_ptr);
108 static void tapDraw(
void* iog_ptr);
110 void removeTapListener();
112 bool showsZero()
const;
114 template<
class DataMap>
double maxValueFromGraphData(
const DataMap& map);
115 template<
class DataMap>
void scaleGraphData(DataMap& map,
int scalar);
118 bool tap_registered_;
121 QString full_filter_;
122 io_graph_item_unit_t val_units_;
130 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:27
Definition epan_dissect.h:28
tap_packet_status
Definition tap.h:25