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
This commit is contained in:
Jacob Erlbeck 2016-01-19 14:10:40 +01:00
parent db88380b76
commit 13965aed74
1 changed files with 12 additions and 0 deletions

View File

@ -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