From a4f570fe7a9e511d04ba3aade4a144b4cb74deb8 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 15 Dec 2017 11:21:57 +0100 Subject: window: move encoding into functions * move window size encoding and writing into separate functions * introduce necessary TBF wrappers to avoid direct m_window access This is part of preparation work to move to separate UL/DL windows. Related: OS#1759 Change-Id: I60184d5049bc7d7b119df5a9eb82d1c4b788c840 --- src/tbf.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/tbf.h') diff --git a/src/tbf.h b/src/tbf.h index f57dbe3c..9491f2a4 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -464,7 +464,7 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf { bool keep_open(unsigned fn) const; int release(); int abort(); - + uint16_t window_size() const; void egprs_calc_window_size(); void update_coding_scheme_counter_dl(const GprsCodingScheme cs); @@ -562,7 +562,7 @@ struct gprs_rlcmac_ul_tbf : public gprs_rlcmac_tbf { uint8_t *data, const uint8_t block_idx); void egprs_calc_ulwindow_size(); - + uint16_t window_size() const; void update_coding_scheme_counter_ul(const GprsCodingScheme cs); /* Please note that all variables here will be reset when changing @@ -599,6 +599,16 @@ inline enum gprs_rlcmac_tbf_direction reverse(enum gprs_rlcmac_tbf_direction dir ((int)GPRS_RLCMAC_UL_TBF - (int)dir + (int)GPRS_RLCMAC_DL_TBF); } +inline uint16_t gprs_rlcmac_ul_tbf::window_size() const +{ + return m_window.ws(); +} + +inline uint16_t gprs_rlcmac_dl_tbf::window_size() const +{ + return m_window.ws(); +} + inline void gprs_rlcmac_ul_tbf::enable_egprs() { m_window.set_sns(RLC_EGPRS_SNS); -- cgit v1.2.3