Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
dis_stream_analysis_dialog.h
Go to the documentation of this file.
1
10#ifndef DIS_STREAM_ANALYSIS_DIALOG_H
11#define DIS_STREAM_ANALYSIS_DIALOG_H
12
13#include <mutex>
14
15#include <QDialogButtonBox>
16#include <QTreeWidget>
17#include <QLabel>
18#include <QProgressBar>
19#include <QPushButton>
20
21#ifdef QT_MULTIMEDIA_LIB
22#include <QAudio>
23#endif
24
25#include "capture_file.h"
26#include "wireshark_dialog.h"
27
28#include "ui/tap-dis-common.h"
29
30class QComboBox;
31class QCustomPlot;
32class QCPItemStraightLine;
33class QMouseEvent;
34
39{
40 Q_OBJECT
41
42public:
50 static DisStreamAnalysisDialog *openDisStreamAnalysisDialog(QWidget &parent, CaptureFile &cf, QObject *packet_list);
51
56 void selectStream(disstream_info_t *stream_info);
57
63
68 void operator=(const DisStreamAnalysisDialog &) = delete;
69
70signals:
75 void goToPacket(int packet_num);
76
77protected:
84 explicit DisStreamAnalysisDialog(QWidget &parent, CaptureFile &cf, QObject *packet_list);
85
90
94 void captureFileClosing() override;
95
99 void captureFileClosed() override;
100
101private:
103 static DisStreamAnalysisDialog *pinstance_;
104
106 static std::mutex mutex_;
107
109 QComboBox *stream_combo_;
110
112 QCustomPlot *audio_plot_;
113
115 QTreeWidget *packet_tree_;
116
118 QLabel *duration_label_;
119
121 QLabel *packets_label_;
122
124 QLabel *signal_label_;
125
127 QLabel *tx_label_;
128
130 QLabel *lost_label_;
131
133 QLabel *jitter_label_;
134
136 QLabel *delta_label_;
137
139 QLabel *codec_label_;
140
142 QLabel *hint_label_;
143
145 QProgressBar *playback_progress_;
146
148 QLabel *playback_time_label_;
149
151 QDialogButtonBox *button_box_;
152
154 QPushButton *play_button_;
155
157 QPushButton *stop_button_;
158
160 QPushButton *goto_button_;
161
163 QCPItemStraightLine *start_marker_pos_;
164
166 QCPItemStraightLine *playback_marker_pos_;
167
169 double start_marker_time_;
170
172 double playback_marker_time_;
173
175 bool need_redraw_;
176
178 bool have_requested_stream_;
179
181 disstream_id_t requested_stream_id_;
182
184 QObject *packet_list_;
185
186#ifdef QT_MULTIMEDIA_LIB
188 class DisAudioStream *audio_stream_;
189#endif
190
192 disstream_tapinfo_t tapinfo_;
193
198 static void tapReset(disstream_tapinfo_t *tapinfo);
199
204 static void tapDraw(disstream_tapinfo_t *tapinfo);
205
210 disstream_info_t *selectedStream() const;
211
215 void updateStreams();
216
220 void updateWidgets() override;
221
225 void updateAnalysis();
226
230 void updatePacketRows();
231
235 void updatePlot();
236
240 void updateHintLabel();
241
246 double selectedStartTime() const;
247
252 void setStartPlayMarker(double new_time);
253
257 void drawStartPlayMarker();
258
264 void setPlaybackMarker(double new_time, bool visible);
265
269 void drawPlaybackMarker();
270
271private slots:
276 void onStreamChanged(int index);
277
281 void onGoToPacket();
282
288 void onPacketRowActivated(QTreeWidgetItem *item, int column);
289
294 void onGraphDoubleClicked(QMouseEvent *event);
295
296#ifdef QT_MULTIMEDIA_LIB
300 void onPlayPauseStream();
301
305 void onStopStream();
306
312 void onPlaybackProgress(double position_secs, double duration_secs);
313
318 void onPlaybackStateChanged(QAudio::State state _U_);
319#endif
320
325 void onCaptureEvent(CaptureEvent e);
326};
327
328#endif /* DIS_STREAM_ANALYSIS_DIALOG_H */
Represents an event occurring during a capture or file operation.
Definition capture_event.h:24
Manages a capture file and its associated state and operations.
Definition capture_file.h:27
A dialog for analyzing and interacting with DIS (Distributed Interactive Simulation) streams.
Definition dis_stream_analysis_dialog.h:39
void operator=(const DisStreamAnalysisDialog &)=delete
Deleted assignment operator to enforce singleton pattern.
void selectStream(disstream_info_t *stream_info)
Selects and loads a specific DIS stream for analysis.
Definition dis_stream_analysis_dialog.cpp:54
static DisStreamAnalysisDialog * openDisStreamAnalysisDialog(QWidget &parent, CaptureFile &cf, QObject *packet_list)
Opens or retrieves the singleton instance of the DisStreamAnalysisDialog.
Definition dis_stream_analysis_dialog.cpp:42
void captureFileClosed() override
Slot triggered when the capture file is fully closed.
Definition dis_stream_analysis_dialog.cpp:236
~DisStreamAnalysisDialog()
Destroys the DisStreamAnalysisDialog.
Definition dis_stream_analysis_dialog.cpp:210
DisStreamAnalysisDialog(DisStreamAnalysisDialog &other)=delete
Deleted copy constructor to enforce singleton pattern.
void goToPacket(int packet_num)
Signal emitted to navigate the main UI to a specific packet number.
void captureFileClosing() override
Slot triggered when the capture file begins closing.
Definition dis_stream_analysis_dialog.cpp:226
Base class for Wireshark specific dialogs that require interaction with a CaptureFile.
Definition wireshark_dialog.h:38
Uniquely identifies a DIS (Distributed Interactive Simulation) stream by its network and radio addres...
Definition tap-dis-common.h:26
Aggregated analysis state and statistics for a single DIS stream.
Definition tap-dis-common.h:57
Top-level tap context for DIS stream analysis, holding all discovered streams and tap configuration.
Definition tap-dis-common.h:124