A Discrete-Event Network Simulator
API
lte-harq-phy.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Marco Miozzo <marco.miozzo@cttc.es>
19  */
20 
21 
22 #ifndef LTE_HARQ_PHY_MODULE_H
23 #define LTE_HARQ_PHY_MODULE_H
24 
25 
26 
27 #include <ns3/log.h>
28 #include <ns3/assert.h>
29 #include <math.h>
30 #include <vector>
31 #include <map>
32 #include <ns3/simple-ref-count.h>
33 
34 
35 namespace ns3 {
36 
37 
38 
41 {
42  double m_mi;
43  uint8_t m_rv;
44  uint16_t m_infoBits;
45  uint16_t m_codeBits;
46 };
47 
48 typedef std::vector <HarqProcessInfoElement_t> HarqProcessInfoList_t;
49 
56 class LteHarqPhy : public SimpleRefCount<LteHarqPhy>
57 {
58 public:
59  LteHarqPhy ();
60  ~LteHarqPhy ();
61 
67  void SubframeIndication (uint32_t frameNo, uint32_t subframeNo);
68 
76  double GetAccumulatedMiDl (uint8_t harqProcId, uint8_t layer);
77 
85  HarqProcessInfoList_t GetHarqProcessInfoDl (uint8_t harqProcId, uint8_t layer);
86 
93  double GetAccumulatedMiUl (uint16_t rnti);
94 
102  HarqProcessInfoList_t GetHarqProcessInfoUl (uint16_t rnti, uint8_t harqProcId);
103 
113  void UpdateDlHarqProcessStatus (uint8_t id, uint8_t layer, double mi, uint16_t infoBytes, uint16_t codeBytes);
114 
120  void ResetDlHarqProcessStatus(uint8_t id);
121 
130  void UpdateUlHarqProcessStatus (uint16_t rnti, double mi, uint16_t infoBytes, uint16_t codeBytes);
131 
138  void ResetUlHarqProcessStatus(uint16_t rnti, uint8_t id);
139 
140 
141 
142 
143 
144 private:
145 
146  std::vector <std::vector <HarqProcessInfoList_t> > m_miDlHarqProcessesInfoMap;
147  std::map <uint16_t, std::vector <HarqProcessInfoList_t> > m_miUlHarqProcessesInfoMap;
148 
149 
150 };
151 
152 
153 }
154 
155 #endif /* LTE_HARQ_PHY_MODULE_H */
log2() macro definition; to deal with Bug 1467.
HarqProcessInfoElement_t structure.
Definition: lte-harq-phy.h:40
void SubframeIndication(uint32_t frameNo, uint32_t subframeNo)
Subframe Indication function.
Definition: lte-harq-phy.cc:54
HarqProcessInfoList_t GetHarqProcessInfoDl(uint8_t harqProcId, uint8_t layer)
Return the info of the HARQ procId in case of retransmissions for DL (asynchronous) ...
Definition: lte-harq-phy.cc:84
double GetAccumulatedMiDl(uint8_t harqProcId, uint8_t layer)
Return the cumulated MI of the HARQ procId in case of retransmissions for DL (asynchronous) ...
Definition: lte-harq-phy.cc:71
uint16_t m_codeBits
code bits
Definition: lte-harq-phy.h:45
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) ...
uint16_t m_infoBits
info bits
Definition: lte-harq-phy.h:44
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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) ...
The LteHarqPhy class implements the HARQ functionalities related to PHY layer (i.e., decodification buffers for incremental redundancy management)
Definition: lte-harq-phy.h:56
std::vector< std::vector< HarqProcessInfoList_t > > m_miDlHarqProcessesInfoMap
MI DL HARQ processes info map.
Definition: lte-harq-phy.h:146
std::map< uint16_t, std::vector< HarqProcessInfoList_t > > m_miUlHarqProcessesInfoMap
MI UL HARQ processes info map.
Definition: lte-harq-phy.h:147
void ResetUlHarqProcessStatus(uint16_t rnti, uint8_t id)
Reset the info 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) ...
Definition: lte-harq-phy.cc:92
void ResetDlHarqProcessStatus(uint8_t id)
Reset the info associated to the decodification of an HARQ process for DL (asynchronous) ...
A template-based reference counting class.
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< HarqProcessInfoElement_t > HarqProcessInfoList_t
HarqProcessInfoList_t typedef.
Definition: lte-harq-phy.h:48