removed stack-mac interface dedicated methods. We use now the task dispatch methods instead

master
Francisco Paisana 5 years ago committed by Francisco Paisana
parent de03c96c3b
commit e91a7ea513

@ -612,9 +612,6 @@ public:
// STACK interface for MAC
class stack_interface_mac : public task_handler_interface_lte
{
public:
virtual void wait_ra_completion(uint16_t rnti) = 0;
virtual void start_prach_configuration() = 0;
};
// STACK interface for MAC

@ -72,9 +72,6 @@ public:
void run_tti(const uint32_t tti);
/** Stack interface */
void notify_phy_config_completed();
/******** Interface from RRC (RRC -> MAC) ****************/
void bcch_start_rx(int si_window_start, int si_window_length);
void bcch_stop_rx();
@ -102,7 +99,6 @@ public:
/*********** interface for stack ******************/
void process_pdus();
void notify_ra_completed();
void start_pcap(srslte::mac_pcap* pcap);

@ -118,10 +118,6 @@ public:
bool is_lcid_enabled(uint32_t lcid) final { return pdcp.is_lcid_enabled(lcid); }
// Interface to upper MAC
void wait_ra_completion(uint16_t rnti) final;
void start_prach_configuration() final;
// Interface for RRC
void start_cell_search() final;
void start_cell_select(const phy_interface_rrc_lte::phy_cell_t* cell) final;

@ -509,11 +509,6 @@ void mac::process_pdus()
}
}
void mac::notify_ra_completed()
{
ra_procedure.notify_ra_completed();
}
uint32_t mac::get_current_tti()
{
return phy_h->get_current_tti();
@ -606,11 +601,6 @@ void mac::start_noncont_ho(uint32_t preamble_index, uint32_t prach_mask)
ra_procedure.start_noncont(preamble_index, prach_mask);
}
void mac::notify_phy_config_completed()
{
ra_procedure.notify_phy_config_completed();
}
void mac::start_cont_ho()
{
ra_procedure.start_mac_order(56, true);

@ -236,8 +236,13 @@ void ra_proc::state_contention_resolution()
*/
void ra_proc::state_completition()
{
state = WAITING_COMPLETION;
stack->wait_ra_completion(rntis->crnti);
state = WAITING_COMPLETION;
uint16_t rnti = rntis->crnti;
stack->enqueue_background_task([this, rnti](uint32_t worker_id) {
phy_h->set_crnti(rnti);
// signal MAC RA proc to go back to idle
notify_ra_completed();
});
}
void ra_proc::notify_phy_config_completed()
@ -272,7 +277,11 @@ void ra_proc::initialization()
// Instruct phy to configure PRACH
state = WAITING_PHY_CONFIG;
stack->start_prach_configuration();
stack->enqueue_background_task([this](uint32_t worker_id) {
phy_h->configure_prach_params();
// notify back MAC
stack->notify_background_task_result([this]() { notify_phy_config_completed(); });
});
}
/* Resource selection as defined in 5.1.2 */

@ -330,28 +330,6 @@ void ue_stack_lte::run_tti_impl(uint32_t tti, uint32_t tti_jump)
}
}
/********************
* low MAC Interface
*******************/
void ue_stack_lte::wait_ra_completion(uint16_t rnti)
{
background_tasks.push_task([this, rnti](uint32_t worker_id) {
phy->set_crnti(rnti);
// signal MAC RA proc to go back to idle
mac.notify_ra_completed();
});
}
void ue_stack_lte::start_prach_configuration()
{
background_tasks.push_task([this](uint32_t worker_id) {
phy->configure_prach_params();
// notify back RRC
pending_tasks.push(background_queue_id, [this]() { mac.notify_phy_config_completed(); });
});
}
/***************************
* Task Handling Interface
**************************/

@ -40,8 +40,6 @@ public:
{
timers.defer_callback(duration_ms, func);
}
void wait_ra_completion(uint16_t rnti) override {}
void start_prach_configuration() override {}
srslte::timer_handler timers{100};
srslte::task_multiqueue pending_tasks;

