Add in srsue and srsenb SSB configuration in log

master
Xavier Arteaga 3 years ago committed by Xavier Arteaga
parent c88774a3f4
commit 98f304bfa8

@ -138,6 +138,13 @@ int worker_pool::set_common_cfg(const phy_interface_rrc_nr::common_cfg_t& common
ssb_cfg.scaling = ssb_cfg.scaling =
srsran_convert_dB_to_amplitude(srsran_gnb_dl_get_maximum_signal_power_dBfs(common_cfg.carrier.nof_prb)); srsran_convert_dB_to_amplitude(srsran_gnb_dl_get_maximum_signal_power_dBfs(common_cfg.carrier.nof_prb));
// Print SSB configuration, helps debugging gNb and UE
if (logger.info.enabled()) {
std::array<char, 512> ssb_cfg_str = {};
srsran_ssb_cfg_to_str(&ssb_cfg, ssb_cfg_str.data(), (uint32_t)ssb_cfg_str.size());
logger.info("Setting SSB configuration %s", ssb_cfg_str.data());
}
// For each worker set configuration // For each worker set configuration
for (uint32_t i = 0; i < pool.get_nof_workers(); i++) { for (uint32_t i = 0; i < pool.get_nof_workers(); i++) {
// Reserve worker from pool // Reserve worker from pool

@ -62,6 +62,14 @@ bool slot_sync::init(const args_t& args, stack_interface_phy_nr* stack_, srsran:
int slot_sync::set_sync_cfg(const srsran_ue_sync_nr_cfg_t& cfg) int slot_sync::set_sync_cfg(const srsran_ue_sync_nr_cfg_t& cfg)
{ {
// Print the configuration, it is essential to make sure the UE synchronizes with the wight cell
if (logger.info.enabled()) {
std::array<char, 512> ssb_cfg_str = {};
srsran_ssb_cfg_to_str(&cfg.ssb, ssb_cfg_str.data(), (uint32_t)ssb_cfg_str.size());
logger.info("SYNC: Setting SSB configuration %s Tracking N_id=%d.", ssb_cfg_str.data(), cfg.N_id);
}
// Set the synchronization configuration
if (srsran_ue_sync_nr_set_cfg(&ue_sync_nr, &cfg) < SRSRAN_SUCCESS) { if (srsran_ue_sync_nr_set_cfg(&ue_sync_nr, &cfg) < SRSRAN_SUCCESS) {
logger.error("SYNC: failed to set cell configuration for N_id %d", cfg.N_id); logger.error("SYNC: failed to set cell configuration for N_id %d", cfg.N_id);
return SRSRAN_ERROR; return SRSRAN_ERROR;

Loading…
Cancel
Save