diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-05-29 10:37:09 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-06-08 09:35:11 +0200 |
commit | 6dbe822062d54a6c765c6fa7e2c6b79a5dff29b1 (patch) | |
tree | 7f1f703d29edfc1b03b3e0c4d70123b7571c9e0c /src/tbf.h | |
parent | b3f713bd7be2af9bf7c3168099d35df089020164 (diff) |
llc: Separate LLC queue handling from gprs_llc
Currently the gprs_llc class handles both LLC queueing and the
partition into smaller pieces for RLC/MAC encapsulation. This hinders
the separation of TBF and MS related data, since LLC queueing belongs
to the MS related code while the RLC/MAC encoding/decoding belongs to
the TBF layer.
This commits takes the LLC queueing related methods and members and
puts them into a new class gprs_llc_queue. It puts the queueing
object into gprs_rlcmac_tbf and adds accessor functions. The
implementation in tbf.cpp and tbf_dl.cpp is adapted accordingly.
Ticket: #1674
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf.h')
-rw-r--r-- | src/tbf.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -151,6 +151,8 @@ struct gprs_rlcmac_tbf { void assign_imsi(const char *imsi); uint8_t ta() const; void set_ta(uint8_t); + gprs_llc_queue *llc_queue(); + const gprs_llc_queue *llc_queue() const; time_t created_ts() const; @@ -229,6 +231,8 @@ protected: /* Field to take the TA value if no MS is associated */ uint8_t m_ta; + + gprs_llc_queue m_llc_queue; private: mutable char m_name_buf[60]; }; @@ -285,6 +289,16 @@ inline GprsMs *gprs_rlcmac_tbf::ms() return m_ms; } +inline gprs_llc_queue *gprs_rlcmac_tbf::llc_queue() +{ + return &m_llc_queue; +} + +inline const gprs_llc_queue *gprs_rlcmac_tbf::llc_queue() const +{ + return &m_llc_queue; +} + inline bool gprs_rlcmac_tbf::is_tlli_valid() const { return tlli() != 0; |