pcap: add CC index when writing PCAP

master
Andre Puschmann 5 years ago
parent df31a5c4cc
commit 664170fec6

@ -38,15 +38,16 @@ public:
void set_ue_id(uint16_t ue_id); void set_ue_id(uint16_t ue_id);
void write_ul_crnti(uint8_t* pdu, uint32_t pdu_len_bytes, uint16_t crnti, uint32_t reTX, uint32_t tti); void
void write_dl_crnti(uint8_t* pdu, uint32_t pdu_len_bytes, uint16_t crnti, bool crc_ok, uint32_t tti); write_ul_crnti(uint8_t* pdu, uint32_t pdu_len_bytes, uint16_t crnti, uint32_t reTX, uint32_t tti, uint8_t cc_idx);
void write_dl_ranti(uint8_t* pdu, uint32_t pdu_len_bytes, uint16_t ranti, bool crc_ok, uint32_t tti); void write_dl_crnti(uint8_t* pdu, uint32_t pdu_len_bytes, uint16_t crnti, bool crc_ok, uint32_t tti, uint8_t cc_idx);
void write_dl_ranti(uint8_t* pdu, uint32_t pdu_len_bytes, uint16_t ranti, bool crc_ok, uint32_t tti, uint8_t cc_idx);
// SI and BCH only for DL // SI and BCH only for DL
void write_dl_sirnti(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti); void write_dl_sirnti(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti, uint8_t cc_idx);
void write_dl_bch(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti); void write_dl_bch(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti, uint8_t cc_idx);
void write_dl_pch(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti); void write_dl_pch(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti, uint8_t cc_idx);
void write_dl_mch(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti); void write_dl_mch(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti, uint8_t cc_idx);
void write_ul_rrc_pdu(const uint8_t* input, const int32_t input_len); void write_ul_rrc_pdu(const uint8_t* input, const int32_t input_len);
@ -58,6 +59,7 @@ private:
uint32_t pdu_len_bytes, uint32_t pdu_len_bytes,
uint32_t reTX, uint32_t reTX,
bool crc_ok, bool crc_ok,
uint8_t cc_idx,
uint32_t tti, uint32_t tti,
uint16_t crnti_, uint16_t crnti_,
uint8_t direction, uint8_t direction,

