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 DoSetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth);
144 
150  virtual void DoSetEarfcn (uint16_t dlEarfcn, uint16_t ulEarfcn);
151 
156  void DoSetCellId (uint16_t cellId);
157 
158 
162  uint8_t GetRbgSize (void) const;
163 
164 
169  uint16_t GetSrsPeriodicity (uint16_t srcCi) const;
170 
175  uint16_t GetSrsSubframeOffset (uint16_t srcCi) const;
176 
177 
181  void SetMacPdu (Ptr<Packet> p);
182 
187 
192 
196  std::list<Ptr<LteControlMessage> > GetControlMessages (void);
197 
198 
204  virtual void GenerateCtrlCqiReport (const SpectrumValue& sinr) = 0;
205 
212  virtual void GenerateDataCqiReport (const SpectrumValue& sinr) = 0;
213 
214 
215 
216 protected:
218 
221 
222  double m_txPower;
224 
225  double m_tti;
226  uint8_t m_ulBandwidth;
227  uint8_t m_dlBandwidth;
228  uint8_t m_rbgSize;
229 
230  uint16_t m_dlEarfcn;
231  uint16_t m_ulEarfcn;
232 
233  std::vector< Ptr<PacketBurst> > m_packetBurstQueue;
234  std::vector< std::list<Ptr<LteControlMessage> > > m_controlMessagesQueue;
235  uint8_t m_macChTtiDelay; // delay between MAC and channel layer in terms of TTIs
236 
237  uint16_t m_cellId;
238 
239 };
240 
241 
242 }
243 
244 #endif /* LTE_PHY_H */