update epan/dissectors/pidl/drsuapi/drsuapi.idl from samba
[wireshark-sm.git] / ui / qt / lte_mac_statistics_dialog.h
blobc3ea692dc416b17dce0f265cb140f4fe027d6034
1 /** @file
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
10 #ifndef __LTE_MAC_STATISTICS_DIALOG_H__
11 #define __LTE_MAC_STATISTICS_DIALOG_H__
13 #include "tap_parameter_dialog.h"
15 #include <QLabel>
16 #include <QCheckBox>
18 #include <ui/qt/models/percent_bar_delegate.h>
20 // Common channel stats
21 typedef struct mac_3gpp_common_stats {
22 uint32_t all_frames;
23 uint32_t mib_frames;
24 uint32_t sib_frames;
25 uint32_t sib_bytes;
26 uint32_t pch_frames;
27 uint32_t pch_bytes;
28 uint32_t pch_paging_ids;
29 uint32_t rar_frames;
30 uint32_t rar_entries;
32 uint16_t max_ul_ues_in_tti;
33 uint16_t max_dl_ues_in_tti;
34 } mac_3gpp_common_stats;
37 class LteMacStatisticsDialog : public TapParameterDialog
39 Q_OBJECT
41 public:
42 LteMacStatisticsDialog(QWidget &parent, CaptureFile &cf, const char *filter);
43 ~LteMacStatisticsDialog();
45 protected:
46 void captureFileClosing();
48 private:
49 // Extra controls needed for this dialog.
50 QLabel *commonStatsLabel_;
51 QCheckBox *showSRFilterCheckBox_;
52 QCheckBox *showRACHFilterCheckBox_;
53 PercentBarDelegate *ul_delegate_, *dl_delegate_;
54 QString displayFilter_;
56 // Callbacks for register_tap_listener
57 static void tapReset(void *ws_dlg_ptr);
58 static tap_packet_status tapPacket(void *ws_dlg_ptr, struct _packet_info *, struct epan_dissect *, const void *mac_3gpp_tap_info_ptr, tap_flags_t flags);
59 static void tapDraw(void *ws_dlg_ptr);
61 virtual const QString filterExpression();
63 // Common stats.
64 mac_3gpp_common_stats commonStats_;
65 bool commonStatsCurrent_; // Set when changes have not yet been drawn
66 void updateCommonStats(const struct mac_3gpp_tap_info *mlt_info);
67 void drawCommonStats();
68 void clearCommonStats();
70 unsigned getFrameCount();
72 QList<QVariant> treeItemData(QTreeWidgetItem *item) const;
74 private slots:
75 virtual void fillTree();
76 void updateHeaderLabels();
77 void filterUpdated(QString filter);
80 #endif // __LTE_MAC_STATISTICS_DIALOG_H__