13#ifndef INTERFACE_STATS_WORKER_H
14#define INTERFACE_STATS_WORKER_H
166 void failed(
int exitCode,
const QString &errorMessage);
195 void assertWorkerThread()
const;
197 QStringList interfaceFilter_;
198 int updateIntervalMsec_;
201 ws_process_id forkChild_;
void setUpdateInterval(int intervalMsec)
Sets the pipe-drain/emit interval.
Definition interface_stats_worker.cpp:106
InterfaceStatsWorker(QObject *parent=nullptr)
Constructs an idle worker with the default update interval.
Definition interface_stats_worker.cpp:42
void failed(int exitCode, const QString &errorMessage)
Emitted when the stream could not be opened or has broken.
void resume()
Re-opens the stream previously suspended with pause().
Definition interface_stats_worker.cpp:136
void started()
Emitted once the dumpcap stream has been opened successfully.
void sampled(const InterfaceStatsSnapshot &snapshot)
Emitted each cycle in which new counters were read.
int updateInterval() const
Returns the current pipe-drain/emit interval, in milliseconds.
Definition interface_stats_worker.cpp:118
void stop()
Stops sampling and tears down the dumpcap stream and process.
Definition interface_stats_worker.cpp:87
void stopped()
Emitted after the stream and process have been torn down.
void setInterfaceFilter(const QStringList &interfaceNames)
Restricts which interfaces appear in emitted snapshots.
Definition interface_stats_worker.cpp:100
void start()
Opens the dumpcap statistics stream and begins periodic sampling.
Definition interface_stats_worker.cpp:70
void pause()
Tears down the dumpcap stream but remembers the configuration.
Definition interface_stats_worker.cpp:123
QHash< QString, InterfaceStatsSample > InterfaceStatsSnapshot
A full set of per-interface counters keyed by interface name.
Definition interface_stats_worker.h:42
Cumulative packet counters for a single interface, as reported by dumpcap's statistics stream.
Definition interface_stats_worker.h:36
quint64 droppedPackets
Definition interface_stats_worker.h:38
quint64 receivedPackets
Definition interface_stats_worker.h:37