|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
Represents an individual input/output graph, handling tapping, packet processing, and data scaling. More...
#include <io_graph.h>
Public Slots | |
| void | recalcGraphData (capture_file *cap_file) |
| Recalculates the graph plotting data based on cached tap data. | |
| void | captureEvent (const CaptureEvent &e) |
| Handles system capture events. | |
| void | reloadValueUnitField () |
| Reloads and re-evaluates the value unit field setting. | |
Public Member Functions | |
| IOGraph (QCustomPlot *parent, const char *type_unit_name) | |
| Constructs a new IOGraph. | |
| ~IOGraph () | |
| Destroys the IOGraph. | |
| QString | configError () const |
| Retrieves the current configuration error string, if any. | |
| void | setAOT (bool asAOT) |
| Sets whether the graph displays values as an Average Over Time (AOT). | |
| bool | getAOT () const |
| Checks if the graph displays values as an Average Over Time (AOT). | |
| QString | filter () const |
| Retrieves the active filter string for this graph. | |
| bool | setFilter (const QString &filter) |
| Sets the filter string for this graph. | |
| void | setVisible (bool visible) |
| Sets the visibility of the graph. | |
| bool | needRetap () const |
| Checks if changing the graph configuration requires a packet retap. | |
| void | setNeedRetap (bool retap) |
| Manually flags whether a retap is required. | |
| void | setPlotStyle (PlotStyles style) |
| Sets the visual plotting style for this specific IO graph. | |
| QString | valueUnitLabel () const |
| Generates the label for the value (Y-axis) units. | |
| format_size_units_e | formatUnits () const |
| Retrieves the size formatting enumerator for the Y-axis units. | |
| io_graph_item_unit_t | valueUnits () const |
| Retrieves the core IO graph item unit type. | |
| void | setValueUnits (int val_units) |
| Sets the core IO graph item unit type. | |
| QString | valueUnitField () const |
| Retrieves the field used to calculate the value units (e.g., specific protocol field). | |
| void | setValueUnitField (const QString &vu_field) |
| Sets the field used to calculate the value units. | |
| nstime_t | startTime () const |
| Retrieves the starting time of the graph data. | |
| unsigned int | movingAveragePeriod () const |
| Retrieves the period used for moving average calculations. | |
| void | setInterval (int interval) |
| Sets the time interval for data bucketing. | |
| int | packetFromTime (double ts) const |
| Determines the packet number closest to a specific timestamp. | |
| bool | hasItemToShow (int idx, double value) const |
| Checks if a specific data item index has a valid value to display. | |
| double | getItemValue (int idx, const capture_file *cap_file) const |
| Calculates or retrieves the formatted value for a specific data item index. | |
| int | maxInterval () const |
| Retrieves the maximum populated interval index. | |
| void | clearAllData () |
| Clears all cached plotting and tap data. | |
Public Member Functions inherited from Graph | |
| Graph (QCustomPlot *parent, QCPAxis *keyAxis=nullptr, QCPAxis *valueAxis=nullptr) | |
| Constructs a new Graph. | |
| ~Graph () | |
| Destroys the Graph. | |
| QString | name () const |
| Retrieves the name of the graph. | |
| void | setName (const QString &name) |
| Sets the name of the graph. | |
| QRgb | color () const |
| Retrieves the color of the graph. | |
| void | setColor (const QRgb color) |
| Sets the color of the graph. | |
| bool | visible () const |
| Checks if the graph is currently visible. | |
| void | setVisible (bool visible) |
| Sets the visibility of the graph. | |
| double | yAxisFactor () const |
| Retrieves the scaling factor for the Y-axis. | |
| void | setYAxisFactor (double y_axis_factor) |
| Sets the scaling factor for the Y-axis. | |
| QCPGraph * | graph () const |
| Retrieves the underlying QCPGraph object. | |
| QCPBars * | bars () const |
| Retrieves the underlying QCPBars object. | |
| bool | addToLegend () |
| Adds the graph to the parent plot's legend. | |
| bool | setPlotStyle (PlotStyles style) |
| Sets the visual style of the plot. | |
Public Attributes | |
| unsigned int | moving_avg_period_ |
Public Attributes inherited from Graph | |
| const qreal | graph_line_width_ = 1.0 |
Additional Inherited Members | |
Public Types inherited from Graph | |
| enum | PlotStyles { psLine , psDotLine , psStepLine , psDotStepLine , psImpulse , psBar , psStackedBar , psDot , psSquare , psDiamond , psCross , psPlus , psCircle } |
| Defines the available visual styles for plotting data. More... | |
Static Public Attributes inherited from Graph | |
| static constexpr double | default_y_axis_factor_ = 1 |
Protected Member Functions inherited from Graph | |
| void | applyCurrentColor () |
| Applies the currently set color to the underlying graphical elements. | |
| bool | removeFromLegend () |
| Removes the graph from the parent plot's legend. | |
| void | clearAllData () |
| Clears all data points currently loaded into the graph. | |
Protected Attributes inherited from Graph | |
| QCustomPlot * | parent_ |
| QCPGraph * | graph_ |
| QCPBars * | bars_ |
| QString | name_ |
| QBrush | color_ |
| bool | visible_ |
| double | y_axis_factor_ |
Represents an individual input/output graph, handling tapping, packet processing, and data scaling.
|
explicit |
Constructs a new IOGraph.
| parent | The parent QCustomPlot widget. |
| type_unit_name | The name string representing the graph's unit type. |
|
slot |
Handles system capture events.
| e | The capture event. |
|
inline |
Retrieves the current configuration error string, if any.
|
inline |
Retrieves the active filter string for this graph.
| format_size_units_e IOGraph::formatUnits | ( | ) | const |
Retrieves the size formatting enumerator for the Y-axis units.
|
inline |
Checks if the graph displays values as an Average Over Time (AOT).
| double IOGraph::getItemValue | ( | int | idx, |
| const capture_file * | cap_file | ||
| ) | const |
Calculates or retrieves the formatted value for a specific data item index.
| idx | The item index. |
| cap_file | The capture file context. |
| bool IOGraph::hasItemToShow | ( | int | idx, |
| double | value | ||
| ) | const |
Checks if a specific data item index has a valid value to display.
| idx | The item index. |
| value | The value associated with the index. |
|
inline |
Retrieves the maximum populated interval index.
|
inline |
Retrieves the period used for moving average calculations.
|
inline |
Checks if changing the graph configuration requires a packet retap.
| int IOGraph::packetFromTime | ( | double | ts | ) | const |
Determines the packet number closest to a specific timestamp.
| ts | The timestamp to search for. |
|
slot |
Recalculates the graph plotting data based on cached tap data.
| cap_file | The capture file context. |
| void IOGraph::setAOT | ( | bool | asAOT | ) |
Sets whether the graph displays values as an Average Over Time (AOT).
| asAOT | True to enable AOT interpretation. |
| bool IOGraph::setFilter | ( | const QString & | filter | ) |
Sets the filter string for this graph.
| filter | The new filter string. |
| void IOGraph::setInterval | ( | int | interval | ) |
Sets the time interval for data bucketing.
| interval | The interval in milliseconds. |
| void IOGraph::setNeedRetap | ( | bool | retap | ) |
Manually flags whether a retap is required.
| retap | True to flag for a retap. |
| void IOGraph::setPlotStyle | ( | PlotStyles | style | ) |
Sets the visual plotting style for this specific IO graph.
| style | The desired PlotStyles value. |
| void IOGraph::setValueUnitField | ( | const QString & | vu_field | ) |
Sets the field used to calculate the value units.
| vu_field | The new value unit field string. |
| void IOGraph::setValueUnits | ( | int | val_units | ) |
Sets the core IO graph item unit type.
| val_units | The new io_graph_item_unit_t integer value. |
| void IOGraph::setVisible | ( | bool | visible | ) |
Sets the visibility of the graph.
| visible | True to show the graph, false to hide it. |
| nstime_t IOGraph::startTime | ( | ) | const |
Retrieves the starting time of the graph data.
|
inline |
Retrieves the field used to calculate the value units (e.g., specific protocol field).
| QString IOGraph::valueUnitLabel | ( | ) | const |
Generates the label for the value (Y-axis) units.
|
inline |
Retrieves the core IO graph item unit type.
| unsigned int IOGraph::moving_avg_period_ |
The active moving average period.