1 /* lte_rlc_statistics_dialog.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 
10 #ifndef __LTE_RLC_STATISTICS_DIALOG_H__
11 #define __LTE_RLC_STATISTICS_DIALOG_H__
12 
13 #include "tap_parameter_dialog.h"
14 
15 #include <QCheckBox>
16 
17 class LteRlcStatisticsDialog : public TapParameterDialog
18 {
19     Q_OBJECT
20 
21 public:
22     LteRlcStatisticsDialog(QWidget &parent, CaptureFile &cf, const char *filter);
23     ~LteRlcStatisticsDialog();
24 
getFrameCount()25     unsigned getFrameCount() { return packet_count_; }
incFrameCount()26     void     incFrameCount() { ++packet_count_; }
27 
28 protected:
29     void captureFileClosing();
30 
31 signals:
32     void launchRLCGraph(bool channelKnown,
33                         guint16 ueid, guint8 rlcMode,
34                         guint16 channelType, guint16 channelId,
35                         guint8 direction);
36 
37 private:
38     // Extra controls needed for this dialog.
39     QCheckBox *useRLCFramesFromMacCheckBox_;
40     QCheckBox *showSRFilterCheckBox_;
41     QCheckBox *showRACHFilterCheckBox_;
42     QPushButton *launchULGraph_;
43     QPushButton *launchDLGraph_;
44     QString     displayFilter_;
45 
46     CaptureFile &cf_;
47     int packet_count_;
48 
49     // Callbacks for register_tap_listener
50     static void tapReset(void *ws_dlg_ptr);
51     static tap_packet_status tapPacket(void *ws_dlg_ptr, struct _packet_info *, struct epan_dissect *, const void *rlc_lte_tap_info_ptr);
52     static void tapDraw(void *ws_dlg_ptr);
53 
54     void updateHeaderLabels();
55 
56     virtual const QString filterExpression();
57 
58     QList<QVariant> treeItemData(QTreeWidgetItem *item) const;
59 
60 private slots:
61     virtual void fillTree();
62     void updateItemSelectionChanged();
63 
64     void useRLCFramesFromMacCheckBoxToggled(bool state);
65     void launchULGraphButtonClicked();
66     void launchDLGraphButtonClicked();
67     void filterUpdated(QString filter);
68 };
69 
70 #endif // __LTE_RLC_STATISTICS_DIALOG_H__
71