20 #include <ns3/assert.h>
22 #include <ns3/lte-harq-phy.h>
35 std::vector<HarqProcessInfoList_t> dlHarqLayer0;
36 dlHarqLayer0.resize(8);
37 std::vector<HarqProcessInfoList_t> dlHarqLayer1;
38 dlHarqLayer1.resize(8);
55 std::map<uint16_t, std::vector<HarqProcessInfoList_t>>::iterator it;
58 (*it).second.erase((*it).second.begin());
60 (*it).second.push_back(h);
70 for (std::size_t i = 0; i <
list.size(); i++)
72 mi +=
list.at(i).m_mi;
89 std::map<uint16_t, std::vector<HarqProcessInfoList_t>>::iterator it;
94 for (std::size_t i = 0; i <
list.size(); i++)
96 mi +=
list.at(i).m_mi;
105 std::map<uint16_t, std::vector<HarqProcessInfoList_t>>::iterator it;
110 std::vector<HarqProcessInfoList_t> harqList;
113 std::pair<uint16_t, std::vector<HarqProcessInfoList_t>>(rnti, harqList));
114 return (harqList.at(harqProcId));
118 return ((*it).second.at(harqProcId));
159 std::map<uint16_t, std::vector<HarqProcessInfoList_t>>::iterator it;
164 std::vector<HarqProcessInfoList_t> harqList;
170 harqList.at(7).push_back(el);
172 std::pair<uint16_t, std::vector<HarqProcessInfoList_t>>(rnti, harqList));
176 if ((*it).second.at(0).size() == 3)
184 for (std::size_t i = 0; i <
list.size(); i++)
186 (*it).second.at(7).push_back(
list.at(i));
193 (*it).second.at(7).push_back(el);
201 std::map<uint16_t, std::vector<HarqProcessInfoList_t>>::iterator it;
206 std::vector<HarqProcessInfoList_t> harqList;
209 std::pair<uint16_t, std::vector<HarqProcessInfoList_t>>(rnti, harqList));
213 (*it).second.at(
id).clear();
224 std::vector<HarqProcessInfoList_t> dlHarqLayer0;
225 dlHarqLayer0.resize(8);
226 std::vector<HarqProcessInfoList_t> dlHarqLayer1;
227 dlHarqLayer1.resize(8);
void ClearDlHarqBuffer(uint16_t rnti)
Clear the downlink HARQ buffer.
void SubframeIndication(uint32_t frameNo, uint32_t subframeNo)
Subframe Indication function.
void UpdateDlHarqProcessStatus(uint8_t id, uint8_t layer, double mi, uint16_t infoBytes, uint16_t codeBytes)
Update the Info associated to the decodification of an HARQ process for DL (asynchronous)
void UpdateUlHarqProcessStatus(uint16_t rnti, double mi, uint16_t infoBytes, uint16_t codeBytes)
Update the MI value associated to the decodification of an HARQ process for DL (asynchronous)
double GetAccumulatedMiUl(uint16_t rnti)
Return the cumulated MI of the HARQ procId in case of retransmissions for UL (synchronous)
HarqProcessInfoList_t GetHarqProcessInfoDl(uint8_t harqProcId, uint8_t layer)
Return the info of the HARQ procId in case of retransmissions for DL (asynchronous)
HarqProcessInfoList_t GetHarqProcessInfoUl(uint16_t rnti, uint8_t harqProcId)
Return the info of the HARQ procId in case of retransmissions for UL (asynchronous)
std::vector< std::vector< HarqProcessInfoList_t > > m_miDlHarqProcessesInfoMap
MI DL HARQ processes info map.
void ResetDlHarqProcessStatus(uint8_t id)
Reset the info associated to the decodification of an HARQ process for DL (asynchronous)
std::map< uint16_t, std::vector< HarqProcessInfoList_t > > m_miUlHarqProcessesInfoMap
MI UL HARQ processes info map.
void ResetUlHarqProcessStatus(uint16_t rnti, uint8_t id)
Reset the info associated to the decodification of an HARQ process for DL (asynchronous)
double GetAccumulatedMiDl(uint8_t harqProcId, uint8_t layer)
Return the cumulated MI of the HARQ procId in case of retransmissions for DL (asynchronous)
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::vector< HarqProcessInfoElement_t > HarqProcessInfoList_t
HarqProcessInfoList_t typedef.
HarqProcessInfoElement_t structure.
uint16_t m_codeBits
code bits
uint16_t m_infoBits
info bits
double m_mi
Mutual information.