@@ -23,16 +23,10 @@ class scheduler_ta_cmd_tester : public scheduler_test_simulator, public ::testin
2323 scheduler_ta_cmd_tester () :
2424 scheduler_test_simulator (4 , GetParam() == duplex_mode::FDD ? subcarrier_spacing::kHz15 : subcarrier_spacing::kHz30 )
2525 {
26- // Add Cell.
27- this ->add_cell ([this , duplex_mode = GetParam ()]() {
28- params =
29- duplex_mode == duplex_mode::FDD ? cell_config_builder_profiles::fdd () : cell_config_builder_profiles::tdd ();
30-
31- sched_cell_configuration_request_message sched_cfg_req =
32- sched_config_helper::make_default_sched_cell_configuration_request (params);
26+ params = GetParam () == duplex_mode::FDD ? cell_config_builder_profiles::fdd () : cell_config_builder_profiles::tdd ();
3327
34- return sched_cfg_req;
35- }( ));
28+ // Add Cell.
29+ this -> add_cell ( sched_config_helper::make_default_sched_cell_configuration_request (params ));
3630
3731 // Add UE
3832 this ->add_ue (sched_config_helper::create_default_sched_ue_creation_request (params, {ue_drb_lcid}));
@@ -47,32 +41,16 @@ class scheduler_ta_cmd_tester : public scheduler_test_simulator, public ::testin
4741 uci_indication uci_ind{};
4842 uci_ind.cell_index = to_du_cell_index (0 );
4943 uci_ind.slot_rx = uci_sl;
50- uci_ind.ucis .resize (1 );
51- uci_ind.ucis [0 ].crnti = pucch_pdu.crnti ;
52- uci_ind.ucis [0 ].ue_index = ue_index;
53- switch (pucch_pdu.format ()) {
54- case pucch_format::FORMAT_1: {
55- uci_indication::uci_pdu::uci_pucch_f0_or_f1_pdu f1{};
56- f1.harqs .resize (pucch_pdu.uci_bits .harq_ack_nof_bits );
57- std::fill (f1.harqs .begin (), f1.harqs .end (), mac_harq_ack_report_status::ack);
58- f1.ul_sinr_dB = ul_sinr;
59- f1.time_advance_offset = phy_time_unit::from_units_of_Tc (time_advance_offset_in_tc);
60- uci_ind.ucis [0 ].pdu = f1;
61- } break ;
62- case pucch_format::FORMAT_2: {
63- uci_indication::uci_pdu::uci_pucch_f2_or_f3_or_f4_pdu f2{};
64- f2.harqs .resize (pucch_pdu.uci_bits .harq_ack_nof_bits );
65- std::fill (f2.harqs .begin (), f2.harqs .end (), mac_harq_ack_report_status::ack);
66- f2.ul_sinr_dB = ul_sinr;
67- f2.time_advance_offset = phy_time_unit::from_units_of_Tc (time_advance_offset_in_tc);
68- uci_ind.ucis [0 ].pdu = f2;
69- if (pucch_pdu.uci_bits .csi_part1_nof_bits > 0 ) {
70- f2.csi .emplace ();
71- f2.csi ->first_tb_wideband_cqi = 15 ;
72- }
73- } break ;
74- default :
75- report_fatal_error (" Unsupported PUCCH format" );
44+ uci_ind.ucis .push_back (test_helper::create_uci_indication_pdu (ue_index, pucch_pdu));
45+ if (auto * f0_f1 = std::get_if<uci_indication::uci_pdu::uci_pucch_f0_or_f1_pdu>(&uci_ind.ucis [0 ].pdu )) {
46+ f0_f1->ul_sinr_dB = ul_sinr;
47+ f0_f1->time_advance_offset = phy_time_unit::from_units_of_Tc (time_advance_offset_in_tc);
48+ } else if (auto * f2_f3_f4 =
49+ std::get_if<uci_indication::uci_pdu::uci_pucch_f2_or_f3_or_f4_pdu>(&uci_ind.ucis [0 ].pdu )) {
50+ f2_f3_f4->ul_sinr_dB = ul_sinr;
51+ f2_f3_f4->time_advance_offset = phy_time_unit::from_units_of_Tc (time_advance_offset_in_tc);
52+ } else {
53+ report_fatal_error (" Unsupported PUCCH format" );
7654 }
7755 return uci_ind;
7856 }
0 commit comments