@@ -573,22 +573,21 @@ bool srsran::srs_du::ue_pucch_config_builder(serving_cell_config&
573573 return false ;
574574 }
575575
576- const unsigned f1_pucch_res_set_id = 0 ;
577- const unsigned f2_pucch_res_set_id = 1 ;
578-
579576 // PUCCH resource ID corresponding to \c pucch-ResourceId, as part of \c PUCCH-Resource, in \c PUCCH-Config,
580577 // TS 38.331. By default, we index the PUCCH resource ID for ASN1 message from 0 to pucch_res_list.size() - 1.
581578 unsigned ue_pucch_res_id = 0 ;
582579
583580 pucch_config& pucch_cfg = serv_cell_cfg.ul_config .value ().init_ul_bwp .pucch_cfg .value ();
584581 // Clears current PUCCH resource list and PUCCH resource list set 0 and 1.
585582 pucch_cfg.pucch_res_list .clear ();
586- pucch_cfg.pucch_res_set [f1_pucch_res_set_id ].pucch_res_id_list .clear ();
587- pucch_cfg.pucch_res_set [f2_pucch_res_set_id ].pucch_res_id_list .clear ();
583+ pucch_cfg.pucch_res_set [pucch_res_set_idx_to_uint (pucch_res_set_idx::set_0) ].pucch_res_id_list .clear ();
584+ pucch_cfg.pucch_res_set [pucch_res_set_idx_to_uint (pucch_res_set_idx::set_1) ].pucch_res_id_list .clear ();
588585
589586 // Ensure the PUCCH resource sets ID are 0 and 1.
590- pucch_cfg.pucch_res_set [f1_pucch_res_set_id].pucch_res_set_id = f1_pucch_res_set_id;
591- pucch_cfg.pucch_res_set [f2_pucch_res_set_id].pucch_res_set_id = f2_pucch_res_set_id;
587+ pucch_cfg.pucch_res_set [pucch_res_set_idx_to_uint (pucch_res_set_idx::set_0)].pucch_res_set_id =
588+ pucch_res_set_idx::set_0;
589+ pucch_cfg.pucch_res_set [pucch_res_set_idx_to_uint (pucch_res_set_idx::set_1)].pucch_res_set_id =
590+ pucch_res_set_idx::set_1;
592591
593592 // Add F1 for HARQ.
594593 const unsigned f1_idx_offset = (du_harq_set_idx % nof_harq_pucch_sets) * nof_ue_pucch_f1_res_harq.to_uint ();
@@ -603,7 +602,7 @@ bool srsran::srs_du::ue_pucch_config_builder(serving_cell_config&
603602 .format_params = cell_res.format_params });
604603
605604 // Add PUCCH resource index to pucch_res_id_list of PUCCH resource set id=0.
606- pucch_cfg.pucch_res_set [f1_pucch_res_set_id ].pucch_res_id_list .emplace_back (
605+ pucch_cfg.pucch_res_set [pucch_res_set_idx_to_uint (pucch_res_set_idx::set_0) ].pucch_res_id_list .emplace_back (
607606 pucch_res_id_t {cell_res.res_id .cell_res_id , ue_pucch_res_id});
608607
609608 // Increment the PUCCH resource ID for ASN1 message.
@@ -635,7 +634,7 @@ bool srsran::srs_du::ue_pucch_config_builder(serving_cell_config&
635634 .format_params = cell_res.format_params });
636635
637636 // Add PUCCH resource index to pucch_res_id_list of PUCCH resource set id=1.
638- pucch_cfg.pucch_res_set [f2_pucch_res_set_id ].pucch_res_id_list .emplace_back (
637+ pucch_cfg.pucch_res_set [pucch_res_set_idx_to_uint (pucch_res_set_idx::set_1) ].pucch_res_id_list .emplace_back (
639638 pucch_res_id_t {cell_res.res_id .cell_res_id , ue_pucch_res_id});
640639 // Increment the PUCCH resource ID for ASN1 message.
641640 ++ue_pucch_res_id;
0 commit comments