@ -75,6 +75,7 @@ typedef struct pcaprec_hdr_s {
#define MAC_LTE_PREDFINED_DATA_TAG 0x05 #define MAC_LTE_PREDFINED_DATA_TAG 0x05
#define MAC_LTE_RETX_TAG 0x06 #define MAC_LTE_RETX_TAG 0x06
#define MAC_LTE_CRC_STATUS_TAG 0x07 #define MAC_LTE_CRC_STATUS_TAG 0x07
#define MAC_LTE_CARRIER_ID_TAG 0x0A
#define MAC_LTE_NB_MODE_TAG 0x0F #define MAC_LTE_NB_MODE_TAG 0x0F
/* Context information for every MAC PDU that will be logged */ /* Context information for every MAC PDU that will be logged */
@ -86,6 +87,7 @@ typedef struct MAC_Context_Info_t {
unsigned short ueid; unsigned short ueid;
unsigned char isRetx; unsigned char isRetx;
unsigned char crcStatusOK; unsigned char crcStatusOK;
unsigned char cc_idx;
unsigned short sysFrameNumber; unsigned short sysFrameNumber;
unsigned short subFrameNumber; unsigned short subFrameNumber;

@ -399,7 +399,7 @@ public:
virtual void tb_decoded(uint32_t cc_idx, mac_grant_dl_t grant, bool ack[SRSLTE_MAX_CODEWORDS]) = 0; virtual void tb_decoded(uint32_t cc_idx, mac_grant_dl_t grant, bool ack[SRSLTE_MAX_CODEWORDS]) = 0;
/* Indicate successful decoding of BCH TB through PBCH */ /* Indicate successful decoding of BCH TB through PBCH */
virtual void bch_decoded_ok(uint8_t* payload, uint32_t len) = 0; virtual void bch_decoded_ok(uint32_t cc_idx, uint8_t* payload, uint32_t len) = 0;
/* Indicate successful decoding of MCH TB through PMCH */ /* Indicate successful decoding of MCH TB through PMCH */
virtual void mch_decoded(uint32_t len, bool crc) = 0; virtual void mch_decoded(uint32_t len, bool crc) = 0;

@ -63,56 +63,72 @@ void mac_pcap::pack_and_write(uint8_t* pdu,
uint32_t pdu_len_bytes, uint32_t pdu_len_bytes,
uint32_t reTX, uint32_t reTX,
bool crc_ok, bool crc_ok,
uint8_t cc_idx,
uint32_t tti, uint32_t tti,
uint16_t crnti, uint16_t crnti,
uint8_t direction, uint8_t direction,
uint8_t rnti_type) uint8_t rnti_type)
{ {
if (enable_write) { if (enable_write) {
MAC_Context_Info_t context = { MAC_Context_Info_t context = {};
FDD_RADIO, context.radioType = FDD_RADIO;
direction, context.direction = direction;
rnti_type, context.rntiType = rnti_type;
crnti, /* RNTI */ context.rnti = crnti;
(uint16_t)ue_id, /* UEId */ context.ueid = (uint16_t)ue_id;
(uint8_t)reTX, /* Retx */ context.isRetx = (uint8_t)reTX;
crc_ok, /* CRC Stsatus (i.e. OK) */ context.crcStatusOK = crc_ok;
(uint16_t)(tti / 10), /* Sysframe number */ context.cc_idx = cc_idx;
(uint16_t)(tti % 10) /* Subframe number */ context.sysFrameNumber = (uint16_t)(tti / 10);
}; context.subFrameNumber = (uint16_t)(tti % 10);
if (pdu) { if (pdu) {
LTE_PCAP_MAC_WritePDU(pcap_file, &context, pdu, pdu_len_bytes); LTE_PCAP_MAC_WritePDU(pcap_file, &context, pdu, pdu_len_bytes);
} }
} }
} }
void mac_pcap::write_dl_crnti(uint8_t* pdu, uint32_t pdu_len_bytes, uint16_t rnti, bool crc_ok, uint32_t tti) void mac_pcap::write_dl_crnti(uint8_t* pdu,
uint32_t pdu_len_bytes,
uint16_t rnti,
bool crc_ok,
uint32_t tti,
uint8_t cc_idx)
{ {
pack_and_write(pdu, pdu_len_bytes, 0, crc_ok, tti, rnti, DIRECTION_DOWNLINK, C_RNTI); pack_and_write(pdu, pdu_len_bytes, 0, crc_ok, cc_idx, tti, rnti, DIRECTION_DOWNLINK, C_RNTI);
} }
void mac_pcap::write_dl_ranti(uint8_t* pdu, uint32_t pdu_len_bytes, uint16_t rnti, bool crc_ok, uint32_t tti) void mac_pcap::write_dl_ranti(uint8_t* pdu,
uint32_t pdu_len_bytes,
uint16_t rnti,
bool crc_ok,
uint32_t tti,
uint8_t cc_idx)
{ {
pack_and_write(pdu, pdu_len_bytes, 0, crc_ok, tti, rnti, DIRECTION_DOWNLINK, RA_RNTI); pack_and_write(pdu, pdu_len_bytes, 0, crc_ok, cc_idx, tti, rnti, DIRECTION_DOWNLINK, RA_RNTI);
} }
void mac_pcap::write_ul_crnti(uint8_t* pdu, uint32_t pdu_len_bytes, uint16_t rnti, uint32_t reTX, uint32_t tti) void mac_pcap::write_ul_crnti(uint8_t* pdu,
uint32_t pdu_len_bytes,
uint16_t rnti,
uint32_t reTX,
uint32_t tti,
uint8_t cc_idx)
{ {
pack_and_write(pdu, pdu_len_bytes, reTX, true, tti, rnti, DIRECTION_UPLINK, C_RNTI); pack_and_write(pdu, pdu_len_bytes, reTX, true, cc_idx, tti, rnti, DIRECTION_UPLINK, C_RNTI);
} }
void mac_pcap::write_dl_bch(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti) void mac_pcap::write_dl_bch(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti, uint8_t cc_idx)
{ {
pack_and_write(pdu, pdu_len_bytes, 0, crc_ok, tti, 0, DIRECTION_DOWNLINK, NO_RNTI); pack_and_write(pdu, pdu_len_bytes, 0, crc_ok, cc_idx, tti, 0, DIRECTION_DOWNLINK, NO_RNTI);
} }
void mac_pcap::write_dl_pch(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti) void mac_pcap::write_dl_pch(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti, uint8_t cc_idx)
{ {
pack_and_write(pdu, pdu_len_bytes, 0, crc_ok, tti, SRSLTE_PRNTI, DIRECTION_DOWNLINK, P_RNTI); pack_and_write(pdu, pdu_len_bytes, 0, crc_ok, cc_idx, tti, SRSLTE_PRNTI, DIRECTION_DOWNLINK, P_RNTI);
} }
void mac_pcap::write_dl_mch(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti) void mac_pcap::write_dl_mch(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti, uint8_t cc_idx)
{ {
pack_and_write(pdu, pdu_len_bytes, 0, crc_ok, tti, SRSLTE_MRNTI, DIRECTION_DOWNLINK, M_RNTI); pack_and_write(pdu, pdu_len_bytes, 0, crc_ok, cc_idx, tti, SRSLTE_MRNTI, DIRECTION_DOWNLINK, M_RNTI);
} }
void mac_pcap::write_dl_sirnti(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti) void mac_pcap::write_dl_sirnti(uint8_t* pdu, uint32_t pdu_len_bytes, bool crc_ok, uint32_t tti, uint8_t cc_idx)
{ {
pack_and_write(pdu, pdu_len_bytes, 0, crc_ok, tti, SRSLTE_SIRNTI, DIRECTION_DOWNLINK, SI_RNTI); pack_and_write(pdu, pdu_len_bytes, 0, crc_ok, cc_idx, tti, SRSLTE_SIRNTI, DIRECTION_DOWNLINK, SI_RNTI);
} }
void mac_pcap::write_ul_rrc_pdu(const uint8_t* input, const int32_t input_len) void mac_pcap::write_ul_rrc_pdu(const uint8_t* input, const int32_t input_len)
@ -185,6 +201,6 @@ void mac_pcap::write_ul_rrc_pdu(const uint8_t* input, const int32_t input_len)
memcpy(pdu_ptr, &pad, 1); memcpy(pdu_ptr, &pad, 1);
pdu_ptr += 1; pdu_ptr += 1;
write_ul_crnti(pdu, pdu_ptr - pdu, 14931, true, 0); write_ul_crnti(pdu, pdu_ptr - pdu, 14931, true, 0, 0);
} }
} // namespace srslte } // namespace srslte

