diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-03-20 14:53:54 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-03-25 12:12:27 +0100 |
commit | 005ee7f8626d4733e8fa01f3589154287ed163ed (patch) | |
tree | 2750793d56cf9eac54f5e66933f7a716162e7086 /src/tbf.cpp | |
parent | 2493c660e9cbede4ac43f2584c0a8e6d8625e1dd (diff) |
tbf: Add frames_since_last_poll method
This functions calculates the number of frames that have passed since
the last DL poll (RRBP flag set) has been sent. It returns a value
less than zero (fn_now - fn_sched) if the block has been scheduled but
not yet sent.
If the function is called before the first data block has been sent
it will return -1.
If the function is called before the first DL poll is sent, it
returns the number of frames since the first data block has been
sent.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf.cpp')
-rw-r--r-- | src/tbf.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp index 388f82d7..56804c32 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -470,6 +470,8 @@ struct gprs_rlcmac_dl_tbf *tbf_alloc_dl_tbf(struct gprs_rlcmac_bts *bts, llist_add(&tbf->list.list, &bts->dl_tbfs); tbf->bts->tbf_dl_created(); + tbf->m_last_dl_poll_fn = -1; + gettimeofday(&tbf->m_bw.dl_bw_tv, NULL); gettimeofday(&tbf->m_bw.dl_loss_tv, NULL); |