A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lte-enb-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 <marco.miozzo@cttc.es>
20  */
21 
22 #ifndef ENB_LTE_PHY_H
23 #define ENB_LTE_PHY_H
24 
25 
26 #include "lte-phy.h"
27 #include <ns3/lte-enb-phy-sap.h>
28 #include <map>
29 #include <ns3/lte-ue-phy.h>
30 
31 namespace ns3 {
32 
33 class PacketBurst;
34 class LteNetDevice;
35 
40 class LteEnbPhy : public LtePhy
41 {
42 
44 
45 public:
49  LteEnbPhy ();
50 
57 
58  virtual ~LteEnbPhy ();
59 
60  // inherited from Object
61  static TypeId GetTypeId (void);
62  virtual void DoStart (void);
63  virtual void DoDispose (void);
64 
65 
71 
77 
81  void SetTxPower (double pow);
82 
86  double GetTxPower () const;
87 
88 
92  void SetNoiseFigure (double pow);
93 
97  double GetNoiseFigure () const;
98 
102  void SetMacChDelay (uint8_t delay);
103 
107  uint8_t GetMacChDelay (void) const;
108 
113  virtual void DoSendMacPdu (Ptr<Packet> p);
114 
115  virtual uint8_t DoGetMacChTtiDelay ();
116 
117 
118  void DoSetDownlinkSubChannels ();
119 
124 
130  void CalcChannelQualityForUe (std::vector <double> sinr, Ptr<LteSpectrumPhy> ue);
131 
136  // virtual void SendIdealControlMessage (Ptr<IdealControlMessage> msg); // legacy
142 
149 
150 
152 
153  bool AddUePhy (uint16_t rnti, Ptr<LteUePhy> phy);
154 
155  bool DeleteUePhy (uint16_t rnti);
156 
157  virtual void DoSetTransmissionMode (uint16_t rnti, uint8_t txMode);
158 
163 
167  std::list<UlDciIdealControlMessage> DequeueUlDci (void);
168 
169 
173  void StartFrame (void);
177  void StartSubFrame (void);
181  void EndSubFrame (void);
185  void EndFrame (void);
186 
190  void PhyPduReceived (Ptr<Packet> p);
191 
192  // inherited from LtePhy
193  virtual void GenerateCqiReport (const SpectrumValue& sinr);
194 
195 
196 private:
197  std::map <uint16_t, Ptr<LteUePhy> > m_ueAttached;
198 
199  std::vector< std::list<UlDciIdealControlMessage> > m_ulDciQueue; // for storing info on future receptions
200 
203 
204  uint32_t m_nrFrames;
205  uint32_t m_nrSubFrames;
206 
207 };
208 
209 
210 }
211 
212 #endif /* LTE_ENB_PHY_H */