@ -102,6 +102,10 @@ int LTE_PCAP_MAC_WritePDU(FILE* fd, MAC_Context_Info_t* context, const unsigned
context_header[offset++] = MAC_LTE_CRC_STATUS_TAG; context_header[offset++] = MAC_LTE_CRC_STATUS_TAG;
context_header[offset++] = context->crcStatusOK; context_header[offset++] = context->crcStatusOK;
/* CC index */
context_header[offset++] = MAC_LTE_CARRIER_ID_TAG;
context_header[offset++] = context->cc_idx;
/* NB-IoT mode tag */ /* NB-IoT mode tag */
context_header[offset++] = MAC_LTE_NB_MODE_TAG; context_header[offset++] = MAC_LTE_NB_MODE_TAG;
context_header[offset++] = context->nbiotMode; context_header[offset++] = context->nbiotMode;

@ -143,6 +143,8 @@ private:
// Mutexes // Mutexes
pthread_mutex_t mutex; pthread_mutex_t mutex;
const uint8_t UL_CC_IDX = 0; ///< Passed to write CC index in PCAP (TODO: use actual CC idx)
}; };
} // namespace srsenb } // namespace srsenb

@ -524,7 +524,7 @@ int mac::get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res_list)
} }
if (pcap) { if (pcap) {
pcap->write_dl_crnti(dl_sched_res->pdsch[n].data[tb], sched_result.data[i].tbs[tb], rnti, true, tti); pcap->write_dl_crnti(dl_sched_res->pdsch[n].data[tb], sched_result.data[i].tbs[tb], rnti, true, tti, 0);
} }
} else { } else {
@ -555,7 +555,7 @@ int mac::get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res_list)
if (pcap) { if (pcap) {
pcap->write_dl_ranti( pcap->write_dl_ranti(
dl_sched_res->pdsch[n].data[0], sched_result.rar[i].tbs, dl_sched_res->pdsch[n].dci.rnti, true, tti); dl_sched_res->pdsch[n].data[0], sched_result.rar[i].tbs, dl_sched_res->pdsch[n].dci.rnti, true, tti, 0);
} }
n++; n++;
@ -572,7 +572,7 @@ int mac::get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res_list)
dl_sched_res->pdsch[n].data[0] = assemble_si(sched_result.bc[i].index); dl_sched_res->pdsch[n].data[0] = assemble_si(sched_result.bc[i].index);
#ifdef WRITE_SIB_PCAP #ifdef WRITE_SIB_PCAP
if (pcap) { if (pcap) {
pcap->write_dl_sirnti(dl_sched_res->pdsch[n].data[0], sched_result.bc[i].tbs, true, tti); pcap->write_dl_sirnti(dl_sched_res->pdsch[n].data[0], sched_result.bc[i].tbs, true, tti, 0);
} }
#endif #endif
} else { } else {
@ -581,7 +581,7 @@ int mac::get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res_list)
rlc_h->read_pdu_pcch(pcch_payload_buffer, pcch_payload_buffer_len); rlc_h->read_pdu_pcch(pcch_payload_buffer, pcch_payload_buffer_len);
if (pcap) { if (pcap) {
pcap->write_dl_pch(dl_sched_res->pdsch[n].data[0], sched_result.bc[i].tbs, true, tti); pcap->write_dl_pch(dl_sched_res->pdsch[n].data[0], sched_result.bc[i].tbs, true, tti, 0);
} }
} }

