diff --git a/lib/include/srslte/interfaces/enb_interfaces.h b/lib/include/srslte/interfaces/enb_interfaces.h index 9b3073fa0..4dd64f6b5 100644 --- a/lib/include/srslte/interfaces/enb_interfaces.h +++ b/lib/include/srslte/interfaces/enb_interfaces.h @@ -245,10 +245,6 @@ public: asn1::rrc::mcch_msg_s mcch; }; - typedef struct { - phy_cfg_mbsfn_t mbsfn; - } phy_rrc_cfg_t; - virtual void configure_mbsfn(asn1::rrc::sib_type2_s* sib2, asn1::rrc::sib_type13_r9_s* sib13, const asn1::rrc::mcch_msg_s& mcch) = 0; @@ -257,9 +253,9 @@ public: bool configured = false; ///< Indicates whether PHY shall consider configuring this cell/carrier uint32_t enb_cc_idx = 0; ///< eNb Cell index srslte::phy_cfg_t phy_cfg = {}; ///< Dedicated physical layer configuration - } phy_rrc_dedicated_t; + } phy_rrc_cfg_t; - typedef std::vector phy_rrc_dedicated_list_t; + typedef std::vector phy_rrc_cfg_list_t; /** * Sets the physical layer dedicated configuration for a given RNTI. The dedicated configuration list shall provide @@ -268,20 +264,20 @@ public: * - Moving primary to another serving cell * - Add/Remove secondary serving cells * - * Remind this call will partially reconfigure the primary serving cell, `complete_config_dedicated``shall be called + * Remind this call will partially reconfigure the primary serving cell, `complete_config``shall be called * in order to complete the configuration. * * @param rnti the given RNTI - * @param dedicated_list Physical layer configuration for the indicated eNb cell + * @param phy_cfg_list Physical layer configuration for the indicated eNb cell */ - virtual void set_config_dedicated(uint16_t rnti, const phy_rrc_dedicated_list_t& dedicated_list) = 0; + virtual void set_config(uint16_t rnti, const phy_rrc_cfg_list_t& phy_cfg_list) = 0; /** * Instructs the physical layer the configuration has been complete from upper layers for a given RNTI * * @param rnti the given UE identifier (RNTI) */ - virtual void complete_config_dedicated(uint16_t rnti) = 0; + virtual void complete_config(uint16_t rnti) = 0; }; class mac_interface_rrc diff --git a/srsenb/hdr/phy/phy.h b/srsenb/hdr/phy/phy.h index 7e1100786..02542d80a 100644 --- a/srsenb/hdr/phy/phy.h +++ b/srsenb/hdr/phy/phy.h @@ -64,8 +64,8 @@ public: const asn1::rrc::mcch_msg_s& mcch) override; void start_plot() override; - void set_config_dedicated(uint16_t rnti, const phy_rrc_dedicated_list_t& dedicated_list) override; - void complete_config_dedicated(uint16_t rnti) override; + void set_config(uint16_t rnti, const phy_rrc_cfg_list_t& phy_cfg_list) override; + void complete_config(uint16_t rnti) override; void get_metrics(phy_metrics_t metrics[ENB_METRICS_MAX_USERS]) override; @@ -73,8 +73,8 @@ public: void radio_failure() override{}; private: - phy_rrc_cfg_t phy_rrc_config = {}; - uint32_t nof_workers = 0; + phy_cfg_mbsfn_t mbsfn_config = {}; + uint32_t nof_workers = 0; const static int MAX_WORKERS = 4; diff --git a/srsenb/hdr/phy/phy_ue_db.h b/srsenb/hdr/phy/phy_ue_db.h index 3a0f46098..8c1bbf810 100644 --- a/srsenb/hdr/phy/phy_ue_db.h +++ b/srsenb/hdr/phy/phy_ue_db.h @@ -239,9 +239,9 @@ public: * first element of the list must be the PCell and the rest will be SCell in the order * * @param rnti identifier of the user - * @param phy_rrc_dedicated_list List of the eNb physical layer configuration coming for the RRC + * @param phy_cfg_list List of the eNb physical layer configuration coming for the RRC */ - void addmod_rnti(uint16_t rnti, const phy_interface_rrc_lte::phy_rrc_dedicated_list_t& phy_rrc_dedicated_list); + void addmod_rnti(uint16_t rnti, const phy_interface_rrc_lte::phy_rrc_cfg_list_t& phy_cfg_list); /** * Removes a whole UE entry from the UE database diff --git a/srsenb/hdr/stack/rrc/rrc_ue.h b/srsenb/hdr/stack/rrc/rrc_ue.h index 9dccead5c..d389b0ba4 100644 --- a/srsenb/hdr/stack/rrc/rrc_ue.h +++ b/srsenb/hdr/stack/rrc/rrc_ue.h @@ -150,7 +150,7 @@ private: int fill_scell_to_addmod_list(asn1::rrc::rrc_conn_recfg_r8_ies_s* conn_reconf); ///< UE's Physical layer dedicated configuration - phy_interface_rrc_lte::phy_rrc_dedicated_list_t phy_rrc_dedicated_list = {}; + phy_interface_rrc_lte::phy_rrc_cfg_list_t phy_rrc_dedicated_list = {}; /** * Setups the PCell physical layer common configuration of the UE from the SIB2 message. This methods is designed to diff --git a/srsenb/src/phy/phy.cc b/srsenb/src/phy/phy.cc index c5155d485..56c5aa4e2 100644 --- a/srsenb/src/phy/phy.cc +++ b/srsenb/src/phy/phy.cc @@ -154,7 +154,7 @@ int phy::add_rnti(uint16_t rnti, uint32_t pcell_index) { if (SRSLTE_RNTI_ISUSER(rnti)) { // Create default PHY configuration with the desired PCell index - phy_interface_rrc_lte::phy_rrc_dedicated_list_t phy_rrc_dedicated_list(1); + phy_interface_rrc_lte::phy_rrc_cfg_list_t phy_rrc_dedicated_list(1); phy_rrc_dedicated_list[0].enb_cc_idx = pcell_index; workers_common.ue_db.addmod_rnti(rnti, phy_rrc_dedicated_list); @@ -240,13 +240,13 @@ void phy::get_metrics(phy_metrics_t metrics[ENB_METRICS_MAX_USERS]) /***** RRC->PHY interface **********/ -void phy::set_config_dedicated(uint16_t rnti, const phy_rrc_dedicated_list_t& dedicated_list) +void phy::set_config(uint16_t rnti, const phy_rrc_cfg_list_t& phy_cfg_list) { // Update UE Database - workers_common.ue_db.addmod_rnti(rnti, dedicated_list); + workers_common.ue_db.addmod_rnti(rnti, phy_cfg_list); // Iterate over the list and add the RNTIs - for (const phy_rrc_dedicated_t& config : dedicated_list) { + for (const phy_rrc_cfg_t& config : phy_cfg_list) { // Add RNTI to eNb cell/carrier. // - Do not ignore PCell, it could have changed // - Do not remove RNTI from unused workers, it will be removed when the UE is released @@ -259,7 +259,7 @@ void phy::set_config_dedicated(uint16_t rnti, const phy_rrc_dedicated_list_t& de } } -void phy::complete_config_dedicated(uint16_t rnti) +void phy::complete_config(uint16_t rnti) { // Forwards call to the UE Database workers_common.ue_db.complete_config(rnti); @@ -274,24 +274,24 @@ void phy::configure_mbsfn(sib_type2_s* sib2, sib_type13_r9_s* sib13, const mcch_ if (sib2->mbsfn_sf_cfg_list.size() > 1) { Warning("SIB2 has %d MBSFN subframe configs - only 1 supported\n", sib2->mbsfn_sf_cfg_list.size()); } - phy_rrc_config.mbsfn.mbsfn_subfr_cnfg = sib2->mbsfn_sf_cfg_list[0]; + mbsfn_config.mbsfn_subfr_cnfg = sib2->mbsfn_sf_cfg_list[0]; } } else { fprintf(stderr, "SIB2 has no MBSFN subframe config specified\n"); return; } - phy_rrc_config.mbsfn.mbsfn_notification_cnfg = sib13->notif_cfg_r9; + mbsfn_config.mbsfn_notification_cnfg = sib13->notif_cfg_r9; if (sib13->mbsfn_area_info_list_r9.size() > 0) { if (sib13->mbsfn_area_info_list_r9.size() > 1) { Warning("SIB13 has %d MBSFN area info elements - only 1 supported\n", sib13->mbsfn_area_info_list_r9.size()); } - phy_rrc_config.mbsfn.mbsfn_area_info = sib13->mbsfn_area_info_list_r9[0]; + mbsfn_config.mbsfn_area_info = sib13->mbsfn_area_info_list_r9[0]; } - phy_rrc_config.mbsfn.mcch = mcch; + mbsfn_config.mcch = mcch; - workers_common.configure_mbsfn(&phy_rrc_config.mbsfn); + workers_common.configure_mbsfn(&mbsfn_config); } // Start GUI diff --git a/srsenb/src/phy/phy_ue_db.cc b/srsenb/src/phy/phy_ue_db.cc index 5a40593a1..0b2b8a28c 100644 --- a/srsenb/src/phy/phy_ue_db.cc +++ b/srsenb/src/phy/phy_ue_db.cc @@ -263,8 +263,7 @@ void phy_ue_db::clear_tti_pending_ack(uint32_t tti) } } -void phy_ue_db::addmod_rnti(uint16_t rnti, - const phy_interface_rrc_lte::phy_rrc_dedicated_list_t& phy_rrc_dedicated_list) +void phy_ue_db::addmod_rnti(uint16_t rnti, const phy_interface_rrc_lte::phy_rrc_cfg_list_t& phy_cfg_list) { std::lock_guard lock(mutex); @@ -280,9 +279,9 @@ void phy_ue_db::addmod_rnti(uint16_t uint32_t nof_configured_scell = 0; // Iterate PHY RRC configuration for each UE cell/carrier - uint32_t nof_cc = SRSLTE_MIN(phy_rrc_dedicated_list.size(), SRSLTE_MAX_CARRIERS); + uint32_t nof_cc = SRSLTE_MIN(phy_cfg_list.size(), SRSLTE_MAX_CARRIERS); for (uint32_t ue_cc_idx = 0; ue_cc_idx < nof_cc; ue_cc_idx++) { - const phy_interface_rrc_lte::phy_rrc_dedicated_t& phy_rrc_dedicated = phy_rrc_dedicated_list[ue_cc_idx]; + const phy_interface_rrc_lte::phy_rrc_cfg_t& phy_rrc_dedicated = phy_cfg_list[ue_cc_idx]; // Configured, add/modify entry in the cell_info map cell_info_t& cell_info = ue.cell_info[ue_cc_idx]; diff --git a/srsenb/src/stack/rrc/rrc_ue.cc b/srsenb/src/stack/rrc/rrc_ue.cc index e00a85834..f4d78711f 100644 --- a/srsenb/src/stack/rrc/rrc_ue.cc +++ b/srsenb/src/stack/rrc/rrc_ue.cc @@ -299,7 +299,7 @@ void rrc::ue::send_connection_setup() void rrc::ue::handle_rrc_con_setup_complete(rrc_conn_setup_complete_s* msg, srslte::unique_byte_buffer_t pdu) { // Inform PHY about the configuration completion - parent->phy->complete_config_dedicated(rnti); + parent->phy->complete_config(rnti); parent->rrc_log->info("RRCConnectionSetupComplete transaction ID: %d\n", msg->rrc_transaction_id); rrc_conn_setup_complete_r8_ies_s* msg_r8 = &msg->crit_exts.c1().rrc_conn_setup_complete_r8(); @@ -414,7 +414,7 @@ void rrc::ue::send_connection_reest() void rrc::ue::handle_rrc_con_reest_complete(rrc_conn_reest_complete_s* msg, srslte::unique_byte_buffer_t pdu) { // Inform PHY about the configuration completion - parent->phy->complete_config_dedicated(rnti); + parent->phy->complete_config(rnti); parent->rrc_log->info("RRCConnectionReestablishComplete transaction ID: %d\n", msg->rrc_transaction_id); @@ -629,7 +629,7 @@ void rrc::ue::send_connection_reconf_new_bearer() void rrc::ue::handle_rrc_reconf_complete(rrc_conn_recfg_complete_s* msg, srslte::unique_byte_buffer_t pdu) { // Inform PHY about the configuration completion - parent->phy->complete_config_dedicated(rnti); + parent->phy->complete_config(rnti); if (last_rrc_conn_recfg.rrc_transaction_id == msg->rrc_transaction_id) { // Finally, add secondary carriers to MAC @@ -1103,7 +1103,7 @@ int rrc::ue::fill_scell_to_addmod_list(asn1::rrc::rrc_conn_recfg_r8_ies_s* conn_ list.push_back(cell); // Create new PHY configuration structure for this SCell - phy_interface_rrc_lte::phy_rrc_dedicated_t scell_phy_rrc_ded = {}; + phy_interface_rrc_lte::phy_rrc_cfg_t scell_phy_rrc_ded = {}; srslte::set_phy_cfg_t_scell_config(&scell_phy_rrc_ded.phy_cfg, cell); scell_phy_rrc_ded.configured = true; @@ -1315,7 +1315,7 @@ void rrc::ue::apply_setup_phy_common(const asn1::rrc::rr_cfg_common_sib_s& confi // Send configuration to physical layer if (parent->phy != nullptr) { - parent->phy->set_config_dedicated(rnti, phy_rrc_dedicated_list); + parent->phy->set_config(rnti, phy_rrc_dedicated_list); } } @@ -1336,7 +1336,7 @@ void rrc::ue::apply_setup_phy_config_dedicated(const asn1::rrc::phys_cfg_ded_s& // Send configuration to physical layer if (parent->phy != nullptr) { - parent->phy->set_config_dedicated(rnti, phy_rrc_dedicated_list); + parent->phy->set_config(rnti, phy_rrc_dedicated_list); } } @@ -1374,7 +1374,7 @@ void rrc::ue::apply_reconf_phy_config(const asn1::rrc::rrc_conn_recfg_r8_ies_s& // Send configuration to physical layer if (parent->phy != nullptr) { - parent->phy->set_config_dedicated(rnti, phy_rrc_dedicated_list); + parent->phy->set_config(rnti, phy_rrc_dedicated_list); } } diff --git a/srsenb/test/common/dummy_classes.h b/srsenb/test/common/dummy_classes.h index 7346ff894..f3e38f9a8 100644 --- a/srsenb/test/common/dummy_classes.h +++ b/srsenb/test/common/dummy_classes.h @@ -117,8 +117,8 @@ public: asn1::rrc::sib_type13_r9_s* sib13, const asn1::rrc::mcch_msg_s& mcch) override {} - void set_config_dedicated(uint16_t rnti, const phy_rrc_dedicated_list_t& dedicated_list) override {} - void complete_config_dedicated(uint16_t rnti) override{}; + void set_config(uint16_t rnti, const phy_rrc_cfg_list_t& dedicated_list) override {} + void complete_config(uint16_t rnti) override{}; }; class gtpu_dummy : public gtpu_interface_rrc diff --git a/srsenb/test/phy/enb_phy_test.cc b/srsenb/test/phy/enb_phy_test.cc index af8005e74..d696ee344 100644 --- a/srsenb/test/phy/enb_phy_test.cc +++ b/srsenb/test/phy/enb_phy_test.cc @@ -266,7 +266,7 @@ private: static constexpr uint32_t cfi = 2; srsenb::phy_cell_cfg_list_t phy_cell_cfg; - srsenb::phy_interface_rrc_lte::phy_rrc_dedicated_list_t phy_rrc; + srsenb::phy_interface_rrc_lte::phy_rrc_cfg_list_t phy_rrc; std::mutex mutex; std::condition_variable cvar; srslte::log_filter log_h; @@ -329,10 +329,10 @@ private: uint32_t ul_riv = 0; public: - explicit dummy_stack(const srsenb::phy_cfg_t& phy_cfg_, - const srsenb::phy_interface_rrc_lte::phy_rrc_dedicated_list_t& phy_rrc_, - const std::string& log_level, - uint16_t rnti_) : + explicit dummy_stack(const srsenb::phy_cfg_t& phy_cfg_, + const srsenb::phy_interface_rrc_lte::phy_rrc_cfg_list_t& phy_rrc_, + const std::string& log_level, + uint16_t rnti_) : log_h("STACK"), ue_rnti(rnti_), random_gen(srslte_random_init(rnti_)), @@ -764,7 +764,7 @@ private: srslte_ul_sf_cfg_t sf_ul_cfg = {}; srslte_softbuffer_tx_t softbuffer_tx = {}; uint8_t* tx_data = nullptr; - srsenb::phy_interface_rrc_lte::phy_rrc_dedicated_list_t phy_rrc_cfg = {}; + srsenb::phy_interface_rrc_lte::phy_rrc_cfg_list_t phy_rrc_cfg = {}; srslte::log_filter log_h; std::map last_ri = {}; @@ -888,7 +888,7 @@ public: srslte_softbuffer_tx_free(&softbuffer_tx); } - void reconfigure(const srsenb::phy_interface_rrc_lte::phy_rrc_dedicated_list_t& phy_rrc_cfg_) + void reconfigure(const srsenb::phy_interface_rrc_lte::phy_rrc_cfg_list_t& phy_rrc_cfg_) { // Copy new configuration phy_rrc_cfg = phy_rrc_cfg_; @@ -1149,7 +1149,7 @@ private: args_t args = {}; ///< Test arguments srsenb::phy_args_t phy_args; ///< PHY arguments srsenb::phy_cfg_t phy_cfg; ///< eNb Cell/Carrier configuration - srsenb::phy_interface_rrc_lte::phy_rrc_dedicated_list_t phy_rrc_cfg; ///< UE PHY configuration + srsenb::phy_interface_rrc_lte::phy_rrc_cfg_list_t phy_rrc_cfg; ///< UE PHY configuration uint64_t tti_counter = 0; typedef enum { @@ -1260,8 +1260,8 @@ public: /// Initiate eNb PHY with the given RNTI enb_phy->init(phy_args, phy_cfg, radio.get(), stack.get()); - enb_phy->set_config_dedicated(args.rnti, phy_rrc_cfg); - enb_phy->complete_config_dedicated(args.rnti); + enb_phy->set_config(args.rnti, phy_rrc_cfg); + enb_phy->complete_config(args.rnti); enb_phy->set_activation_deactivation_scell(args.rnti, activation); /// Create dummy UE instance @@ -1319,8 +1319,8 @@ public: } // Reconfigure eNb PHY - enb_phy->set_config_dedicated(args.rnti, phy_rrc_cfg); - enb_phy->complete_config_dedicated(args.rnti); + enb_phy->set_config(args.rnti, phy_rrc_cfg); + enb_phy->complete_config(args.rnti); enb_phy->set_activation_deactivation_scell(args.rnti, activation); // Reconfigure UE PHY