gnb,mac: add compile-time parameter to write SIBs to MAC PCAP

set to disabled by default
This commit is contained in:
Andre Puschmann 2021-11-16 16:26:03 +01:00
parent 3b3630d444
commit 7f6abb8d6f
1 changed files with 11 additions and 0 deletions

View File

@ -20,6 +20,8 @@
#include "srsran/common/time_prof.h"
#include "srsran/mac/mac_rar_pdu_nr.h"
//#define WRITE_SIB_PCAP
namespace srsenb {
class mac_nr_rx
@ -484,6 +486,15 @@ mac_nr::dl_sched_t* mac_nr::get_dl_sched(const srsran_slot_cfg_t& slot_cfg)
} else if (pdsch.sch.grant.rnti_type == srsran_rnti_type_si) {
uint32_t sib_idx = dl_res->sib_idxs[si_count++];
pdsch.data[0] = bcch_dlsch_payload[sib_idx].payload.get();
#ifdef WRITE_SIB_PCAP
if (pcap != nullptr) {
pcap->write_dl_si_rnti_nr(bcch_dlsch_payload[sib_idx].payload->msg,
bcch_dlsch_payload[sib_idx].payload->N_bytes,
SI_RNTI,
0,
slot_cfg.idx);
}
#endif
}
}
for (auto& u : ue_db) {