|
|
|
@ -140,13 +140,11 @@ void intra_measure::write(uint32_t tti, cf_t* data, uint32_t nsamples)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void intra_measure::run_thread()
|
|
|
|
|
void intra_measure::measure_proc()
|
|
|
|
|
{
|
|
|
|
|
std::set<uint32_t> cells_to_measure = {};
|
|
|
|
|
|
|
|
|
|
while (state.get_state() != internal_state::quit) {
|
|
|
|
|
if (state.get_state() == internal_state::measure) {
|
|
|
|
|
// Start measuring
|
|
|
|
|
// Load cell list to measure
|
|
|
|
|
active_pci_mutex.lock();
|
|
|
|
|
cells_to_measure = active_pci;
|
|
|
|
|
active_pci_mutex.unlock();
|
|
|
|
@ -202,17 +200,38 @@ void intra_measure::run_thread()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Send measurements to RRC
|
|
|
|
|
// Send measurements to RRC if any cell found
|
|
|
|
|
if (not neighbour_cells.empty()) {
|
|
|
|
|
rrc->new_cell_meas(neighbour_cells);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Inform that measurement has finished
|
|
|
|
|
meas_sync.increase();
|
|
|
|
|
} else if (state.get_state() != internal_state::quit) {
|
|
|
|
|
// Wait for changing state
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void intra_measure::run_thread()
|
|
|
|
|
{
|
|
|
|
|
bool quit = false;
|
|
|
|
|
|
|
|
|
|
do {
|
|
|
|
|
switch (state.get_state()) {
|
|
|
|
|
|
|
|
|
|
case internal_state::idle:
|
|
|
|
|
case internal_state::wait:
|
|
|
|
|
case internal_state::receive:
|
|
|
|
|
// Wait for a state change
|
|
|
|
|
state.wait_change();
|
|
|
|
|
break;
|
|
|
|
|
case internal_state::measure:
|
|
|
|
|
// Run the measurement process
|
|
|
|
|
measure_proc();
|
|
|
|
|
break;
|
|
|
|
|
case internal_state::quit:
|
|
|
|
|
// Quit loop
|
|
|
|
|
quit = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} while (not quit);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace scell
|
|
|
|
|