From b0135201332c7c8eccfcdc1c3f8014a3868bdccb Mon Sep 17 00:00:00 2001 From: Vignesh Babu Date: Mon, 18 Mar 2019 11:38:45 +0100 Subject: [PATCH] lte: Add method to flush DL HARQ buffer --- src/lte/model/lte-harq-phy.cc | 16 ++++++++++++++++ src/lte/model/lte-harq-phy.h | 7 +++++++ 2 files changed, 23 insertions(+) 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); +