aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-01-19 14:10:40 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-08 00:45:36 +0100
commit13965aed74ae1c59cfd4f52275ac3e98f9aa9e3a (patch)
treebd2d518a5965d9f1ad4eb27f731849d5cd17ff16
parentdb88380b76e70db4ab3d895102b3e164bf8efe3d (diff)
tbf: Add gprs_rlcmac_tbf::window() method
This method returns a gprs_rlc_window independently of the TBF's direction. Sponsored-by: On-Waves ehf
-rw-r--r--src/tbf.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tbf.h b/src/tbf.h
index 11e1fc7..ab4145c 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -107,6 +107,8 @@ struct gprs_rlcmac_tbf {
GprsMs *ms() const;
void set_ms(GprsMs *ms);
+ gprs_rlc_window *window();
+
uint8_t tsc() const;
int rlcmac_diag();
@@ -460,4 +462,14 @@ inline gprs_rlcmac_dl_tbf *as_dl_tbf(gprs_rlcmac_tbf *tbf)
return NULL;
}
+inline gprs_rlc_window *gprs_rlcmac_tbf::window()
+{
+ switch (direction)
+ {
+ case GPRS_RLCMAC_UL_TBF: return &as_ul_tbf(this)->m_window;
+ case GPRS_RLCMAC_DL_TBF: return &as_dl_tbf(this)->m_window;
+ }
+ return NULL;
+}
+
#endif