@@ -26,7 +26,7 @@ struct ngap_ue_context_t {
2626class cu_cp_ue : public du_ue , public ngap_ue
2727{
2828public:
29- cu_cp_ue (const ue_index_t ue_index_, const pci_t pci_, const rnti_t c_rnti_) :
29+ cu_cp_ue (const ue_index_t ue_index_, const pci_t pci_, const optional< rnti_t > c_rnti_) :
3030 ue_index (ue_index_), pci(pci_), c_rnti(c_rnti_)
3131 {
3232 du_index = get_du_index_from_ue_index (ue_index);
@@ -52,7 +52,13 @@ class cu_cp_ue : public du_ue, public ngap_ue
5252 pci_t get_pci () override { return pci; };
5353
5454 // / \brief Get the C-RNTI of the UE.
55- rnti_t get_c_rnti () override { return c_rnti; }
55+ rnti_t get_c_rnti () override
56+ {
57+ if (c_rnti.has_value ()) {
58+ return c_rnti.value ();
59+ }
60+ return rnti_t ::INVALID_RNTI;
61+ }
5662
5763 // / \brief Get the DU index of the UE.
5864 du_index_t get_du_index () override { return du_index; }
@@ -149,10 +155,10 @@ class cu_cp_ue : public du_ue, public ngap_ue
149155 ue_index_t ue_index = ue_index_t ::invalid;
150156
151157 // du ue context
152- du_index_t du_index = du_index_t ::invalid;
153- du_cell_index_t pcell_index = du_cell_index_t ::invalid;
154- pci_t pci = INVALID_PCI;
155- rnti_t c_rnti = INVALID_RNTI ;
158+ du_index_t du_index = du_index_t ::invalid;
159+ du_cell_index_t pcell_index = du_cell_index_t ::invalid;
160+ pci_t pci = INVALID_PCI;
161+ optional< rnti_t > c_rnti;
156162
157163 std::map<srb_id_t , cu_srb_context> srbs;
158164 rrc_ue_task_scheduler* task_sched = nullptr ;
@@ -191,7 +197,7 @@ class ue_manager : public du_processor_ue_manager, public ngap_ue_manager
191197 // / \param[in] pci PCI of the cell that the UE is connected to.
192198 // / \param[in] rnti RNTI of the UE to be added.
193199 // / \return Pointer to the newly added DU UE if successful, nullptr otherwise.
194- du_ue* add_ue (du_index_t du_index, pci_t pci, rnti_t rnti) override ;
200+ du_ue* add_ue (du_index_t du_index, pci_t pci, optional< rnti_t > rnti) override ;
195201
196202 // / \brief Remove the DU UE context with the given UE index.
197203 // / \param[in] ue_index Index of the UE to be removed.
0 commit comments