2021-11-30 13:01:36 +00:00
|
|
|
/** @file
|
2015-09-20 07:42:11 +00:00
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-04-30 07:47:58 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2015-09-20 07:42:11 +00:00
|
|
|
|
|
|
|
#ifndef __LTE_MAC_STATISTICS_DIALOG_H__
|
|
|
|
#define __LTE_MAC_STATISTICS_DIALOG_H__
|
|
|
|
|
|
|
|
#include "tap_parameter_dialog.h"
|
|
|
|
|
|
|
|
#include <QLabel>
|
2015-10-13 11:29:34 +00:00
|
|
|
#include <QCheckBox>
|
2015-09-20 07:42:11 +00:00
|
|
|
|
2020-04-27 20:46:02 +00:00
|
|
|
#include <ui/qt/models/percent_bar_delegate.h>
|
2015-09-20 07:42:11 +00:00
|
|
|
|
|
|
|
// Common channel stats
|
|
|
|
typedef struct mac_lte_common_stats {
|
|
|
|
guint32 all_frames;
|
|
|
|
guint32 mib_frames;
|
|
|
|
guint32 sib_frames;
|
|
|
|
guint32 sib_bytes;
|
|
|
|
guint32 pch_frames;
|
|
|
|
guint32 pch_bytes;
|
|
|
|
guint32 pch_paging_ids;
|
|
|
|
guint32 rar_frames;
|
|
|
|
guint32 rar_entries;
|
|
|
|
|
|
|
|
guint16 max_ul_ues_in_tti;
|
|
|
|
guint16 max_dl_ues_in_tti;
|
|
|
|
} mac_lte_common_stats;
|
|
|
|
|
|
|
|
|
|
|
|
class LteMacStatisticsDialog : public TapParameterDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
LteMacStatisticsDialog(QWidget &parent, CaptureFile &cf, const char *filter);
|
|
|
|
~LteMacStatisticsDialog();
|
|
|
|
|
2015-10-15 12:19:33 +00:00
|
|
|
protected:
|
2021-01-10 20:57:47 +00:00
|
|
|
void captureFileClosing();
|
2015-10-15 12:19:33 +00:00
|
|
|
|
|
|
|
private:
|
2015-10-13 11:29:34 +00:00
|
|
|
// Extra controls needed for this dialog.
|
|
|
|
QLabel *commonStatsLabel_;
|
|
|
|
QCheckBox *showSRFilterCheckBox_;
|
|
|
|
QCheckBox *showRACHFilterCheckBox_;
|
2020-04-27 20:46:02 +00:00
|
|
|
PercentBarDelegate *ul_delegate_, *dl_delegate_;
|
2017-11-25 15:08:08 +00:00
|
|
|
QString displayFilter_;
|
2015-09-20 07:42:11 +00:00
|
|
|
|
|
|
|
// Callbacks for register_tap_listener
|
|
|
|
static void tapReset(void *ws_dlg_ptr);
|
2022-06-09 15:47:35 +00:00
|
|
|
static tap_packet_status tapPacket(void *ws_dlg_ptr, struct _packet_info *, struct epan_dissect *, const void *mac_lte_tap_info_ptr, tap_flags_t flags);
|
2015-09-20 07:42:11 +00:00
|
|
|
static void tapDraw(void *ws_dlg_ptr);
|
|
|
|
|
|
|
|
virtual const QString filterExpression();
|
|
|
|
|
2015-10-20 14:07:10 +00:00
|
|
|
// Common stats.
|
|
|
|
mac_lte_common_stats commonStats_;
|
2017-12-27 23:38:42 +00:00
|
|
|
bool commonStatsCurrent_; // Set when changes have not yet been drawn
|
2015-09-20 07:42:11 +00:00
|
|
|
void updateCommonStats(const struct mac_lte_tap_info *mlt_info);
|
2015-10-13 11:29:34 +00:00
|
|
|
void drawCommonStats();
|
2015-09-20 07:42:11 +00:00
|
|
|
void clearCommonStats();
|
|
|
|
|
|
|
|
unsigned getFrameCount();
|
|
|
|
|
2017-12-21 21:09:55 +00:00
|
|
|
QList<QVariant> treeItemData(QTreeWidgetItem *item) const;
|
|
|
|
|
2015-09-20 07:42:11 +00:00
|
|
|
private slots:
|
|
|
|
virtual void fillTree();
|
|
|
|
void updateHeaderLabels();
|
2017-11-25 15:08:08 +00:00
|
|
|
void filterUpdated(QString filter);
|
2015-09-20 07:42:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __LTE_MAC_STATISTICS_DIALOG_H__
|