diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-03-20 14:41:50 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-03-25 12:10:45 +0100 |
commit | eceb910fef8b6ebfba5aa9b13ffbccfe322d9706 (patch) | |
tree | cec328c385d3a71da4c29e859a7b4ea7e7bc44e7 /src/tbf.h | |
parent | 95340242ed1089e30b9a3045ea55bc9068432e0b (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.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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); |