Process the sample data in the signal buffer.
Data must already be present in the buffer obtained through the handle returnd by rx_buffer()
84 spdlog::trace(
"Processing MBSFN TTI {}", tti);
86 uint32_t sfn = tti / 10;
87 uint8_t sf = tti % 10;
94 srsran_ue_dl_set_mbsfn_area_id(&
_ue_dl, mbsfn_cfg.mbsfn_area_id);
96 if (!
_cell.mbms_dedicated) {
97 srsran_ue_dl_set_non_mbsfn_region(&
_ue_dl, mbsfn_cfg.non_mbsfn_region_length);
101 if (mbsfn_cfg.is_mcch) {
110 if (!mbsfn_cfg.enable) {
111 spdlog::trace(
"PMCH: tti {}: neither MCCH nor MCH enabled. Skipping subframe");
116 if (mbsfn_cfg.is_mcch) {
123 if (mbsfn_cfg.is_mcch) {
128 spdlog::error(
"Getting PDCCH FFT estimate");
140 srsran_pdsch_res_t pmch_dec = {};
143 srsran_softbuffer_rx_reset_tbs(
_pmch_cfg.pdsch_cfg.softbuffers.rx[0],
_pmch_cfg.pdsch_cfg.grant.tb[0].tbs);
146 if (mbsfn_cfg.is_mcch) {
151 spdlog::warn(
"Error decoding PMCH");
156 spdlog::trace(
"PMCH: tti: {}, l_crb={}, tbs={}, mcs={}, crc={}, snr={} dB, n_iter={}\n",
161 pmch_dec.crc ?
"OK" :
"KO",
163 pmch_dec.avg_iterations_block);
165 if (mbsfn_cfg.is_mcch) {
176 static_cast<uint32_t
>(
_pmch_cfg.pdsch_cfg.grant.tb[0].tbs) / 8);
180 if (srsran::mch_lcid::MCH_SCHED_INFO ==
mch_mac_msg.get()->mch_ce_type()) {
183 while (
mch_mac_msg.get()->get_next_mch_sched_info(&lcid, &stop)) {
185 spdlog::debug(
"Scheduling stop for LCID {} in sf {}", lcid, stop);
190 spdlog::trace(
"Processing MAC MCH PDU entered, lcid {}", lcid);
192 if (lcid >= SRSRAN_N_MCH_LCIDS) {
193 spdlog::warn(
"Radio bearer id must be in [0:%d] - %d", SRSRAN_N_MCH_LCIDS, lcid);
194 if (mbsfn_cfg.is_mcch) {
204 const std::lock_guard<std::mutex> lock(
_rlc_mutex);
211 if (mbsfn_cfg.is_mcch) {
217 spdlog::warn(
"PMCH in TTI {} failed with CRC error", tti);
222 if (!mbsfn_cfg.is_mcch) {
223 for (uint32_t i = 0; i <
_phy.
mcch().nof_pmch_info; i++) {
224 unsigned fn_in_scheduling_period = sfn % srsran::enum_to_number(
_phy.
mcch().pmch_info_list[i].mch_sched_period);
226 if (
_cell.mbms_dedicated) {
227 sf_idx = fn_in_scheduling_period * 10 + sf - (fn_in_scheduling_period / 4) - 1;
229 sf_idx = fn_in_scheduling_period * 6 + (sf < 6 ? sf - 1 : sf - 3);
231 spdlog::debug(
"tti{}, sfn {}, sf {}, fn_in_scheduling_period {}, sf_idf {}", tti, sfn, sf, fn_in_scheduling_period, sf_idx);
235 if ( sf_idx >= itr->second ) {
236 const std::lock_guard<std::mutex> lock(
_rlc_mutex);
237 spdlog::debug(
"Stopping LCID {} in tti {} (idx in rf {})", itr->first, tti, sf_idx);
238 _rlc.stop_mch(i, itr->first);
241 itr = std::next(itr);
250 return mbsfn_cfg.is_mcch ? 0 : 1;
static std::map< uint8_t, uint16_t > _sched_stops
static std::mutex _rlc_mutex
uint8_t _payload_buffer[_payload_buffer_sz]
static std::mutex _sched_stop_mutex
const std::vector< uint8_t > mch_data() const
Get the constellation diagram data (I/Q data of the subcarriers after CE)
srsran_mbsfn_cfg_t mbsfn_config_for_tti(uint32_t tti, unsigned &area)
Returns the MBSFN configuration (MCS, etc) for the subframe with the passed TTI.
srsran::mcch_msg_t & mcch()
void SetData(std::vector< uint8_t > data)
ChannelInfo _mcch
RX info for MCCH.
std::map< uint32_t, ChannelInfo > _mch
RX info for MCHs.