@ -343,16 +343,6 @@ public:
mac_h = mac_;
phy_h = phy_;
}
void wait_ra_completion(uint16_t rnti) final
{
phy_h->set_crnti(rnti);
mac_h->notify_ra_completed();
}
void start_prach_configuration() final
{
phy_h->configure_prach_params();
mac_h->notify_phy_config_completed();
}
bool events_exist()
{
for (int i = 0; i < pending_tasks.nof_queues(); ++i) {
@ -460,8 +450,6 @@ int mac_ul_sch_pdu_test1()
rlc_log.set_level(srslte::LOG_LEVEL_DEBUG);
rlc_log.set_hex_limit(100000);
srslte::timer_handler timers(64);
// dummy layers
phy_dummy phy;
rlc_dummy rlc(&rlc_log);
@ -527,8 +515,6 @@ int mac_ul_logical_channel_prioritization_test1()
rlc_log.set_level(srslte::LOG_LEVEL_DEBUG);
rlc_log.set_hex_limit(100000);
srslte::timer_handler timers(64);
// dummy layers
phy_dummy phy;
rlc_dummy rlc(&rlc_log);
@ -640,8 +626,6 @@ int mac_ul_logical_channel_prioritization_test2()
rlc_log.set_level(srslte::LOG_LEVEL_DEBUG);
rlc_log.set_hex_limit(100000);
srslte::timer_handler timers(64);
// dummy layers
phy_dummy phy;
rlc_dummy rlc(&rlc_log);
@ -740,8 +724,6 @@ int mac_ul_logical_channel_prioritization_test3()
rlc_log.set_level(srslte::LOG_LEVEL_DEBUG);
rlc_log.set_hex_limit(100000);
srslte::timer_handler timers(64);
// dummy layers
phy_dummy phy;
rlc_dummy rlc(&rlc_log);
@ -828,8 +810,6 @@ int mac_ul_sch_pdu_with_short_bsr_test()
rlc_log.set_level(srslte::LOG_LEVEL_DEBUG);
rlc_log.set_hex_limit(100000);
srslte::timer_handler timers(64);
// dummy layers
phy_dummy phy;
rlc_dummy rlc(&rlc_log);
@ -914,8 +894,6 @@ int mac_ul_sch_pdu_with_padding_bsr_test()
rlc_log.set_level(srslte::LOG_LEVEL_DEBUG);
rlc_log.set_hex_limit(100000);
srslte::timer_handler timers(64);
// dummy layers
phy_dummy phy;
rlc_dummy rlc(&rlc_log);
@ -1009,8 +987,6 @@ int mac_ul_sch_pdu_one_byte_test()
rlc_log.set_level(srslte::LOG_LEVEL_DEBUG);
rlc_log.set_hex_limit(100000);
srslte::timer_handler timers(64);
// dummy layers
phy_dummy phy;
rlc_dummy rlc(&rlc_log);
@ -1068,8 +1044,6 @@ int mac_ul_sch_pdu_two_byte_test()
rlc_log.set_level(srslte::LOG_LEVEL_DEBUG);
rlc_log.set_hex_limit(100000);
srslte::timer_handler timers(64);
// dummy layers
phy_dummy phy;
rlc_dummy rlc(&rlc_log);
@ -1127,8 +1101,6 @@ int mac_ul_sch_pdu_three_byte_test()
rlc_log.set_level(srslte::LOG_LEVEL_DEBUG);
rlc_log.set_hex_limit(100000);
srslte::timer_handler timers(64);
// dummy layers
phy_dummy phy;
rlc_dummy rlc(&rlc_log);
@ -1368,8 +1340,6 @@ int mac_random_access_test()
rlc_log.set_level(srslte::LOG_LEVEL_DEBUG);
rlc_log.set_hex_limit(100000);
srslte::timer_handler timers(64);
// dummy layers
phy_dummy phy;
phy.set_log(&phy_log);

Loading…
Cancel
Save