A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lte-ue-phy.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
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: Giuseppe Piro <g.piro@poliba.it>
19  * Author: Marco Miozzo <mmiozzo@cttc.es>
20  */
21 
22 #ifndef LTE_UE_PHY_H
23 #define LTE_UE_PHY_H
24 
25 
26 #include <ns3/lte-phy.h>
27 #include <ns3/ff-mac-common.h>
28 
29 #include <ns3/lte-control-messages.h>
30 #include <ns3/lte-amc.h>
31 #include <ns3/lte-ue-phy-sap.h>
32 #include <ns3/ptr.h>
33 #include <ns3/lte-amc.h>
34 
35 
36 namespace ns3 {
37 
38 class PacketBurst;
39 class LteNetDevice;
40 class LteEnbPhy;
41 
47 class LteUePhy : public LtePhy
48 {
49 
51 
52 public:
56  LteUePhy ();
57 
64 
65  virtual ~LteUePhy ();
66 
67  // inherited from Object
68  static TypeId GetTypeId (void);
69  virtual void DoStart (void);
70  virtual void DoDispose (void);
71 
77 
83 
84 
88  void SetTxPower (double pow);
89 
93  double GetTxPower () const;
97  void SetNoiseFigure (double pow);
98 
102  double GetNoiseFigure () const;
103 
107  uint8_t GetMacChDelay (void) const;
108 
113  virtual void DoSendMacPdu (Ptr<Packet> p);
114 
120 
125  void SetSubChannelsForTransmission (std::vector <int> mask);
130  std::vector <int> GetSubChannelsForTransmission (void);
131 
136  void SetSubChannelsForReception (std::vector <int> mask);
141  std::vector <int> GetSubChannelsForReception (void);
142 
143 
150 
151 
152 
153  // inherited from LtePhy
154  virtual void GenerateCtrlCqiReport (const SpectrumValue& sinr);
155  virtual void GenerateDataCqiReport (const SpectrumValue& sinr);
156 
159 
160  virtual void DoSetTransmissionMode (uint8_t txMode);
161  virtual void DoSetSrsConfigurationIndex (uint16_t srcCi);
162 
163 
164 
165 
166 
170  void PhyPduReceived (Ptr<Packet> p);
171 
172 
179  void SubframeIndication (uint32_t frameNo, uint32_t subframeNo);
180 
181 
185  void SetRnti (uint16_t rnti);
186 
187 
193  void SetEnbCellId (uint16_t cellId);
194 
198  void SendSrs ();
199 
200 
201 
202 
203 private:
204 
205  void SetTxMode1Gain (double gain);
206  void SetTxMode2Gain (double gain);
207  void SetTxMode3Gain (double gain);
208  void SetTxMode4Gain (double gain);
209  void SetTxMode5Gain (double gain);
210  void SetTxMode6Gain (double gain);
211  void SetTxMode7Gain (double gain);
212  void SetTxModeGain (uint8_t txMode, double gain);
213 
214  void QueueSubChannelsForTransmission (std::vector <int> rbMap);
215 
216  std::vector <int> m_subChannelsForTransmission;
217  std::vector <int> m_subChannelsForReception;
218 
219  std::vector< std::vector <int> > m_subChannelsForTransmissionQueue;
220 
221 
223 
226 
228  // NOTE defines a periodicity for academic studies
231 
234 
235  uint16_t m_rnti;
236 
237  uint16_t m_enbCellId;
238 
240  std::vector <double> m_txModeGain;
241 
243  uint16_t m_srsCounter;
244 
245 };
246 
247 
248 }
249 
250 #endif /* LTE_UE_PHY_H */