From 14170bbba2785ec347b1affbfbaefd323ff55567 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 24 Nov 2021 17:06:22 +0000 Subject: [PATCH] lib,rrc_nr: made separate function to create default PDCP SRB configs --- lib/include/srsran/asn1/rrc_utils.h | 1 + lib/src/asn1/rrc_utils.cc | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/lib/include/srsran/asn1/rrc_utils.h b/lib/include/srsran/asn1/rrc_utils.h index de7832f5d..8c7b2ed88 100644 --- a/lib/include/srsran/asn1/rrc_utils.h +++ b/lib/include/srsran/asn1/rrc_utils.h @@ -94,6 +94,7 @@ void to_asn1(asn1::rrc::rlc_cfg_c* asn1_type, const rlc_config_t& cfg); * PDCP Config **************************/ srsran::pdcp_config_t make_srb_pdcp_config_t(const uint8_t bearer_id, bool is_ue); +srsran::pdcp_config_t make_nr_srb_pdcp_config_t(const uint8_t bearer_id, bool is_ue); srsran::pdcp_config_t make_drb_pdcp_config_t(const uint8_t bearer_id, bool is_ue); uint8_t get_pdcp_drb_sn_len(const asn1::rrc::pdcp_cfg_s& pdcp_cfg); srsran::pdcp_config_t diff --git a/lib/src/asn1/rrc_utils.cc b/lib/src/asn1/rrc_utils.cc index d54393057..30cebb583 100644 --- a/lib/src/asn1/rrc_utils.cc +++ b/lib/src/asn1/rrc_utils.cc @@ -215,6 +215,20 @@ srsran::pdcp_config_t make_srb_pdcp_config_t(const uint8_t bearer_id, bool is_ue return cfg; } +srsran::pdcp_config_t make_nr_srb_pdcp_config_t(const uint8_t bearer_id, bool is_ue) +{ + pdcp_config_t cfg(bearer_id, + PDCP_RB_IS_SRB, + is_ue ? SECURITY_DIRECTION_UPLINK : SECURITY_DIRECTION_DOWNLINK, + is_ue ? SECURITY_DIRECTION_DOWNLINK : SECURITY_DIRECTION_UPLINK, + PDCP_SN_LEN_12, + pdcp_t_reordering_t::ms500, + pdcp_discard_timer_t::infinity, + false, + srsran_rat_t::lte); + return cfg; +} + srsran::pdcp_config_t make_drb_pdcp_config_t(const uint8_t bearer_id, bool is_ue) { pdcp_config_t cfg(bearer_id,