From 6ff18272e06c41638648ad7f0123f370edbb2b6b Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Tue, 29 Mar 2022 13:56:12 +0100 Subject: [PATCH] lib,rlc_am_nr: added debug_window function --- lib/include/srsran/rlc/rlc_am_nr.h | 3 ++- lib/src/rlc/rlc_am_nr.cc | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/include/srsran/rlc/rlc_am_nr.h b/lib/include/srsran/rlc/rlc_am_nr.h index 7e5d97873..c48eb270f 100644 --- a/lib/include/srsran/rlc/rlc_am_nr.h +++ b/lib/include/srsran/rlc/rlc_am_nr.h @@ -181,9 +181,10 @@ public: rlc_am_nr_tx_state_t get_tx_state() { return st; } // This should only be used for testing. uint32_t get_tx_window_utilization() { return tx_window->size(); } // This should only be used for testing. - // Debug Helper + // Debug Helpers void debug_state() const; void info_state() const; + void debug_window() const; }; /**************************************************************************** diff --git a/lib/src/rlc/rlc_am_nr.cc b/lib/src/rlc/rlc_am_nr.cc index 2a0d21855..374701e2c 100644 --- a/lib/src/rlc/rlc_am_nr.cc +++ b/lib/src/rlc/rlc_am_nr.cc @@ -1220,6 +1220,7 @@ void rlc_am_nr_tx::debug_state() const st.pdu_without_poll, st.byte_without_poll); } + void rlc_am_nr_tx::info_state() const { RlcInfo("TX window state: SDUs %d", tx_window->size()); @@ -1230,6 +1231,11 @@ void rlc_am_nr_tx::info_state() const st.pdu_without_poll, st.byte_without_poll); } + +void rlc_am_nr_tx::debug_window() const +{ + RlcDebug("TX window state: Tx_Next_Ack=%d, Tx_Next=%d, SDUs=%d", st.tx_next_ack, st.tx_next, tx_window->size()); +} /**************************************************************************** * Rx subclass implementation ***************************************************************************/