@ -189,7 +189,7 @@ void ue::process_pdu(uint8_t* pdu, uint32_t nof_bytes, srslte::pdu_queue::channe
mac_msg_ul.parse_packet(pdu); mac_msg_ul.parse_packet(pdu);
if (pcap) { if (pcap) {
pcap->write_ul_crnti(pdu, nof_bytes, rnti, true, last_tti); pcap->write_ul_crnti(pdu, nof_bytes, rnti, true, last_tti, UL_CC_IDX);
} }
pdus.deallocate(pdu); pdus.deallocate(pdu);

@ -359,6 +359,8 @@ private:
float dl_freq = -1; float dl_freq = -1;
float ul_freq = -1; float ul_freq = -1;
const uint8_t SYNC_CC_IDX = 0; ///< From the sync POV, the CC idx is always the first
}; };
} // namespace srsue } // namespace srsue

@ -65,7 +65,7 @@ public:
void new_grant_dl(uint32_t cc_idx, mac_grant_dl_t grant, tb_action_dl_t* action); void new_grant_dl(uint32_t cc_idx, mac_grant_dl_t grant, tb_action_dl_t* action);
void new_mch_dl(srslte_pdsch_grant_t phy_grant, tb_action_dl_t* action); void new_mch_dl(srslte_pdsch_grant_t phy_grant, tb_action_dl_t* action);
void tb_decoded(uint32_t cc_idx, mac_grant_dl_t grant, bool ack[SRSLTE_MAX_CODEWORDS]); void tb_decoded(uint32_t cc_idx, mac_grant_dl_t grant, bool ack[SRSLTE_MAX_CODEWORDS]);
void bch_decoded_ok(uint8_t* payload, uint32_t len); void bch_decoded_ok(uint32_t cc_idx, uint8_t* payload, uint32_t len);
uint16_t get_dl_sched_rnti(uint32_t tti); uint16_t get_dl_sched_rnti(uint32_t tti);
uint16_t get_ul_sched_rnti(uint32_t tti); uint16_t get_ul_sched_rnti(uint32_t tti);

@ -90,7 +90,7 @@ public:
void pdcch_to_crnti(bool is_new_uplink_transmission); void pdcch_to_crnti(bool is_new_uplink_transmission);
void timer_expired(uint32_t timer_id); void timer_expired(uint32_t timer_id);
void new_grant_dl(mac_interface_phy_lte::mac_grant_dl_t grant, mac_interface_phy_lte::tb_action_dl_t* action); void new_grant_dl(mac_interface_phy_lte::mac_grant_dl_t grant, mac_interface_phy_lte::tb_action_dl_t* action);
void tb_decoded_ok(const uint32_t tti); void tb_decoded_ok(const uint8_t cc_idx, const uint32_t tti);
void start_noncont(uint32_t preamble_index, uint32_t prach_mask); void start_noncont(uint32_t preamble_index, uint32_t prach_mask);
bool contention_resolution_id_received(uint64_t uecri); bool contention_resolution_id_received(uint64_t uecri);

@ -99,7 +99,7 @@ public:
mac.tb_decoded(cc_idx, grant, ack); mac.tb_decoded(cc_idx, grant, ack);
} }
void bch_decoded_ok(uint8_t* payload, uint32_t len) { mac.bch_decoded_ok(payload, len); } void bch_decoded_ok(uint32_t cc_idx, uint8_t* payload, uint32_t len) { mac.bch_decoded_ok(cc_idx, payload, len); }
void mch_decoded(uint32_t len, bool crc) { mac.mch_decoded(len, crc); } void mch_decoded(uint32_t len, bool crc) { mac.mch_decoded(len, crc); }

