A Discrete-Event Network Simulator
API
lte-enb-net-device.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> : Update to FF API Architecture
20  * Author: Danilo Abrignani <danilo.abrignani@unibo.it> : Integrated with new architecture - GSoC 2015 - Carrier Aggregation
21  */
22 
23 #ifndef LTE_ENB_NET_DEVICE_H
24 #define LTE_ENB_NET_DEVICE_H
25 
26 #include "ns3/lte-net-device.h"
27 #include "ns3/event-id.h"
28 #include "ns3/mac48-address.h"
29 #include "ns3/traced-callback.h"
30 #include "ns3/nstime.h"
31 #include "ns3/lte-phy.h"
32 #include "ns3/component-carrier-enb.h"
33 #include <vector>
34 #include <map>
35 
36 namespace ns3 {
37 
38 class Packet;
39 class PacketBurst;
40 class Node;
41 class LtePhy;
42 class LteEnbPhy;
43 class LteEnbMac;
44 class LteEnbRrc;
45 class FfMacScheduler;
46 class LteHandoverAlgorithm;
47 class LteAnr;
48 class LteFfrAlgorithm;
49 class LteEnbComponentCarrierManager;
50 
57 {
58 public:
63  static TypeId GetTypeId (void);
64 
65  LteEnbNetDevice ();
66 
67  virtual ~LteEnbNetDevice (void);
68  virtual void DoDispose (void);
69 
70  // inherited from NetDevice
71  virtual bool Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
72 
76  Ptr<LteEnbMac> GetMac (void) const;
77 
82  Ptr<LteEnbMac> GetMac (uint8_t index) const;
83 
87  Ptr<LteEnbPhy> GetPhy (void) const;
88 
93  Ptr<LteEnbPhy> GetPhy (uint8_t index) const;
94 
98  Ptr<LteEnbRrc> GetRrc () const;
99 
104 
108  uint16_t GetCellId () const;
109 
113  std::vector<uint16_t> GetCellIds () const;
114 
119  bool HasCellId (uint16_t cellId) const;
120 
124  uint16_t GetUlBandwidth () const;
125 
129  void SetUlBandwidth (uint16_t bw);
130 
134  uint16_t GetDlBandwidth () const;
135 
139  void SetDlBandwidth (uint16_t bw);
140 
144  uint32_t GetDlEarfcn () const;
145 
149  void SetDlEarfcn (uint32_t earfcn);
150 
154  uint32_t GetUlEarfcn () const;
155 
159  void SetUlEarfcn (uint32_t earfcn);
160 
166  uint32_t GetCsgId () const;
167 
180  void SetCsgId (uint32_t csgId);
181 
187  bool GetCsgIndication () const;
188 
204  void SetCsgIndication (bool csgIndication);
205 
212  void SetCcMap (std::map< uint8_t, Ptr<ComponentCarrierBaseStation> > ccm);
213 
219  std::map< uint8_t, Ptr<ComponentCarrierBaseStation> > GetCcMap (void) const;
220 
221 protected:
222  // inherited from Object
223  virtual void DoInitialize (void);
224 
225 
226 private:
229 
240  void UpdateConfig ();
241 
243 
245 
247 
250  uint16_t m_cellId;
252  uint16_t m_dlBandwidth;
253  uint16_t m_ulBandwidth;
255  uint32_t m_dlEarfcn;
256  uint32_t m_ulEarfcn;
258  uint16_t m_csgId;
260 
261  std::map < uint8_t, Ptr<ComponentCarrierBaseStation> > m_ccMap;
264 
265 }; // end of class LteEnbNetDevice
266 
267 } // namespace ns3
268 
269 #endif /* LTE_ENB_NET_DEVICE_H */
a polymophic address class
Definition: address.h:91
The eNodeB device implementation.
void SetUlEarfcn(uint32_t earfcn)
bool HasCellId(uint16_t cellId) const
Ptr< LteAnr > m_anr
ANR.
void UpdateConfig()
Propagate attributes and configuration to sub-modules.
uint32_t m_dlEarfcn
DEPRECATE - It is maintained for backward compatibility after adding CA feature- downlink carrier fre...
void SetCsgId(uint32_t csgId)
Associate the eNodeB device with a particular CSG.
Ptr< LteHandoverAlgorithm > m_handoverAlgorithm
the handover algorithm
void SetDlEarfcn(uint32_t earfcn)
void SetCcMap(std::map< uint8_t, Ptr< ComponentCarrierBaseStation > > ccm)
Set the ComponentCarrier Map of the Enb.
bool m_isConfigured
is configured?
bool GetCsgIndication() const
Returns the CSG indication flag of the eNodeB.
void SetUlBandwidth(uint16_t bw)
uint16_t m_dlBandwidth
DEPRECATE - It is maintained for backward compatibility after adding CA feature- downlink bandwidth i...
bool m_isConstructed
is constructed?
static TypeId GetTypeId(void)
Get the type ID.
virtual ~LteEnbNetDevice(void)
uint32_t GetCsgId() const
Returns the CSG ID of the eNodeB.
uint16_t GetDlBandwidth() const
virtual void DoDispose(void)
Destructor implementation.
uint32_t GetUlEarfcn() const
uint32_t GetDlEarfcn() const
Ptr< LteEnbRrc > GetRrc() const
void SetCsgIndication(bool csgIndication)
Enable or disable the CSG indication flag.
Ptr< LteEnbRrc > m_rrc
the RRC
Ptr< LteEnbMac > GetMac(void) const
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
uint16_t m_cellId
Cell Identifier.
uint16_t GetUlBandwidth() const
std::vector< uint16_t > GetCellIds() const
Ptr< LteEnbPhy > GetPhy(void) const
Ptr< LteEnbComponentCarrierManager > GetComponentCarrierManager() const
bool m_csgIndication
CSG indication.
void SetDlBandwidth(uint16_t bw)
uint32_t m_ulEarfcn
DEPRECATE - It is maintained for backward compatibility after adding CA feature- uplink carrier frequ...
virtual void DoInitialize(void)
Initialize() implementation.
Ptr< LteFfrAlgorithm > m_ffrAlgorithm
DEPRECATED - It is maintained for backward compatibility after adding CA feature.
Ptr< LteEnbComponentCarrierManager > m_componentCarrierManager
the component carrier manager of this eNb
std::map< uint8_t, Ptr< ComponentCarrierBaseStation > > m_ccMap
ComponentCarrier map.
uint16_t GetCellId() const
std::map< uint8_t, Ptr< ComponentCarrierBaseStation > > GetCcMap(void) const
uint16_t m_ulBandwidth
DEPRECATE - It is maintained for backward compatibility after adding CA feature- uplink bandwidth in ...
LteNetDevice provides basic implementation for all LTE network devices.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.