ms: Add first_common_ts method to GprsMs

This method gets the index (0 based) of first common time slot used
by the TBFs attach to it. It expects that all of them have the same
notion of this. If no TBF is attached, -1 will be returned.

Sponsored-by: On-Waves ehf
This commit is contained in:
Jacob Erlbeck 2015-06-29 14:05:55 +02:00
parent ccc34e4d30
commit 699b8dca49
2 changed files with 13 additions and 0 deletions

View File

@ -518,3 +518,14 @@ uint8_t GprsMs::current_cs_dl() const
return cs;
}
int GprsMs::first_common_ts() const
{
if (m_dl_tbf)
return m_dl_tbf->first_common_ts;
if (m_ul_tbf)
return m_ul_tbf->first_common_ts;
return -1;
}

View File

@ -76,6 +76,8 @@ public:
uint8_t current_cs_ul() const;
uint8_t current_cs_dl() const;
int first_common_ts() const;
gprs_llc_queue *llc_queue();
const gprs_llc_queue *llc_queue() const;