diff --git a/src/lte/model/lte-harq-phy.cc b/src/lte/model/lte-harq-phy.cc index a939a526f..a54067f09 100644 --- a/src/lte/model/lte-harq-phy.cc +++ b/src/lte/model/lte-harq-phy.cc @@ -216,6 +216,22 @@ LteHarqPhy::ResetUlHarqProcessStatus (uint16_t rnti, uint8_t id) } } +void +LteHarqPhy::ClearDlHarqBuffer (uint16_t rnti) +{ + NS_LOG_FUNCTION (this << rnti); + // flush the DL harq buffers + m_miDlHarqProcessesInfoMap.clear (); + // Recreate DL Decodification HARQ buffers + std::vector dlHarqLayer0; + dlHarqLayer0.resize (8); + std::vector dlHarqLayer1; + dlHarqLayer1.resize (8); + m_miDlHarqProcessesInfoMap.push_back (dlHarqLayer0); + m_miDlHarqProcessesInfoMap.push_back (dlHarqLayer1); +} + + diff --git a/src/lte/model/lte-harq-phy.h b/src/lte/model/lte-harq-phy.h index 3e430cb0e..57393af68 100644 --- a/src/lte/model/lte-harq-phy.h +++ b/src/lte/model/lte-harq-phy.h @@ -137,6 +137,13 @@ public: */ void ResetUlHarqProcessStatus(uint16_t rnti, uint8_t id); + /** + * \brief Clear the downlink HARQ buffer + * + * \param rnti the RNTI of the UE + */ + void ClearDlHarqBuffer (uint16_t rnti); +