|
|
|
@ -198,14 +198,14 @@ void mac_nr::tb_decoded(const uint32_t cc_idx, mac_nr_grant_dl_t& grant)
|
|
|
|
|
stack_task_dispatch_queue.push([this]() { process_pdus(); });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void mac_nr::new_grant_ul(const uint32_t cc_idx, const mac_nr_grant_ul_t& grant, srslte::unique_byte_buffer_t phy_tx_pdu)
|
|
|
|
|
void mac_nr::new_grant_ul(const uint32_t cc_idx, const mac_nr_grant_ul_t& grant, srslte::byte_buffer_t* phy_tx_pdu)
|
|
|
|
|
{
|
|
|
|
|
get_ul_data(grant, std::move(phy_tx_pdu));
|
|
|
|
|
get_ul_data(grant, phy_tx_pdu);
|
|
|
|
|
|
|
|
|
|
metrics[cc_idx].tx_pkts++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void mac_nr::get_ul_data(const mac_nr_grant_ul_t& grant, srslte::unique_byte_buffer_t phy_tx_pdu)
|
|
|
|
|
void mac_nr::get_ul_data(const mac_nr_grant_ul_t& grant, srslte::byte_buffer_t* phy_tx_pdu)
|
|
|
|
|
{
|
|
|
|
|
// initialize MAC PDU
|
|
|
|
|
tx_buffer->clear();
|
|
|
|
@ -248,8 +248,8 @@ void mac_nr::get_ul_data(const mac_nr_grant_ul_t& grant, srslte::unique_byte_buf
|
|
|
|
|
|
|
|
|
|
logger.info(tx_buffer->msg, tx_buffer->N_bytes, "Generated MAC PDU (%d B)", tx_buffer->N_bytes);
|
|
|
|
|
|
|
|
|
|
memcpy(phy_tx_pdu.get()->msg, tx_buffer->msg, tx_buffer->N_bytes);
|
|
|
|
|
phy_tx_pdu.get()->N_bytes = tx_buffer->N_bytes;
|
|
|
|
|
memcpy(phy_tx_pdu->msg, tx_buffer->msg, tx_buffer->N_bytes);
|
|
|
|
|
phy_tx_pdu->N_bytes = tx_buffer->N_bytes;
|
|
|
|
|
|
|
|
|
|
if (pcap) {
|
|
|
|
|
pcap->write_ul_crnti_nr(tx_buffer->msg, tx_buffer->N_bytes, grant.rnti, grant.pid, grant.tti);
|
|
|
|
|