add seperate interface for MUX to query BSR procedure

- this is also intented to make MUX RAT-agnostic
This commit is contained in:
Andre Puschmann 2017-06-23 15:24:51 +02:00
parent f26969db8b
commit 20a004a768
4 changed files with 29 additions and 16 deletions

View File

@ -230,6 +230,31 @@ public:
};
//BSR interface for MUX
class bsr_interface_mux
{
public:
typedef enum {
LONG_BSR,
SHORT_BSR,
TRUNC_BSR
} bsr_format_t;
typedef struct {
bsr_format_t format;
uint32_t buff_size[4];
} bsr_t;
/* MUX calls BSR to check if it can fit a BSR into PDU */
virtual bool need_to_send_bsr_on_ul_grant(uint32_t grant_size, bsr_t *bsr) = 0;
/* MUX calls BSR to let it generate a padding BSR if there is space in PDU */
virtual bool generate_padding_bsr(uint32_t nof_padding_bytes, bsr_t *bsr) = 0;
/* MAX calls BSR to set the Tx TTI */
virtual void set_tx_tti(uint32_t tti) = 0;
};
/** MAC interface
*

View File

@ -57,7 +57,7 @@ class mux
public:
mux();
void reset();
void init(rlc_interface_mac *rlc, srslte::log *log_h, bsr_proc *bsr_procedure, phr_proc *phr_procedure_);
void init(rlc_interface_mac *rlc, srslte::log *log_h, bsr_interface_mux *bsr_procedure, phr_proc *phr_procedure_);
bool is_pending_any_sdu();
bool is_pending_sdu(uint32_t lcid);
@ -94,7 +94,7 @@ private:
srslte::log *log_h;
rlc_interface_mac *rlc;
bsr_proc *bsr_procedure;
bsr_interface_mux *bsr_procedure;
phr_proc *phr_procedure;
uint16_t pending_crnti_ce;

View File

@ -37,7 +37,7 @@
namespace srsue {
class bsr_proc : public srslte::timer_callback
class bsr_proc : public srslte::timer_callback, public bsr_interface_mux
{
public:
bsr_proc();
@ -48,18 +48,6 @@ public:
void set_priority(uint32_t lcid, uint32_t priority);
void timer_expired(uint32_t timer_id);
uint32_t get_buffer_state();
typedef enum {
LONG_BSR,
SHORT_BSR,
TRUNC_BSR
} bsr_format_t;
typedef struct {
bsr_format_t format;
uint32_t buff_size[4];
} bsr_t;
bool need_to_send_bsr_on_ul_grant(uint32_t grant_size, bsr_t *bsr);
bool generate_padding_bsr(uint32_t nof_padding_bytes, bsr_t *bsr);
bool need_to_send_sr(uint32_t tti);

View File

@ -51,7 +51,7 @@ mux::mux() : pdu_msg(MAX_NOF_SUBHEADERS)
msg3_flush();
}
void mux::init(rlc_interface_mac *rlc_, srslte::log *log_h_, bsr_proc *bsr_procedure_, phr_proc *phr_procedure_)
void mux::init(rlc_interface_mac *rlc_, srslte::log *log_h_, bsr_interface_mux *bsr_procedure_, phr_proc *phr_procedure_)
{
log_h = log_h_;
rlc = rlc_;