aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2015-10-21 02:18:23 -0700
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2015-10-21 09:20:36 +0000
commitfd5aa7d00b793ae387134045d70f04d9edd05508 (patch)
tree12f2f9ec7d39250fc3abb2dfde5e0b40dc181beb
parent4a5977b587deeca40d9bbdd55a0ebf3f33059372 (diff)
LTE RLC graph: Only enable graph buttons for directions with data
Change-Id: I80248aa6cf26a68c0d3aeff01c6c0e97951d1eed Reviewed-on: https://code.wireshark.org/review/11189 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
-rw-r--r--ui/qt/lte_rlc_statistics_dialog.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/ui/qt/lte_rlc_statistics_dialog.cpp b/ui/qt/lte_rlc_statistics_dialog.cpp
index 022da8d1e6..f0c57c9563 100644
--- a/ui/qt/lte_rlc_statistics_dialog.cpp
+++ b/ui/qt/lte_rlc_statistics_dialog.cpp
@@ -105,11 +105,13 @@ typedef struct rlc_channel_stats {
guint32 UL_bytes;
nstime_t UL_time_start;
nstime_t UL_time_stop;
+ gboolean UL_has_data; // i.e. not just ACKs for DL.
guint32 DL_frames;
guint32 DL_bytes;
nstime_t DL_time_start;
nstime_t DL_time_stop;
+ gboolean DL_has_data; // i.e. not just ACKs for UL.
guint32 UL_acks;
guint32 UL_nacks;
@@ -213,6 +215,9 @@ public:
if (tap_info->isControlPDU) {
stats_.UL_acks++;
}
+ else {
+ stats_.UL_has_data = TRUE;
+ }
}
else {
// Update time range.
@@ -228,6 +233,9 @@ public:
if (tap_info->isControlPDU) {
stats_.DL_acks++;
}
+ else {
+ stats_.DL_has_data = TRUE;
+ }
}
}
@@ -326,6 +334,9 @@ public:
unsigned get_channelId() const { return channelId_; }
unsigned get_mode() const { return mode_; }
+ bool hasULData() const { return stats_.UL_has_data != 0; }
+ bool hasDLData() const { return stats_.DL_has_data != 0; }
+
private:
unsigned ueid_;
unsigned channelType_;
@@ -854,14 +865,17 @@ void LteRlcStatisticsDialog::updateItemSelectionChanged()
{
updateHeaderLabels();
- bool enableGraphButtons = false;
+ bool enableULGraphButton = false, enableDLGraphButton = false;
if (statsTreeWidget()->selectedItems().count() > 0 && statsTreeWidget()->selectedItems()[0]->type() == rlc_channel_row_type_) {
- enableGraphButtons = true;
+ QTreeWidgetItem *ti = statsTreeWidget()->selectedItems()[0];
+ RlcChannelTreeWidgetItem *rc_ti = static_cast<RlcChannelTreeWidgetItem*>(ti);
+ enableULGraphButton = rc_ti->hasULData();
+ enableDLGraphButton = rc_ti->hasDLData();
}
// Only enabling graph buttons for channel entries.
- launchULGraph_->setEnabled(enableGraphButtons);
- launchDLGraph_->setEnabled(enableGraphButtons);
+ launchULGraph_->setEnabled(enableULGraphButton);
+ launchDLGraph_->setEnabled(enableDLGraphButton);
}
void LteRlcStatisticsDialog::updateHeaderLabels()