aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.h
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-12-15 11:21:57 +0100
committerMax <msuraev@sysmocom.de>2018-01-04 10:15:59 +0000
commita4f570fe7a9e511d04ba3aade4a144b4cb74deb8 (patch)
tree22cbfd891c3f3dfa9f0698850bc9c0a520bb597a /src/tbf.h
parent7df82d412eca327b94f6040a140d1f8d5d9c7c53 (diff)
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
Diffstat (limited to 'src/tbf.h')
-rw-r--r--src/tbf.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/tbf.h b/src/tbf.h
index f57dbe3..9491f2a 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);