@ -90,13 +90,12 @@ void sf_worker::reset()
bool sf_worker : : set_cell ( uint32_t cc_idx , srslte_cell_t cell_ )
{
bool ret = false ;
std : : lock_guard < std : : mutex > lock ( mutex ) ;
if ( cc_idx < cc_workers . size ( ) ) {
if ( ! cc_workers [ cc_idx ] - > set_cell ( cell_ ) ) {
Error ( " Setting cell for cc=%d \n " , cc_idx ) ;
goto unlock ;
return false ;
}
} else {
Error ( " Setting cell for cc=%d; Not enough CC workers (%zd); \n " , cc_idx , cc_workers . size ( ) ) ;
@ -105,11 +104,10 @@ bool sf_worker::set_cell(uint32_t cc_idx, srslte_cell_t cell_)
if ( cc_idx = = 0 ) {
cell = cell_ ;
cell_initiated = true ;
cell_init_cond . notify_one ( ) ;
}
ret = true ;
unlock :
return ret ;
return true ;
}
cf_t * sf_worker : : get_buffer ( uint32_t carrier_idx , uint32_t antenna_idx )
@ -468,6 +466,9 @@ void* plot_thread_run(void* arg)
plot_scatter_addToWindowGrid ( & psync , ( char * ) " srsue " , 1 , row_count + + ) ;
# endif /* SYNC_PLOT_LEN > 0 */
uint32_t num_tx = worker - > get_cell_nof_ports ( ) ;
uint32_t num_rx = worker - > get_rx_nof_antennas ( ) ;
int n ;
int readed_pdsch_re = 0 ;
while ( ! plot_quit ) {
@ -477,8 +478,8 @@ void* plot_thread_run(void* arg)
n = worker - > read_pdsch_d ( & tmp_plot2 [ readed_pdsch_re ] ) ;
readed_pdsch_re + = n ;
} else {
for ( uint32_t tx = 0 ; tx < worker- > get_cell_nof_ports ( ) ; tx + + ) {
for ( uint32_t rx = 0 ; rx < worker- > get_rx_nof_antennas ( ) ; rx + + ) {
for ( uint32_t tx = 0 ; tx < num_tx ; tx + + ) {
for ( uint32_t rx = 0 ; rx < num_rx ; rx + + ) {
n = worker - > read_ce_abs ( tmp_plot , tx , rx ) ;
if ( n > 0 ) {
plot_real_setNewData ( & pce [ tx ] [ rx ] , tmp_plot , n ) ;
@ -502,7 +503,6 @@ void* plot_thread_run(void* arg)
void init_plots ( srsue : : sf_worker * worker )
{
if ( sem_init ( & plot_sem , 0 , 0 ) ) {
perror ( " sem_init " ) ;
exit ( - 1 ) ;