Added srsLTE helper for determining number of RI bits

master
Xavier Arteaga 5 years ago committed by Xavier Arteaga
parent 8b265883e4
commit cb6a8444df

@ -451,6 +451,13 @@ SRSLTE_API const char* srslte_ack_nack_feedback_mode_string(srslte_ack_nack_feed
*/
SRSLTE_API srslte_ack_nack_feedback_mode_t srslte_string_ack_nack_feedback_mode(const char* str);
/**
* Returns the number of bits for Rank Indicador reporting depending on the cell
*
* @param cell
*/
SRSLTE_API uint32_t srslte_ri_nof_bits(const srslte_cell_t* cell);
#ifdef __cplusplus
}
#endif

@ -854,4 +854,17 @@ srslte_ack_nack_feedback_mode_t srslte_string_ack_nack_feedback_mode(const char*
// Otherwise Normal
return SRSLTE_PUCCH_ACK_NACK_FEEDBACK_MODE_NORMAL;
}
}
uint32_t srslte_ri_nof_bits(const srslte_cell_t* cell)
{
uint32_t ret = 0;
if (cell->nof_ports == 2) {
ret = 1;
} else if (cell->nof_ports > 2) {
ret = 2;
}
return ret;
}

Loading…
Cancel
Save