|
|
|
@ -661,6 +661,7 @@ int mac::get_dl_sched(uint32_t tti_tx_dl, dl_sched_list_t& dl_sched_res_list)
|
|
|
|
|
|
|
|
|
|
// Assemble PDU
|
|
|
|
|
dl_sched_res->pdsch[n].data[0] = assemble_rar(sched_result.rar[i].msg3_grant.data(),
|
|
|
|
|
enb_cc_idx,
|
|
|
|
|
sched_result.rar[i].msg3_grant.size(),
|
|
|
|
|
i,
|
|
|
|
|
sched_result.rar[i].tbs,
|
|
|
|
@ -830,6 +831,7 @@ int mac::get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_list_t& dl_sched_res
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint8_t* mac::assemble_rar(sched_interface::dl_sched_rar_grant_t* grants,
|
|
|
|
|
uint32_t enb_cc_idx,
|
|
|
|
|
uint32_t nof_grants,
|
|
|
|
|
uint32_t rar_idx,
|
|
|
|
|
uint32_t pdu_len,
|
|
|
|
@ -838,8 +840,8 @@ uint8_t* mac::assemble_rar(sched_interface::dl_sched_rar_grant_t* grants,
|
|
|
|
|
uint8_t grant_buffer[64] = {};
|
|
|
|
|
if (pdu_len < rar_payload_len && rar_idx < rar_pdu_msg.size()) {
|
|
|
|
|
srslte::rar_pdu* pdu = &rar_pdu_msg[rar_idx];
|
|
|
|
|
rar_payload[rar_idx].clear();
|
|
|
|
|
pdu->init_tx(&rar_payload[rar_idx], pdu_len);
|
|
|
|
|
rar_payload[enb_cc_idx][rar_idx].clear();
|
|
|
|
|
pdu->init_tx(&rar_payload[enb_cc_idx][rar_idx], pdu_len);
|
|
|
|
|
for (uint32_t i = 0; i < nof_grants; i++) {
|
|
|
|
|
srslte_dci_rar_pack(&grants[i].grant, grant_buffer);
|
|
|
|
|
if (pdu->new_subh()) {
|
|
|
|
@ -849,8 +851,8 @@ uint8_t* mac::assemble_rar(sched_interface::dl_sched_rar_grant_t* grants,
|
|
|
|
|
pdu->get()->set_sched_grant(grant_buffer);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (pdu->write_packet(rar_payload[rar_idx].msg)) {
|
|
|
|
|
return rar_payload[rar_idx].msg;
|
|
|
|
|
if (pdu->write_packet(rar_payload[enb_cc_idx][rar_idx].msg)) {
|
|
|
|
|
return rar_payload[enb_cc_idx][rar_idx].msg;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|