PUSCH shortened frame moved to UL grant

master
ismagom 10 years ago
parent e093b3a7de
commit 8d45cf6938

@ -40,8 +40,12 @@ namespace ue {
class ul_sched_grant : public sched_grant {
public:
ul_sched_grant(rnti_type_t type, uint16_t rnti) : sched_grant(type, rnti) {}
ul_sched_grant(uint16_t rnti) : sched_grant(rnti) {}
ul_sched_grant(rnti_type_t type, uint16_t rnti) : sched_grant(type, rnti) {
N_srs = 0;
}
ul_sched_grant(uint16_t rnti) : sched_grant(rnti) {
N_srs = 0;
}
uint32_t get_rv() {
return ul_dci.rv_idx;
@ -55,6 +59,13 @@ namespace ue {
void set_ndi(bool value) {
ul_dci.ndi = value;
}
void set_shortened(bool enabled) {
if (enabled) {
N_srs = 1;
} else {
N_srs = 0;
}
}
bool get_cqi_request() {
return ul_dci.cqi_request;
}
@ -85,7 +96,7 @@ namespace ue {
bool is_from_rar() {
return grant_is_from_rar;
}
bool create_from_dci(srslte_dci_msg_t *msg, srslte_cell_t cell, uint32_t N_srs, uint32_t n_rb_ho) {
bool create_from_dci(srslte_dci_msg_t *msg, srslte_cell_t cell, uint32_t n_rb_ho) {
grant_is_from_rar = false;
if (srslte_dci_msg_to_ul_grant(msg, cell, N_srs, n_rb_ho, &ul_dci, &grant)) {
return false;
@ -120,6 +131,7 @@ namespace ue {
uint32_t current_tx_nb;
uint16_t rnti;
bool grant_is_from_rar;
uint32_t N_srs;
};
}

@ -116,7 +116,7 @@ bool dl_buffer::get_ul_grant(ul_sched_grant *grant)
if (srslte_ue_dl_find_ul_dci(&ue_dl, &dci_msg, cfi, tti%10, grant->get_rnti()) != 1) {
return false;
}
return grant->create_from_dci(&dci_msg, cell, 0, params_db->get_param(phy_params::PUSCH_HOPPING_OFFSET));
return grant->create_from_dci(&dci_msg, cell, params_db->get_param(phy_params::PUSCH_HOPPING_OFFSET));
}
}
}

Loading…
Cancel
Save