A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lte-helper.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011 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: Nicola Baldo <nbaldo@cttc.es>
19  */
20 
21 #ifndef LTE_HELPER_H
22 #define LTE_HELPER_H
23 
24 #include <ns3/config.h>
25 #include <ns3/simulator.h>
26 #include <ns3/names.h>
27 #include <ns3/net-device.h>
28 #include <ns3/net-device-container.h>
29 #include <ns3/node.h>
30 #include <ns3/node-container.h>
31 #include <ns3/eps-bearer.h>
32 #include <ns3/phy-stats-calculator.h>
33 #include <ns3/phy-tx-stats-calculator.h>
34 #include <ns3/phy-rx-stats-calculator.h>
35 #include <ns3/mac-stats-calculator.h>
36 #include <ns3/radio-bearer-stats-calculator.h>
37 #include <ns3/radio-bearer-stats-connector.h>
38 #include <ns3/epc-tft.h>
39 #include <ns3/mobility-model.h>
40 
41 namespace ns3 {
42 
43 
44 class LteUePhy;
45 class LteEnbPhy;
46 class SpectrumChannel;
47 class EpcHelper;
48 class PropagationLossModel;
49 class SpectrumPropagationLossModel;
50 
55 class LteHelper : public Object
56 {
57 public:
58  LteHelper (void);
59  virtual ~LteHelper (void);
60 
61  static TypeId GetTypeId (void);
62  virtual void DoDispose (void);
63 
64 
79 
85  void SetPathlossModelType (std::string type);
86 
93  void SetPathlossModelAttribute (std::string n, const AttributeValue &v);
94 
99  void SetSchedulerType (std::string type);
100 
105  std::string GetSchedulerType () const;
106 
113  void SetSchedulerAttribute (std::string n, const AttributeValue &v);
114 
121  void SetEnbDeviceAttribute (std::string n, const AttributeValue &v);
122 
127  void SetEnbAntennaModelType (std::string type);
128 
135  void SetEnbAntennaModelAttribute (std::string n, const AttributeValue &v);
136 
141  void SetUeAntennaModelType (std::string type);
142 
149  void SetUeAntennaModelAttribute (std::string n, const AttributeValue &v);
150 
155  void SetSpectrumChannelType (std::string type);
156 
163  void SetSpectrumChannelAttribute (std::string n, const AttributeValue &v);
172 
181 
188  void Attach (NetDeviceContainer ueDevices, Ptr<NetDevice> enbDevice);
189 
198  void Attach (Ptr<NetDevice> ueDevice, Ptr<NetDevice> enbDevice);
199 
208  void AttachToClosestEnb (NetDeviceContainer ueDevices, NetDeviceContainer enbDevices);
209 
218  void AttachToClosestEnb (Ptr<NetDevice> ueDevice, NetDeviceContainer enbDevices);
219 
228 
236  void ActivateDedicatedEpsBearer (Ptr<NetDevice> ueDevice, EpsBearer bearer, Ptr<EpcTft> tft);
237 
238 
244  void AddX2Interface (NodeContainer enbNodes);
245 
252  void AddX2Interface (Ptr<Node> enbNode1, Ptr<Node> enbNode2);
253 
262  void HandoverRequest (Time hoTime, Ptr<NetDevice> ueDev, Ptr<NetDevice> sourceEnbDev, Ptr<NetDevice> targetEnbDev);
263 
264 
272  void ActivateDataRadioBearer (NetDeviceContainer ueDevices, EpsBearer bearer);
273 
283  void ActivateDataRadioBearer (Ptr<NetDevice> ueDevice, EpsBearer bearer);
284 
290  void SetFadingModel (std::string model);
291 
295  void SetFadingModelAttribute (std::string n, const AttributeValue &v);
296 
301  void EnableLogComponents (void);
302 
308  void EnableTraces (void);
309 
313  void EnablePhyTraces (void);
314 
315 
316 
320  void EnableDlPhyTraces (void);
321 
325  void EnableUlPhyTraces (void);
326 
330  void EnableDlTxPhyTraces (void);
331 
335  void EnableUlTxPhyTraces (void);
336 
340  void EnableDlRxPhyTraces (void);
341 
345  void EnableUlRxPhyTraces (void);
346 
350  void EnableMacTraces (void);
351 
355  void EnableDlMacTraces (void);
356 
360  void EnableUlMacTraces (void);
361 
365  void EnableRlcTraces (void);
366 
372 
376  void EnablePdcpTraces (void);
377 
383 
387  PER_BASED = 4};
388 
400  int64_t AssignStreams (NetDeviceContainer c, int64_t stream);
401 
402 protected:
403  // inherited from Object
404  virtual void DoInitialize (void);
405 
406 private:
409 
410  void DoHandoverRequest (Ptr<NetDevice> ueDev, Ptr<NetDevice> sourceEnbDev, Ptr<NetDevice> targetEnbDev);
411 
414 
417 
423 
426 
428 
429  std::string m_fadingModelType;
433 
441 
443 
444  uint64_t m_imsiCounter;
445  uint16_t m_cellIdCounter;
446 
448 };
449 
450 
451 } // namespace ns3
452 
453 
454 
455 #endif // LTE_HELPER_H
Ptr< Object > m_uplinkPathlossModel
Definition: lte-helper.h:416
keep track of time values and allow control of global simulation resolution
Definition: nstime.h:81
void SetPathlossModelAttribute(std::string n, const AttributeValue &v)
Definition: lte-helper.cc:225
void EnableDlRxPhyTraces(void)
Definition: lte-helper.cc:922
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:59
RadioBearerStatsConnector m_radioBearerStatsConnector
Definition: lte-helper.h:440
Ptr< NetDevice > InstallSingleEnbDevice(Ptr< Node > n)
Definition: lte-helper.cc:331
static TypeId GetTypeId(void)
Definition: lte-helper.cc:136
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Definition: lte-helper.cc:301
void EnableLogComponents(void)
Definition: lte-helper.cc:803
void HandoverRequest(Time hoTime, Ptr< NetDevice > ueDev, Ptr< NetDevice > sourceEnbDev, Ptr< NetDevice > targetEnbDev)
Definition: lte-helper.cc:770
bool m_fadingStreamsAssigned
Definition: lte-helper.h:432
ObjectFactory m_fadingModelFactory
Definition: lte-helper.h:430
Hold a value for an Attribute.
Definition: attribute.h:56
void EnableDlPhyTraces(void)
Definition: lte-helper.cc:961
void SetUeAntennaModelAttribute(std::string n, const AttributeValue &v)
Definition: lte-helper.cc:262
void SetFadingModel(std::string model)
Definition: lte-helper.cc:269
void EnableRlcTraces(void)
Definition: lte-helper.cc:849
Ptr< PhyStatsCalculator > m_phyStats
Definition: lte-helper.h:434
Ptr< PhyRxStatsCalculator > m_phyRxStats
Definition: lte-helper.h:436
std::string m_fadingModelType
Definition: lte-helper.h:429
void SetUeAntennaModelType(std::string type)
Definition: lte-helper.cc:255
ObjectFactory m_propagationModelFactory
Definition: lte-helper.h:419
Ptr< MacStatsCalculator > m_macStats
Definition: lte-helper.h:437
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Definition: lte-helper.cc:857
ObjectFactory m_ulPathlossModelFactory
Definition: lte-helper.h:425
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, EpsBearer bearer)
Definition: lte-helper.cc:793
ObjectFactory m_channelFactory
Definition: lte-helper.h:427
void EnableUlRxPhyTraces(void)
Definition: lte-helper.cc:929
void SetSchedulerType(std::string type)
Definition: lte-helper.cc:193
Ptr< RadioBearerStatsCalculator > m_rlcStats
Definition: lte-helper.h:438
void EnablePdcpTraces(void)
Definition: lte-helper.cc:986
void AttachToClosestEnb(NetDeviceContainer ueDevices, NetDeviceContainer enbDevices)
Definition: lte-helper.cc:617
Ptr< Object > m_downlinkPathlossModel
Definition: lte-helper.h:415
void DoHandoverRequest(Ptr< NetDevice > ueDev, Ptr< NetDevice > sourceEnbDev, Ptr< NetDevice > targetEnbDev)
Definition: lte-helper.cc:778
void EnableTraces(void)
Definition: lte-helper.cc:840
void SetSchedulerAttribute(std::string n, const AttributeValue &v)
Definition: lte-helper.cc:207
Ptr< NetDevice > InstallSingleUeDevice(Ptr< Node > n)
Definition: lte-helper.cc:478
void Attach(NetDeviceContainer ueDevices, Ptr< NetDevice > enbDevice)
Definition: lte-helper.cc:582
uint64_t m_imsiCounter
Definition: lte-helper.h:444
ObjectFactory m_enbAntennaModelFactory
Definition: lte-helper.h:421
holds a vector of ns3::NetDevice pointers
uint16_t m_cellIdCounter
Definition: lte-helper.h:445
void EnablePhyTraces(void)
Definition: lte-helper.cc:897
void SetEnbAntennaModelType(std::string type)
Definition: lte-helper.cc:241
ObjectFactory m_dlPathlossModelFactory
Definition: lte-helper.h:424
void SetSpectrumChannelType(std::string type)
Definition: lte-helper.cc:287
void SetFadingModelAttribute(std::string n, const AttributeValue &v)
Definition: lte-helper.cc:281
void EnableDlMacTraces(void)
Definition: lte-helper.cc:945
void ActivateDedicatedEpsBearer(NetDeviceContainer ueDevices, EpsBearer bearer, Ptr< EpcTft > tft)
Definition: lte-helper.cc:649
keep track of a set of node pointers.
void EnableUlTxPhyTraces(void)
Definition: lte-helper.cc:915
Ptr< SpectrumChannel > m_uplinkChannel
Definition: lte-helper.h:413
void AddX2Interface(NodeContainer enbNodes)
Definition: lte-helper.cc:747
ObjectFactory m_schedulerFactory
Definition: lte-helper.h:418
void EnableUlPhyTraces(void)
Definition: lte-helper.cc:969
void EnableDlTxPhyTraces(void)
Definition: lte-helper.cc:908
Ptr< SpectrumPropagationLossModel > m_fadingModule
Definition: lte-helper.h:431
void EnableUlMacTraces(void)
Definition: lte-helper.cc:953
Ptr< EpcHelper > m_epcHelper
Definition: lte-helper.h:442
Ptr< RadioBearerStatsCalculator > GetRlcStats(void)
Definition: lte-helper.cc:980
virtual ~LteHelper(void)
Definition: lte-helper.cc:131
NetDeviceContainer InstallUeDevice(NodeContainer c)
Definition: lte-helper.cc:316
Ptr< PhyTxStatsCalculator > m_phyTxStats
Definition: lte-helper.h:435
Ptr< RadioBearerStatsCalculator > GetPdcpStats(void)
Definition: lte-helper.cc:994
virtual void DoDispose(void)
Definition: lte-helper.cc:176
instantiate subclasses of ns3::Object.
void SetEpcHelper(Ptr< EpcHelper > h)
Definition: lte-helper.cc:186
void SetPathlossModelType(std::string type)
Definition: lte-helper.cc:215
void SetEnbAntennaModelAttribute(std::string n, const AttributeValue &v)
Definition: lte-helper.cc:248
void SetSpectrumChannelAttribute(std::string n, const AttributeValue &v)
Definition: lte-helper.cc:294
virtual void DoInitialize(void)
Definition: lte-helper.cc:81
void EnableMacTraces(void)
Definition: lte-helper.cc:937
a base class which provides memory management and object aggregation
Definition: object.h:63
Ptr< RadioBearerStatsCalculator > m_pdcpStats
Definition: lte-helper.h:439
ObjectFactory m_ueAntennaModelFactory
Definition: lte-helper.h:422
a unique identifier for an interface.
Definition: type-id.h:49
ObjectFactory m_enbNetDeviceFactory
Definition: lte-helper.h:420
Ptr< SpectrumChannel > m_downlinkChannel
Definition: lte-helper.h:412
std::string GetSchedulerType() const
Definition: lte-helper.cc:201
void SetEnbDeviceAttribute(std::string n, const AttributeValue &v)
Definition: lte-helper.cc:233
bool m_useIdealRrc
Definition: lte-helper.h:447