|
|
|
@ -44,11 +44,7 @@ public:
|
|
|
|
|
virtual bool process_pdus() = 0;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class mac : public mac_interface_phy_lte,
|
|
|
|
|
public mac_interface_rlc,
|
|
|
|
|
public mac_interface_rrc,
|
|
|
|
|
public srslte::mac_interface_timers,
|
|
|
|
|
public pdu_process_handler
|
|
|
|
|
class mac : public mac_interface_phy_lte, public mac_interface_rlc, public mac_interface_rrc, public pdu_process_handler
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
mac();
|
|
|
|
@ -107,11 +103,6 @@ public:
|
|
|
|
|
|
|
|
|
|
bool process_pdus();
|
|
|
|
|
|
|
|
|
|
// Interface for upper-layer timers
|
|
|
|
|
srslte::timers::timer* timer_get(uint32_t timer_id);
|
|
|
|
|
void timer_release_id(uint32_t timer_id);
|
|
|
|
|
u_int32_t timer_get_unique_id();
|
|
|
|
|
|
|
|
|
|
uint32_t get_current_tti();
|
|
|
|
|
void get_metrics(mac_metrics_t metrics[ENB_METRICS_MAX_USERS]);
|
|
|
|
|
void write_mcch(asn1::rrc::sib_type2_s* sib2, asn1::rrc::sib_type13_r9_s* sib13, asn1::rrc::mcch_msg_s* mcch);
|
|
|
|
@ -179,23 +170,24 @@ private:
|
|
|
|
|
uint8_t mtch_payload_buffer[mtch_payload_len];
|
|
|
|
|
|
|
|
|
|
/* Functions for MAC Timers */
|
|
|
|
|
srslte::timers timers_db;
|
|
|
|
|
srslte::timer_handler timers_db;
|
|
|
|
|
void setup_timers();
|
|
|
|
|
|
|
|
|
|
// pointer to MAC PCAP object
|
|
|
|
|
srslte::mac_pcap* pcap;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Class to run upper-layer timers with normal priority */
|
|
|
|
|
class timer_thread : public thread {
|
|
|
|
|
class timer_thread : public thread
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
timer_thread(mac* parent_, srslte::timers* t) : ttisync(10240), timers(t), running(false), parent(parent_), thread("MAC_TIMER") { start(); }
|
|
|
|
|
timer_thread(mac* parent_, srslte::timer_handler* t) : ttisync(10240), timers(t), running(false), parent(parent_), thread("MAC_TIMER") { start(); }
|
|
|
|
|
void tti_clock();
|
|
|
|
|
void stop();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void run_thread();
|
|
|
|
|
srslte::tti_sync_cv ttisync;
|
|
|
|
|
srslte::timers *timers;
|
|
|
|
|
srslte::timer_handler *timers;
|
|
|
|
|
mac *parent;
|
|
|
|
|
bool running;
|
|
|
|
|
};
|
|
|
|
|