@ -386,7 +386,7 @@ void sync::run_thread()
return; return;
} }
for (uint32_t i = 0; i < nof_rf_channels; i++) { for (uint32_t i = 0; i < nof_rf_channels; i++) {
dummy_buffer[i] = (cf_t*)srslte_vec_cf_malloc(3 * SRSLTE_SF_LEN_PRB(100)); dummy_buffer[i] = srslte_vec_cf_malloc(3 * SRSLTE_SF_LEN_PRB(100));
} }
uint32_t prach_nof_sf = 0; uint32_t prach_nof_sf = 0;
@ -413,7 +413,7 @@ void sync::run_thread()
*/ */
cell_search_ret = search_p.run(&cell, mib); cell_search_ret = search_p.run(&cell, mib);
if (cell_search_ret == search::CELL_FOUND) { if (cell_search_ret == search::CELL_FOUND) {
stack->bch_decoded_ok(mib.data(), mib.size() / 8); stack->bch_decoded_ok(SYNC_CC_IDX, mib.data(), mib.size() / 8);
} }
phy_state.state_exit(); phy_state.state_exit();
break; break;

@ -327,14 +327,15 @@ void dl_harq_entity::dl_harq_process::dl_tb_process::tb_decoded(mac_interface_ph
if (ack) { if (ack) {
if (is_bcch) { if (is_bcch) {
if (harq_entity->pcap) { if (harq_entity->pcap) {
harq_entity->pcap->write_dl_sirnti(payload_buffer_ptr, cur_grant.tb[tid].tbs, ack, cur_grant.tti); harq_entity->pcap->write_dl_sirnti(
payload_buffer_ptr, cur_grant.tb[tid].tbs, ack, cur_grant.tti, harq_entity->cc_idx);
} }
Debug("Delivering PDU=%d bytes to Dissassemble and Demux unit (BCCH)\n", cur_grant.tb[tid].tbs); Debug("Delivering PDU=%d bytes to Dissassemble and Demux unit (BCCH)\n", cur_grant.tb[tid].tbs);
harq_entity->demux_unit->push_pdu_bcch(payload_buffer_ptr, cur_grant.tb[tid].tbs); harq_entity->demux_unit->push_pdu_bcch(payload_buffer_ptr, cur_grant.tb[tid].tbs);
} else { } else {
if (harq_entity->pcap) { if (harq_entity->pcap) {
harq_entity->pcap->write_dl_crnti( harq_entity->pcap->write_dl_crnti(
payload_buffer_ptr, cur_grant.tb[tid].tbs, cur_grant.rnti, ack, cur_grant.tti); payload_buffer_ptr, cur_grant.tb[tid].tbs, cur_grant.rnti, ack, cur_grant.tti, harq_entity->cc_idx);
} }
if (cur_grant.rnti == harq_entity->rntis->temp_rnti) { if (cur_grant.rnti == harq_entity->rntis->temp_rnti) {
Debug("Delivering PDU=%d bytes to Dissassemble and Demux unit (Temporal C-RNTI)\n", cur_grant.tb[tid].tbs); Debug("Delivering PDU=%d bytes to Dissassemble and Demux unit (Temporal C-RNTI)\n", cur_grant.tb[tid].tbs);

@ -357,13 +357,13 @@ uint16_t mac::get_dl_sched_rnti(uint32_t tti)
return SRSLTE_INVALID_RNTI; return SRSLTE_INVALID_RNTI;
} }
void mac::bch_decoded_ok(uint8_t* payload, uint32_t len) void mac::bch_decoded_ok(uint32_t cc_idx, uint8_t* payload, uint32_t len)
{ {
// Send MIB to RLC // Send MIB to RLC
rlc_h->write_pdu_bcch_bch(payload, len); rlc_h->write_pdu_bcch_bch(payload, len);
if (pcap) { if (pcap) {
pcap->write_dl_bch(payload, len, true, phy_h->get_current_tti()); pcap->write_dl_bch(payload, len, true, phy_h->get_current_tti(), cc_idx);
} }
} }
@ -389,7 +389,7 @@ void mac::mch_decoded(uint32_t len, bool crc)
demux_unit.push_pdu_mch(mch_payload_buffer, len); demux_unit.push_pdu_mch(mch_payload_buffer, len);
stack_h->process_pdus(); stack_h->process_pdus();
if (pcap) { if (pcap) {
pcap->write_dl_mch(mch_payload_buffer, len, true, phy_h->get_current_tti()); pcap->write_dl_mch(mch_payload_buffer, len, true, phy_h->get_current_tti(), 0);
} }
metrics[0].rx_brate += len * 8; metrics[0].rx_brate += len * 8;
} else { } else {
@ -402,14 +402,14 @@ void mac::tb_decoded(uint32_t cc_idx, mac_grant_dl_t grant, bool ack[SRSLTE_MAX_
{ {
if (SRSLTE_RNTI_ISRAR(grant.rnti)) { if (SRSLTE_RNTI_ISRAR(grant.rnti)) {
if (ack[0]) { if (ack[0]) {
ra_procedure.tb_decoded_ok(grant.tti); ra_procedure.tb_decoded_ok(cc_idx, grant.tti);
} }
} else if (grant.rnti == SRSLTE_PRNTI) { } else if (grant.rnti == SRSLTE_PRNTI) {
// Send PCH payload to RLC // Send PCH payload to RLC
rlc_h->write_pdu_pcch(pch_payload_buffer, grant.tb[0].tbs); rlc_h->write_pdu_pcch(pch_payload_buffer, grant.tb[0].tbs);
if (pcap) { if (pcap) {
pcap->write_dl_pch(pch_payload_buffer, grant.tb[0].tbs, true, grant.tti); pcap->write_dl_pch(pch_payload_buffer, grant.tb[0].tbs, true, grant.tti, cc_idx);
} }
} else { } else {

@ -401,10 +401,10 @@ void ra_proc::new_grant_dl(mac_interface_phy_lte::mac_grant_dl_t grant, mac_inte
/* Called upon the successful decoding of a TB addressed to RA-RNTI. /* Called upon the successful decoding of a TB addressed to RA-RNTI.
* Processes the reception of a RAR as defined in 5.1.4 * Processes the reception of a RAR as defined in 5.1.4
*/ */
void ra_proc::tb_decoded_ok(const uint32_t tti) void ra_proc::tb_decoded_ok(const uint8_t cc_idx, const uint32_t tti)
{ {
if (pcap) { if (pcap) {
pcap->write_dl_ranti(rar_pdu_buffer, rar_grant_nbytes, ra_rnti, true, tti); pcap->write_dl_ranti(rar_pdu_buffer, rar_grant_nbytes, ra_rnti, true, tti, cc_idx);
} }
rDebug("RAR decoded successfully TBS=%d\n", rar_grant_nbytes); rDebug("RAR decoded successfully TBS=%d\n", rar_grant_nbytes);

@ -276,7 +276,7 @@ void ul_harq_entity::ul_harq_process::new_grant_ul(mac_interface_phy_lte::mac_gr
} else { } else {
rnti = harq_entity->rntis->crnti; rnti = harq_entity->rntis->crnti;
} }
harq_entity->pcap->write_ul_crnti(pdu_ptr, grant.tb.tbs, rnti, get_nof_retx(), grant.tti_tx); harq_entity->pcap->write_ul_crnti(pdu_ptr, grant.tb.tbs, rnti, get_nof_retx(), grant.tti_tx, harq_entity->cc_idx);
} }
} else if (has_grant()) { } else if (has_grant()) {
// Non-Adaptive Re-Tx // Non-Adaptive Re-Tx

@ -104,7 +104,7 @@ private:
} }
} }
void tb_decoded(uint32_t cc_idx, mac_grant_dl_t grant, bool* ack) override {} void tb_decoded(uint32_t cc_idx, mac_grant_dl_t grant, bool* ack) override {}
void bch_decoded_ok(uint8_t* payload, uint32_t len) override {} void bch_decoded_ok(uint32_t cc_idx, uint8_t* payload, uint32_t len) override {}
void mch_decoded(uint32_t len, bool crc) override {} void mch_decoded(uint32_t len, bool crc) override {}
void new_mch_dl(srslte_pdsch_grant_t phy_grant, tb_action_dl_t* action) override {} void new_mch_dl(srslte_pdsch_grant_t phy_grant, tb_action_dl_t* action) override {}
void set_mbsfn_config(uint32_t nof_mbsfn_services) override {} void set_mbsfn_config(uint32_t nof_mbsfn_services) override {}

Loading…
Cancel
Save