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:
parent
db88380b76
commit
13965aed74
12
src/tbf.h
12
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
|
||||
|
|
Loading…
Reference in New Issue