aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-03-20 14:41:50 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-03-25 12:10:45 +0100
commiteceb910fef8b6ebfba5aa9b13ffbccfe322d9706 (patch)
treecec328c385d3a71da4c29e859a7b4ea7e7bc44e7 /src/tbf.h
parent95340242ed1089e30b9a3045ea55bc9068432e0b (diff)
tbf: Add helper functions for DL TBFs
Some properties of a DL TBF are explicitly calculated within modules using DL TBFs. This commit introduces the methods need_control_ts(), have_data(), is_control_ts() to hide internals of the DL TBF implementation. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf.h')
-rw-r--r--src/tbf.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tbf.h b/src/tbf.h
index 8a2da963..ba7af36f 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -323,6 +323,12 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf {
int rcvd_dl_ack(uint8_t final, uint8_t ssn, uint8_t *rbb);
struct msgb *create_dl_acked_block(uint32_t fn, uint8_t ts);
void request_dl_ack();
+ bool need_control_ts() const;
+ bool have_data() const;
+
+ bool is_control_ts(uint8_t ts) const {
+ return ts == control_ts;
+ }
/* TODO: add the gettimeofday as parameter */
struct msgb *llc_dequeue(bssgp_bvc_ctx *bctx);