A Discrete-Event Network Simulator
API
lte-enb-net-device.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Giuseppe Piro <g.piro@poliba.it>
18  * Author: Marco Miozzo <marco.miozzo@cttc.es> : Update to FF API Architecture
19  * Author: Danilo Abrignani <danilo.abrignani@unibo.it> : Integrated with new architecture - GSoC
20  * 2015 - Carrier Aggregation
21  */
22 
23 #ifndef LTE_ENB_NET_DEVICE_H
24 #define LTE_ENB_NET_DEVICE_H
25 
26 #include "component-carrier.h"
27 #include "lte-net-device.h"
28 
29 #include "ns3/event-id.h"
30 #include "ns3/mac48-address.h"
31 #include "ns3/nstime.h"
32 #include "ns3/traced-callback.h"
33 
34 #include <map>
35 #include <vector>
36 
37 namespace ns3
38 {
39 
40 class Packet;
41 class PacketBurst;
42 class Node;
43 class LtePhy;
44 class LteEnbPhy;
45 class LteEnbMac;
46 class LteEnbRrc;
47 class FfMacScheduler;
48 class LteHandoverAlgorithm;
49 class LteAnr;
50 class LteFfrAlgorithm;
51 class LteEnbComponentCarrierManager;
52 
59 {
60  public:
65  static TypeId GetTypeId();
66 
68 
69  ~LteEnbNetDevice() override;
70  void DoDispose() override;
71 
72  // inherited from NetDevice
73  bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber) override;
74 
78  Ptr<LteEnbMac> GetMac() const;
79 
84  Ptr<LteEnbMac> GetMac(uint8_t index) const;
85 
89  Ptr<LteEnbPhy> GetPhy() const;
90 
95  Ptr<LteEnbPhy> GetPhy(uint8_t index) const;
96 
100  Ptr<LteEnbRrc> GetRrc() const;
101 
106 
110  uint16_t GetCellId() const;
111 
115  std::vector<uint16_t> GetCellIds() const;
116 
121  bool HasCellId(uint16_t cellId) const;
122 
126  uint16_t GetUlBandwidth() const;
127 
131  void SetUlBandwidth(uint16_t bw);
132 
136  uint16_t GetDlBandwidth() const;
137 
141  void SetDlBandwidth(uint16_t bw);
142 
146  uint32_t GetDlEarfcn() const;
147 
151  void SetDlEarfcn(uint32_t earfcn);
152 
156  uint32_t GetUlEarfcn() const;
157 
161  void SetUlEarfcn(uint32_t earfcn);
162 
168  uint32_t GetCsgId() const;
169 
182  void SetCsgId(uint32_t csgId);
183 
189  bool GetCsgIndication() const;
190 
206  void SetCsgIndication(bool csgIndication);
207 
214  void SetCcMap(std::map<uint8_t, Ptr<ComponentCarrierBaseStation>> ccm);
215 
221  std::map<uint8_t, Ptr<ComponentCarrierBaseStation>> GetCcMap() const;
222 
223  protected:
224  // inherited from Object
225  void DoInitialize() override;
226 
227  private:
230 
241  void UpdateConfig();
242 
244 
246 
248 
252  uint16_t m_cellId;
254  uint16_t m_dlBandwidth;
256  uint16_t m_ulBandwidth;
259  uint32_t m_dlEarfcn;
261  uint32_t m_ulEarfcn;
264  uint16_t m_csgId;
266 
267  std::map<uint8_t, Ptr<ComponentCarrierBaseStation>> m_ccMap;
271 
272 }; // end of class LteEnbNetDevice
273 
274 } // namespace ns3
275 
276 #endif /* LTE_ENB_NET_DEVICE_H */
a polymophic address class
Definition: address.h:101
The eNodeB device implementation.
void SetUlEarfcn(uint32_t earfcn)
std::map< uint8_t, Ptr< ComponentCarrierBaseStation > > GetCcMap() const
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)
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?
uint32_t GetCsgId() const
Returns the CSG ID of the eNodeB.
uint16_t GetDlBandwidth() const
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
void SetCcMap(std::map< uint8_t, Ptr< ComponentCarrierBaseStation >> ccm)
Set the ComponentCarrier Map of the Enb.
Ptr< LteEnbPhy > GetPhy() const
uint16_t m_cellId
Cell Identifier.
uint16_t GetUlBandwidth() const
void DoInitialize() override
Initialize() implementation.
std::vector< uint16_t > GetCellIds() 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...
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
static TypeId GetTypeId()
Get the type ID.
bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) override
Ptr< LteEnbMac > GetMac() const
std::map< uint8_t, Ptr< ComponentCarrierBaseStation > > m_ccMap
ComponentCarrier map.
uint16_t GetCellId() const
uint16_t m_ulBandwidth
DEPRECATE - It is maintained for backward compatibility after adding CA feature- uplink bandwidth in ...
void DoDispose() override
Destructor implementation.
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.