Skip to content

Commit b86a3e8

Browse files
FabianEckermannFabian Eckermann
authored andcommitted
cu_cp,rrc: add helper to get rrc reject pdu when rrc ue creation fails
1 parent acb1b2b commit b86a3e8

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

include/srsran/rrc/rrc_du.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ class rrc_du_ue_repository
5151
rrc_du_ue_repository() = default;
5252
virtual ~rrc_du_ue_repository() = default;
5353

54+
/// \brief Get the RRC Reject message to send to the UE.
55+
virtual byte_buffer get_rrc_reject() = 0;
56+
5457
/// Creates a new RRC UE object and returns a handle to it.
5558
virtual rrc_ue_interface* add_ue(const rrc_ue_creation_message& msg) = 0;
5659

lib/rrc/rrc_du_impl.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
*/
1010

1111
#include "rrc_du_impl.h"
12-
#include "../ran/gnb_format.h"
1312
#include "ue/rrc_measurement_types_asn1_converters.h"
13+
#include "ue/rrc_ue_helpers.h"
1414
#include "srsran/asn1/rrc_nr/cell_group_config.h"
15+
#include "srsran/asn1/rrc_nr/dl_ccch_msg.h"
1516
#include "srsran/cu_cp/cu_cp_types.h"
1617

1718
using namespace srsran;
@@ -95,6 +96,14 @@ bool rrc_du_impl::handle_served_cell_list(const std::vector<cu_cp_du_served_cell
9596
return true;
9697
}
9798

99+
byte_buffer rrc_du_impl::get_rrc_reject()
100+
{
101+
// pack RRC Reconfig
102+
dl_ccch_msg_s dl_ccch_msg;
103+
dl_ccch_msg.msg.set_c1().set_rrc_reject().crit_exts.set_rrc_reject();
104+
return pack_into_pdu(dl_ccch_msg, "RRCReject");
105+
}
106+
98107
rrc_ue_interface* rrc_du_impl::add_ue(const rrc_ue_creation_message& msg)
99108
{
100109
// If the DU to CU container is missing, assume the DU can't serve the UE, so the CU-CP should reject the UE, see

lib/rrc/rrc_du_impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class rrc_du_impl : public rrc_du_interface
3434
bool handle_served_cell_list(const std::vector<cu_cp_du_served_cells_item>& served_cell_list) override;
3535

3636
// rrc_du_ue_repository
37+
byte_buffer get_rrc_reject() override;
3738
rrc_ue_interface* add_ue(const rrc_ue_creation_message& msg) override;
3839
void release_ues() override;
3940

0 commit comments

Comments
 (0)