SRSUE: wait for valid RSRP measurement before adquiring SIBs during cell search

master
Xavier Arteaga 5 years ago committed by Xavier Arteaga
parent 68ad4960eb
commit 4d3c28ff97

@ -36,12 +36,13 @@ public:
phy_interface_rrc_lte::cell_search_ret_t cs_ret;
phy_interface_rrc_lte::phy_cell_t found_cell;
};
enum class state_t { phy_cell_search, si_acquire };
enum class state_t { phy_cell_search, si_acquire, wait_measurement };
explicit cell_search_proc(rrc* parent_);
srslte::proc_outcome_t init();
srslte::proc_outcome_t step();
srslte::proc_outcome_t react(const cell_search_event_t& event);
srslte::proc_outcome_t check_sib();
phy_interface_rrc_lte::cell_search_ret_t get_result() const { return search_result.cs_ret; }
static const char* name() { return "Cell Search"; }

@ -63,6 +63,8 @@ proc_outcome_t rrc::cell_search_proc::step()
}
Info("Completed successfully\n");
return proc_outcome_t::success;
} else if (state == state_t::wait_measurement && std::isnormal(rrc_ptr->serving_cell->get_rsrp())) {
return check_sib();
}
return proc_outcome_t::yield;
}
@ -90,6 +92,17 @@ proc_outcome_t rrc::cell_search_proc::handle_cell_found(const phy_interface_rrc_
return proc_outcome_t::error;
}
if (not std::isnormal(rrc_ptr->serving_cell->get_rsrp())) {
Info("No valid measurement found for the serving cell. Wait for valid measurement...\n");
state = state_t::wait_measurement;
return proc_outcome_t::yield;
}
return check_sib();
}
proc_outcome_t rrc::cell_search_proc::check_sib()
{
if (rrc_ptr->serving_cell->has_sib1()) {
Info("Cell has SIB1\n");
// What do we do????

Loading…
Cancel
Save