A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lte-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  * Marco Miozzo <mmiozzo@cttc.es>
20  * Nicola Baldo <nbaldo@cttc.es>
21  */
22 
23 #ifndef LTE_PHY_H
24 #define LTE_PHY_H
25 
26 
27 #include <ns3/spectrum-value.h>
28 #include <ns3/mobility-model.h>
29 #include <ns3/packet.h>
30 #include <ns3/nstime.h>
31 #include <ns3/spectrum-phy.h>
32 #include <ns3/spectrum-channel.h>
33 #include <ns3/spectrum-signal-parameters.h>
34 #include <ns3/spectrum-interference.h>
35 #include <ns3/generic-phy.h>
36 #include <ns3/lte-spectrum-phy.h>
37 
38 namespace ns3 {
39 
40 class PacketBurst;
41 class LteNetDevice;
42 class LteControlMessage;
43 
44 
45 
52 class LtePhy : public Object
53 {
54 
55 public:
59  LtePhy ();
60 
67 
68  virtual ~LtePhy ();
69 
70  static TypeId GetTypeId (void);
71 
82 
88 
89 
95 
100  virtual void DoSendMacPdu (Ptr<Packet> p) = 0;
101 
107 
113 
114 
120 
121  void DoDispose ();
122 
127 // virtual void ReceiveLteControlMessage (Ptr<LteControlMessage> msg) = 0;
128 
129 
133  void SetTti (double tti);
137  double GetTti (void) const;
138 
143  void DoSetCellId (uint16_t cellId);
144 
145 
149  uint8_t GetRbgSize (void) const;
150 
151 
156  uint16_t GetSrsPeriodicity (uint16_t srcCi) const;
157 
162  uint16_t GetSrsSubframeOffset (uint16_t srcCi) const;
163 
164 
168  void SetMacPdu (Ptr<Packet> p);
169 
174 
179 
183  std::list<Ptr<LteControlMessage> > GetControlMessages (void);
184 
185 
191  virtual void GenerateCtrlCqiReport (const SpectrumValue& sinr) = 0;
192 
199  virtual void GenerateDataCqiReport (const SpectrumValue& sinr) = 0;
200 
208  virtual void ReportInterference (const SpectrumValue& power) = 0;
209 
217  virtual void ReportRsReceivedPower (const SpectrumValue& interf) = 0;
218 
219 
220 
221 protected:
223 
226 
227  double m_txPower;
229 
230  double m_tti;
231  uint8_t m_ulBandwidth;
232  uint8_t m_dlBandwidth;
233  uint8_t m_rbgSize;
234 
235  uint16_t m_dlEarfcn;
236  uint16_t m_ulEarfcn;
237 
238  std::vector< Ptr<PacketBurst> > m_packetBurstQueue;
239  std::vector< std::list<Ptr<LteControlMessage> > > m_controlMessagesQueue;
240  uint8_t m_macChTtiDelay; // delay between MAC and channel layer in terms of TTIs
241 
242  uint16_t m_cellId;
243 
244 };
245 
246 
247 }
248 
249 #endif /* LTE_PHY_H */