aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-11-27 16:17:40 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-12-15 15:17:51 +0100
commit5643f35fb4d09b160c4cd14c8e0ef6f2b7dce07e (patch)
tree85ac0f9b0c7def88a2530eb1ee8b25d5cae8cc57 /src/tbf.h
parent76d767cbe84fbfecfd3003af622f949f04aadbe4 (diff)
edge: Add m_egprs_enabled and related methods to TBF
Add the following methods to gprs_rlcmac_tbf: - is_egprs_enabled - enable_egprs - disable_egprs Also show the value of the flag in name() by displaying "EGPRS" if it is set. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf.h')
-rw-r--r--src/tbf.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tbf.h b/src/tbf.h
index 5b83bed1..43da206d 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -164,6 +164,11 @@ struct gprs_rlcmac_tbf {
uint8_t dl_slots() const;
uint8_t ul_slots() const;
+ /* EGPRS */
+ bool is_egprs_enabled() const;
+ void enable_egprs();
+ void disable_egprs();
+
/* attempt to make things a bit more fair */
void rotate_in_list();
@@ -246,6 +251,7 @@ protected:
private:
LListHead<gprs_rlcmac_tbf> m_ms_list;
+ bool m_egprs_enabled;
mutable char m_name_buf[60];
};
@@ -315,6 +321,21 @@ inline time_t gprs_rlcmac_tbf::created_ts() const
return m_created_ts;
}
+inline bool gprs_rlcmac_tbf::is_egprs_enabled() const
+{
+ return m_egprs_enabled;
+}
+
+inline void gprs_rlcmac_tbf::enable_egprs()
+{
+ m_egprs_enabled = true;
+}
+
+inline void gprs_rlcmac_tbf::disable_egprs()
+{
+ m_egprs_enabled = false;
+}
+
struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf {
gprs_rlcmac_dl_tbf(BTS *bts);
@@ -339,6 +360,7 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf {
int frames_since_last_drain(unsigned fn) const;
bool keep_open(unsigned fn) const;
int release();
+ void enable_egprs();
bool is_control_ts(uint8_t ts) const {
return ts == control_ts;