@ -240,13 +240,7 @@ int rrc_nsa_reconfig_tdd_test()
asn1 : : rrc_nr : : rrc_recfg_s secondary_cell_group_r15 ;
TESTASSERT ( secondary_cell_group_r15 . unpack ( bref0 ) = = asn1 : : SRSASN_SUCCESS ) ;
TESTASSERT ( secondary_cell_group_r15 . crit_exts . rrc_recfg ( ) . secondary_cell_group_present ) ;
asn1 : : cbit_ref bref1 ( secondary_cell_group_r15 . crit_exts . rrc_recfg ( ) . secondary_cell_group . data ( ) ,
secondary_cell_group_r15 . crit_exts . rrc_recfg ( ) . secondary_cell_group . size ( ) ) ;
asn1 : : rrc_nr : : cell_group_cfg_s cell_group_cfg ;
cell_group_cfg . unpack ( bref1 ) ;
rrc_nr_reconf . crit_exts . rrc_recfg ( ) . secondary_cell_group_present = true ;
rrc_nr_reconf . crit_exts . rrc_recfg ( ) . secondary_cell_group =
@ -346,13 +340,7 @@ int rrc_nsa_reconfig_fdd_test()
asn1 : : rrc_nr : : rrc_recfg_s secondary_cell_group_r15 ;
TESTASSERT ( secondary_cell_group_r15 . unpack ( bref0 ) = = asn1 : : SRSASN_SUCCESS ) ;
TESTASSERT ( secondary_cell_group_r15 . crit_exts . rrc_recfg ( ) . secondary_cell_group_present ) ;
asn1 : : cbit_ref bref1 ( secondary_cell_group_r15 . crit_exts . rrc_recfg ( ) . secondary_cell_group . data ( ) ,
secondary_cell_group_r15 . crit_exts . rrc_recfg ( ) . secondary_cell_group . size ( ) ) ;
asn1 : : rrc_nr : : cell_group_cfg_s cell_group_cfg ;
TESTASSERT ( cell_group_cfg . unpack ( bref1 ) = = asn1 : : SRSASN_SUCCESS ) ;
rrc_nr_reconf . crit_exts . rrc_recfg ( ) . secondary_cell_group_present = true ;
rrc_nr_reconf . crit_exts . rrc_recfg ( ) . secondary_cell_group =
@ -518,6 +506,57 @@ int rrc_nr_setup_test()
return SRSRAN_SUCCESS ;
}
int rrc_nr_reconfig_test ( )
{
srslog : : basic_logger & logger = srslog : : fetch_basic_logger ( " RRC-NR " ) ;
logger . set_level ( srslog : : basic_levels : : debug ) ;
logger . set_hex_dump_max_size ( - 1 ) ;
srsran : : task_scheduler task_sched { 512 , 100 } ;
srsran : : task_sched_handle task_sched_handle ( & task_sched ) ;
rrc_nr rrc_nr ( task_sched_handle ) ;
dummy_phy dummy_phy ;
dummy_mac dummy_mac ;
dummy_rlc dummy_rlc ;
dummy_pdcp dummy_pdcp ;
dummy_gw dummy_gw ;
dummy_eutra dummy_eutra ;
dummy_sim dummy_sim ;
dummy_stack dummy_stack ;
rrc_nr_args_t rrc_nr_args ;
TESTASSERT ( rrc_nr . init ( & dummy_phy ,
& dummy_mac ,
& dummy_rlc ,
& dummy_pdcp ,
& dummy_gw ,
& dummy_eutra ,
& dummy_sim ,
task_sched . get_timer_handler ( ) ,
& dummy_stack ,
rrc_nr_args ) = = SRSRAN_SUCCESS ) ;
uint8_t msg [ ] = { 0x04 , 0x8a , 0x80 , 0x40 , 0x9a , 0x01 , 0xe0 , 0x02 , 0x05 , 0xe1 , 0xf0 , 0x05 , 0x00 , 0x9a , 0x00 , 0x15 , 0x84 ,
0x88 , 0x8b , 0xd7 , 0x63 , 0x80 , 0x83 , 0x2f , 0x00 , 0x05 , 0x8e , 0x03 , 0xea , 0x41 , 0xd0 , 0x23 , 0x00 , 0x20 ,
0x25 , 0x5f , 0x80 , 0xa2 , 0xef , 0x22 , 0xc8 , 0x40 , 0xdf , 0x80 , 0x1a , 0x00 , 0x40 , 0x21 , 0x8b , 0x80 , 0x40 ,
0x70 , 0x84 , 0xc0 , 0x02 , 0x40 , 0x40 , 0x01 , 0x8c , 0x4c , 0x40 , 0x40 , 0x7f , 0xc0 , 0x41 , 0x82 , 0xc0 , 0x00 ,
0x42 , 0xc0 , 0x00 , 0x4a , 0x43 , 0x40 , 0xc0 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x01 , 0x82 , 0x8b , 0x40 ,
0x01 , 0x88 , 0x80 , 0x40 , 0x5e , 0x40 , 0x01 , 0x80 , 0x48 , 0x10 , 0x40 , 0x40 , 0x42 , 0x5e , 0xc0 , 0x12 , 0x20 ,
0x20 , 0x08 , 0x44 , 0x00 , 0x80 , 0x00 , 0x04 , 0x20 , 0x41 , 0x82 , 0x02 , 0x02 , 0x02 , 0x20 , 0xc1 , 0x82 , 0x02 ,
0x01 , 0x01 , 0x00 , 0x00 , 0xc4 , 0x08 , 0x00 , 0x52 , 0x18 , 0x12 , 0x18 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
0x00 , 0x00 , 0x22 , 0x22 , 0x00 , 0x00 , 0xc4 , 0x08 , 0x00 , 0x52 , 0x18 , 0x12 , 0x18 , 0x00 , 0x00 , 0x00 , 0x00 ,
0x00 , 0x00 , 0x00 , 0x00 , 0x22 , 0x11 , 0x00 , 0x03 , 0x41 , 0x02 , 0x02 , 0x02 , 0x02 , 0x00 , 0x03 , 0x41 , 0x02 ,
0x02 , 0x01 , 0x01 , 0x09 , 0x41 , 0xc1 , 0x9c , 0xdc , 0x9c , 0xd8 , 0x5c , 0x1b , 0x84 , 0x80 , 0x40 } ;
srsran : : unique_byte_buffer_t pdu = srsran : : make_byte_buffer ( ) ;
memcpy ( pdu - > msg , msg , sizeof ( msg ) ) ;
pdu - > N_bytes = sizeof ( msg ) ;
rrc_nr . write_pdu ( 1 , std : : move ( pdu ) ) ;
task_sched . run_pending_tasks ( ) ;
return SRSRAN_SUCCESS ;
}
int main ( int argc , char * * argv )
{
srslog : : init ( ) ;
@ -528,6 +567,7 @@ int main(int argc, char** argv)
TESTASSERT ( rrc_nr_setup_request_test ( ) = = SRSRAN_SUCCESS ) ;
TESTASSERT ( rrc_nr_sib1_decoding_test ( ) = = SRSRAN_SUCCESS ) ;
TESTASSERT ( rrc_nr_setup_test ( ) = = SRSRAN_SUCCESS ) ;
TESTASSERT ( rrc_nr_reconfig_test ( ) = = SRSRAN_SUCCESS ) ;
return SRSRAN_SUCCESS ;
}