@ -58,7 +58,7 @@ void rrc_nr::init(phy_interface_rrc_nr* phy_,
args = args_ ;
args = args_ ;
running = true ;
running = true ;
fake _measurement_timer = task_sched . get_unique_timer ( ) ;
sim _measurement_timer = task_sched . get_unique_timer ( ) ;
}
}
void rrc_nr : : stop ( )
void rrc_nr : : stop ( )
@ -103,22 +103,22 @@ const char* rrc_nr::get_rb_name(uint32_t lcid)
void rrc_nr : : timer_expired ( uint32_t timeout_id )
void rrc_nr : : timer_expired ( uint32_t timeout_id )
{
{
logger . debug ( " Handling Timer Expired " ) ;
logger . debug ( " Handling Timer Expired " ) ;
if ( timeout_id = = fake _measurement_timer. id ( ) ) {
if ( timeout_id = = sim _measurement_timer. id ( ) ) {
logger . debug ( " Triggered Fake M easurement" ) ;
logger . debug ( " Triggered simulated m easurement" ) ;
phy_meas_nr_t fake _meas = { } ;
phy_meas_nr_t sim _meas = { } ;
std : : vector < phy_meas_nr_t > phy_meas_nr ;
std : : vector < phy_meas_nr_t > phy_meas_nr ;
fake _meas. rsrp = - 60.0 ;
sim _meas. rsrp = - 60.0 ;
fake _meas. rsrq = - 60.0 ;
sim _meas. rsrq = - 60.0 ;
fake _meas. cfo_hz = 1.0 ;
sim _meas. cfo_hz = 1.0 ;
fake_meas. arfcn_nr = fake _measurement_carrier_freq_r15;
sim_meas. arfcn_nr = sim _measurement_carrier_freq_r15;
fake_meas. pci_nr = 500 ;
sim_meas. pci_nr = args . sim_nr_meas_pci ;
phy_meas_nr . push_back ( fake _meas) ;
phy_meas_nr . push_back ( sim _meas) ;
rrc_eutra - > new_cell_meas_nr ( phy_meas_nr ) ;
rrc_eutra - > new_cell_meas_nr ( phy_meas_nr ) ;
auto timer_expire_func = [ this ] ( uint32_t tid ) { timer_expired ( tid ) ; } ;
auto timer_expire_func = [ this ] ( uint32_t tid ) { timer_expired ( tid ) ; } ;
fake _measurement_timer. set ( 10 , timer_expire_func ) ;
sim _measurement_timer. set ( 10 , timer_expire_func ) ;
fake _measurement_timer. run ( ) ;
sim _measurement_timer. run ( ) ;
}
}
}
}
@ -405,10 +405,10 @@ void rrc_nr::get_nr_capabilities(srsran::byte_buffer_t* nr_caps_pdu)
void rrc_nr : : phy_meas_stop ( )
void rrc_nr : : phy_meas_stop ( )
{
{
// possbile race condition for fake _measurement timer, which might be set at the same moment as stopped => fix with
// possbile race condition for sim _measurement timer, which might be set at the same moment as stopped => fix with
// phy integration
// phy integration
logger . debug ( " Stopping fake measurements" ) ;
logger . debug ( " Stopping simulated measurements" ) ;
fake _measurement_timer. stop ( ) ;
sim _measurement_timer. stop ( ) ;
}
}
void rrc_nr : : phy_set_cells_to_meas ( uint32_t carrier_freq_r15 )
void rrc_nr : : phy_set_cells_to_meas ( uint32_t carrier_freq_r15 )
@ -416,9 +416,9 @@ void rrc_nr::phy_set_cells_to_meas(uint32_t carrier_freq_r15)
logger . debug ( " Measuring phy cell %d " , carrier_freq_r15 ) ;
logger . debug ( " Measuring phy cell %d " , carrier_freq_r15 ) ;
// Start timer for fake measurements
// Start timer for fake measurements
auto timer_expire_func = [ this ] ( uint32_t tid ) { timer_expired ( tid ) ; } ;
auto timer_expire_func = [ this ] ( uint32_t tid ) { timer_expired ( tid ) ; } ;
fake _measurement_carrier_freq_r15 = carrier_freq_r15 ;
sim _measurement_carrier_freq_r15 = carrier_freq_r15 ;
fake _measurement_timer. set ( 10 , timer_expire_func ) ;
sim _measurement_timer. set ( 10 , timer_expire_func ) ;
fake _measurement_timer. run ( ) ;
sim _measurement_timer. run ( ) ;
}
}
bool rrc_nr : : configure_sk_counter ( uint16_t sk_counter )
bool rrc_nr : : configure_sk_counter ( uint16_t sk_counter )