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 
40 {
41  double m_mi;
42  uint8_t m_rv;
43  uint16_t m_infoBits;
44  uint16_t m_codeBits;
45 };
46 
47 typedef std::vector <HarqProcessInfoElement_t> HarqProcessInfoList_t;
48 
55 class LteHarqPhy : public SimpleRefCount<LteHarqPhy>
56 {
57 public:
58  LteHarqPhy ();
59  ~LteHarqPhy ();
60 
61  void SubframeIndication (uint32_t frameNo, uint32_t subframeNo);
62 
70  double GetAccumulatedMiDl (uint8_t harqProcId, uint8_t layer);
71 
79  HarqProcessInfoList_t GetHarqProcessInfoDl (uint8_t harqProcId, uint8_t layer);
80 
86  double GetAccumulatedMiUl (uint16_t rnti);
87 
95  HarqProcessInfoList_t GetHarqProcessInfoUl (uint16_t rnti, uint8_t harqProcId);
96 
106  void UpdateDlHarqProcessStatus (uint8_t id, uint8_t layer, double mi, uint16_t infoBytes, uint16_t codeBytes);
107 
113  void ResetDlHarqProcessStatus(uint8_t id);
114 
123  void UpdateUlHarqProcessStatus (uint16_t rnti, double mi, uint16_t infoBytes, uint16_t codeBytes);
124 
130  void ResetUlHarqProcessStatus(uint16_t rnti, uint8_t id);
131 
132 
133 
134 
135 
136 private:
137 
138  std::vector <std::vector <HarqProcessInfoList_t> > m_miDlHarqProcessesInfoMap;
139  std::map <uint16_t, std::vector <HarqProcessInfoList_t> > m_miUlHarqProcessesInfoMap;
140 
141 
142 };
143 
144 
145 }
146 
147 #endif /* LTE_HARQ_PHY_MODULE_H */
Custom version of log2() to deal with Bug 1467.
void SubframeIndication(uint32_t frameNo, uint32_t subframeNo)
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 retranmissions 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 retranmissions for DL (asynchronous) ...
Definition: lte-harq-phy.cc:71
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) ...
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 managment)
Definition: lte-harq-phy.h:55
std::vector< std::vector< HarqProcessInfoList_t > > m_miDlHarqProcessesInfoMap
Definition: lte-harq-phy.h:138
std::map< uint16_t, std::vector< HarqProcessInfoList_t > > m_miUlHarqProcessesInfoMap
Definition: lte-harq-phy.h:139
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 retranmissions 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 retranmissions for UL (asynchronous) ...
std::vector< HarqProcessInfoElement_t > HarqProcessInfoList_t
Definition: lte-harq-phy.h:47