From dcd94649ef31a02e3082b7299bc5f5c24a916f35 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Wed, 12 Jan 2022 21:27:57 +0100 Subject: [PATCH] enb,parser: add option to set a default tx gain per cell --- lib/include/srsran/interfaces/enb_rrc_interface_types.h | 1 + srsenb/src/enb_cfg_parser.cc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/include/srsran/interfaces/enb_rrc_interface_types.h b/lib/include/srsran/interfaces/enb_rrc_interface_types.h index 998dfc8ea..00e9f664f 100644 --- a/lib/include/srsran/interfaces/enb_rrc_interface_types.h +++ b/lib/include/srsran/interfaces/enb_rrc_interface_types.h @@ -52,6 +52,7 @@ struct cell_cfg_t { uint32_t cell_id; uint16_t tac; uint32_t pci; + double tx_gain; uint16_t root_seq_idx; uint32_t dl_earfcn; double dl_freq_hz; diff --git a/srsenb/src/enb_cfg_parser.cc b/srsenb/src/enb_cfg_parser.cc index 99e06e83a..beb7e4bf2 100644 --- a/srsenb/src/enb_cfg_parser.cc +++ b/srsenb/src/enb_cfg_parser.cc @@ -898,6 +898,7 @@ static int parse_cell_list(all_args_t* args, rrc_cfg_t* rrc_cfg, Setting& root) HANDLEPARSERCODE(parse_required_field(cell_cfg.cell_id, cellroot, "cell_id")); HANDLEPARSERCODE(parse_required_field(cell_cfg.tac, cellroot, "tac")); HANDLEPARSERCODE(parse_required_field(cell_cfg.pci, cellroot, "pci")); + parse_default_field(cell_cfg.tx_gain, cellroot, "tx_gain", 0.0); cell_cfg.pci = cell_cfg.pci % SRSRAN_NUM_PCI; HANDLEPARSERCODE(parse_required_field(cell_cfg.dl_earfcn, cellroot, "dl_earfcn")); parse_default_field(cell_cfg.dl_freq_hz, cellroot, "dl_freq", 0.0); // will be derived from DL EARFCN If not set @@ -1296,6 +1297,7 @@ int set_derived_args(all_args_t* args_, rrc_cfg_t* rrc_cfg_, phy_cfg_t* phy_cfg_ phy_cell_cfg.cell_id = cfg.cell_id; phy_cell_cfg.root_seq_idx = cfg.root_seq_idx; phy_cell_cfg.rf_port = cfg.rf_port; + phy_cell_cfg.gain_db = cfg.tx_gain; phy_cell_cfg.num_ra_preambles = rrc_cfg_->sibs[1].sib2().rr_cfg_common.rach_cfg_common.preamb_info.nof_ra_preambs.to_number();