31const int SCALE = 1000000;
32const double SCALE_F = (double)SCALE;
74 explicit IOGraph(QCustomPlot* parent,
const char* type_unit_name);
97 bool getAOT()
const {
return asAOT_; }
103 QString
filter()
const {
return filter_; }
267 static void tapReset(
void* iog_ptr);
284 static void tapDraw(
void* iog_ptr);
289 void removeTapListener();
295 bool showsZero()
const;
301 double startOffset()
const;
308 template<
class DataMap>
double maxValueFromGraphData(
const DataMap& map);
315 template<
class DataMap>
void scaleGraphData(DataMap& map,
int scalar);
321 bool tap_registered_;
330 QString full_filter_;
351 const char* type_unit_name_;
357 std::vector<io_graph_item_t> items_;
Represents an event occurring during a capture or file operation.
Definition capture_event.h:24
Represents a single data graph within a QCustomPlot, managing its data, visual style,...
Definition graph.h:25
PlotStyles
Defines the available visual styles for plotting data.
Definition graph.h:37
bool visible() const
Checks if the graph is currently visible.
Definition graph.h:94
Represents an individual input/output graph, handling tapping, packet processing, and data scaling.
Definition io_graph.h:66
bool setFilter(const QString &filter)
Sets the filter string for this graph.
Definition io_graph.cpp:78
void setValueUnits(int val_units)
Sets the core IO graph item unit type.
Definition io_graph.cpp:229
QString filter() const
Retrieves the active filter string for this graph.
Definition io_graph.h:103
void setAOT(bool asAOT)
Sets whether the graph displays values as an Average Over Time (AOT).
Definition io_graph.cpp:153
void clearAllData()
Clears all cached plotting and tap data.
Definition io_graph.cpp:320
void recalcGraphData(capture_file *cap_file)
Recalculates the graph plotting data based on cached tap data.
Definition io_graph.cpp:330
QString valueUnitLabel() const
Generates the label for the value (Y-axis) units.
Definition io_graph.cpp:221
void setInterval(int interval)
Sets the time interval for data bucketing.
Definition io_graph.cpp:557
io_graph_item_unit_t valueUnits() const
Retrieves the core IO graph item unit type.
Definition io_graph.h:152
~IOGraph()
Destroys the IOGraph.
Definition io_graph.cpp:64
void requestRecalc()
Signal emitted to request a recalculation of the graph data.
void requestRetap()
Signal emitted to request a full retap of the packet data.
unsigned int moving_avg_period_
Definition io_graph.h:225
void setVisible(bool visible)
Sets the visibility of the graph.
Definition io_graph.cpp:168
QString valueUnitField() const
Retrieves the field used to calculate the value units (e.g., specific protocol field).
Definition io_graph.h:164
int packetFromTime(double ts) const
Determines the packet number closest to a specific timestamp.
Definition io_graph.cpp:304
void requestReplot()
Signal emitted to request a UI redraw of the parent plot.
void setValueUnitField(const QString &vu_field)
Sets the field used to calculate the value units.
Definition io_graph.cpp:256
nstime_t startTime() const
Retrieves the starting time of the graph data.
Definition io_graph.cpp:293
void reloadValueUnitField()
Reloads and re-evaluates the value unit field setting.
Definition io_graph.cpp:476
void captureEvent(const CaptureEvent &e)
Handles system capture events.
Definition io_graph.cpp:467
bool getAOT() const
Checks if the graph displays values as an Average Over Time (AOT).
Definition io_graph.h:97
void setNeedRetap(bool retap)
Manually flags whether a retap is required.
Definition io_graph.cpp:190
bool needRetap() const
Checks if changing the graph configuration requires a packet retap.
Definition io_graph.h:122
void setPlotStyle(PlotStyles style)
Sets the visual plotting style for this specific IO graph.
Definition io_graph.cpp:200
format_size_units_e formatUnits() const
Retrieves the size formatting enumerator for the Y-axis units.
Definition io_graph.cpp:405
unsigned int movingAveragePeriod() const
Retrieves the period used for moving average calculations.
Definition io_graph.h:182
int maxInterval() const
Retrieves the maximum populated interval index.
Definition io_graph.h:217
bool hasItemToShow(int idx, double value) const
Checks if a specific data item index has a valid value to display.
Definition io_graph.cpp:516
QString configError() const
Retrieves the current configuration error string, if any.
Definition io_graph.h:85
double getItemValue(int idx, const capture_file *cap_file) const
Calculates or retrieves the formatted value for a specific data item index.
Definition io_graph.cpp:566
io_graph_item_unit_t
Selects the Y-axis value unit or aggregate calculation mode for an I/O graph plot.
Definition io_graph_item.h:29
@ IOG_ITEM_UNIT_CALC_FIELDS
Definition io_graph_item.h:36
@ IOG_ITEM_UNIT_BITS
Definition io_graph_item.h:33
@ IOG_ITEM_UNIT_CALC_SUM
Definition io_graph_item.h:34
@ IOG_ITEM_UNIT_CALC_MIN
Definition io_graph_item.h:38
@ IOG_ITEM_UNIT_CALC_THROUGHPUT
Definition io_graph_item.h:40
@ IOG_ITEM_UNIT_BYTES
Definition io_graph_item.h:32
@ IOG_ITEM_UNIT_CALC_FRAMES
Definition io_graph_item.h:35
@ IOG_ITEM_UNIT_PACKETS
Definition io_graph_item.h:31
@ IOG_ITEM_UNIT_CALC_LOAD
Definition io_graph_item.h:41
@ IOG_ITEM_UNIT_CALC_MAX
Definition io_graph_item.h:37
@ IOG_ITEM_UNIT_CALC_AVERAGE
Definition io_graph_item.h:39
format_size_units_e
Unit types used by format_size_wmem() for formatting size values.
Definition str_util.h:327
Represents a capture file and its associated metadata.
Definition cfile.h:84
Represents the metadata and indexing information for a single captured frame.
Definition packet_info.h:43
Mapping between a 32-bit integer value and its string representation.
Definition value_string.h:33
Holds all state for the dissection of a single byte array, including session, buffer,...
Definition epan_dissect.h:28
tap_packet_status
Definition tap.h:22