Skip to content

Commit 38d9760

Browse files
andrepuschmanncodebot
authored andcommitted
band_helper: add function to retrieve n_ta_offset value from band
1 parent 8e59cbe commit 38d9760

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

include/srsran/ran/band_helper.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include "srsran/adt/expected.h"
1717
#include "srsran/adt/optional.h"
18+
#include "srsran/ran/n_ta_offset.h"
1819
#include "srsran/ran/ssb_properties.h"
1920
#include <stdint.h>
2021

@@ -288,6 +289,11 @@ unsigned get_nof_coreset0_rbs_not_intersecting_ssb(unsigned cset0_i
288289
ssb_offset_to_pointA offset_to_point_A,
289290
ssb_subcarrier_offset k_ssb);
290291

292+
/// \brief Returns the n_ta_offset for a given band.
293+
/// \param[in] band is <em>NR operating band<\em>, as per TS 38.104, Table 5.2-1. Only FR1 values are supported.
294+
/// \return Value of n_ta_offset.
295+
n_ta_offset get_ta_offset(nr_band band);
296+
291297
} // namespace band_helper
292298

293299
} // namespace srsran

lib/ran/band_helper.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,3 +765,13 @@ unsigned srsran::band_helper::get_nof_coreset0_rbs_not_intersecting_ssb(unsigned
765765
crb_ssb_0 - cset0_cfg.offset + cset0_cfg.nof_rb_coreset};
766766
return cset0_cfg.nof_rb_coreset - cset0_prbs.intersect(ssb_prbs).length();
767767
}
768+
769+
n_ta_offset srsran::band_helper::get_ta_offset(nr_band band)
770+
{
771+
if (get_freq_range(band) == frequency_range::FR1) {
772+
// assume no LTE-NR coexistence
773+
return n_ta_offset::n25600;
774+
} else {
775+
return n_ta_offset::n13792;
776+
}
777+
}

0 commit comments

Comments
 (0)