aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-03-20 14:53:54 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-03-25 12:12:27 +0100
commit005ee7f8626d4733e8fa01f3589154287ed163ed (patch)
tree2750793d56cf9eac54f5e66933f7a716162e7086 /src/tbf.h
parent2493c660e9cbede4ac43f2584c0a8e6d8625e1dd (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.h')
-rw-r--r--src/tbf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tbf.h b/src/tbf.h
index ba7af36f..ca5fedff 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -325,6 +325,7 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf {
void request_dl_ack();
bool need_control_ts() const;
bool have_data() const;
+ int frames_since_last_poll(unsigned fn) const;
bool is_control_ts(uint8_t ts) const {
return ts == control_ts;
@@ -342,6 +343,7 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf {
int32_t m_tx_counter; /* count all transmitted blocks */
uint8_t m_wait_confirm; /* wait for CCCH IMM.ASS cnf */
bool m_dl_ack_requested;
+ int32_t m_last_dl_poll_fn;
struct {
struct timeval dl_bw_tv; /* timestamp for dl bw calculation */