diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-06-12 16:01:56 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-06-12 16:59:11 +0200 |
commit | 53a32b8e95bed5cca800c98861458cbfed753104 (patch) | |
tree | 46a4664853b0875b3a482cd27c1d1c8aafcc14a3 | |
parent | 6634635cf57c551538c43892de3e7eb2e10b1631 (diff) |
ms: Store the NACK rate in the MS object
Currently the NACK/unconfirmed ratio is already passed to the
corresponding MS object, but the value is not being stored there.
This commit adds a member and a getter method and include the values
into the output of the 'show ms' command.
Sponsored-by: On-Waves ehf
-rw-r--r-- | src/gprs_ms.cpp | 5 | ||||
-rw-r--r-- | src/gprs_ms.h | 7 | ||||
-rw-r--r-- | src/pcu_vty_functions.cpp | 3 |
3 files changed, 14 insertions, 1 deletions
diff --git a/src/gprs_ms.cpp b/src/gprs_ms.cpp index fe560e86..b40e1eac 100644 --- a/src/gprs_ms.cpp +++ b/src/gprs_ms.cpp @@ -90,7 +90,8 @@ GprsMs::GprsMs(BTS *bts, uint32_t tlli) : m_is_idle(true), m_ref(0), m_list(this), - m_delay(0) + m_delay(0), + m_nack_rate_dl(0) { LOGP(DRLCMAC, LOGL_INFO, "Creating MS object, TLLI = 0x%08x\n", tlli); @@ -383,6 +384,8 @@ void GprsMs::update_error_rate(gprs_rlcmac_tbf *tbf, int error_rate) /* TODO: Check for TBF direction */ /* TODO: Support different CS values for UL and DL */ + m_nack_rate_dl = error_rate; + if (error_rate > bts_data->cs_adj_upper_limit) { if (m_current_cs_dl > 1) { m_current_cs_dl -= 1; diff --git a/src/gprs_ms.h b/src/gprs_ms.h index 6752b2b6..05387239 100644 --- a/src/gprs_ms.h +++ b/src/gprs_ms.h @@ -99,6 +99,7 @@ public: void update_l1_meas(const pcu_l1_meas *meas); const pcu_l1_meas* l1_meas() const {return &m_l1_meas;}; + unsigned nack_rate_dl() const; /* internal use */ static void timeout(void *priv_); @@ -138,6 +139,7 @@ private: int64_t m_last_cs_not_low; pcu_l1_meas m_l1_meas; + unsigned m_nack_rate_dl; }; inline uint32_t GprsMs::tlli() const @@ -193,3 +195,8 @@ inline const gprs_llc_queue *GprsMs::llc_queue() const return &m_llc_queue; } +inline unsigned GprsMs::nack_rate_dl() const +{ + return m_nack_rate_dl; +} + diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index 4f54e8e2..c8f81988 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -82,6 +82,9 @@ static int show_ms(struct vty *vty, GprsMs *ms) vty_out(vty, " Burst timing offset: %d/4 bit%s", ms->l1_meas()->bto, VTY_NEWLINE); if (ms->l1_meas()->have_ms_rx_qual) + vty_out(vty, " Downlink NACK rate: %d %%%s", + ms->nack_rate_dl(), VTY_NEWLINE); + if (ms->l1_meas()->have_ms_rx_qual) vty_out(vty, " MS RX quality: %d %%%s", ms->l1_meas()->ms_rx_qual, VTY_NEWLINE); if (ms->l1_meas()->have_ms_c_value) |