Skip to content

Commit 6dd2db3

Browse files
herlesupreethcodebot
authored andcommitted
ran: add helper functions to compute nof. DL and nof. UL slots in TDD period
1 parent 5226886 commit 6dd2db3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

include/srsran/ran/tdd/tdd_ul_dl_config.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@ inline unsigned nof_slots_per_tdd_period(const tdd_ul_dl_config_common& cfg)
4747
(cfg.pattern2.has_value() ? cfg.pattern2->dl_ul_tx_period_nof_slots : 0U);
4848
}
4949

50+
/// \brief Calculates number of slots with all DL symbols in the TDD UL-DL configuration.
51+
inline unsigned nof_full_dl_slots_per_tdd_period(const tdd_ul_dl_config_common& cfg)
52+
{
53+
return cfg.pattern1.nof_dl_slots + (cfg.pattern2.has_value() ? cfg.pattern2->nof_dl_slots : 0U);
54+
}
55+
56+
/// \brief Calculates number of slots with all UL symbols in the TDD UL-DL configuration.
57+
inline unsigned nof_full_ul_slots_per_tdd_period(const tdd_ul_dl_config_common& cfg)
58+
{
59+
return cfg.pattern1.nof_ul_slots + (cfg.pattern2.has_value() ? cfg.pattern2->nof_ul_slots : 0U);
60+
}
61+
5062
/// \brief Calculates whether there are symbols for DL in the current slot index.
5163
bool has_active_tdd_dl_symbols(const tdd_ul_dl_config_common& cfg, unsigned slot_index);
5264

0 commit comments

Comments
 (0)