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);
83 
87  Ptr<LteEnbPhy> GetPhy (void) const;
88 
93  Ptr<LteEnbPhy> GetPhy (uint8_t index);
94 
98  Ptr<LteEnbRrc> GetRrc () const;
99 
104 
108  uint16_t GetCellId () const;
109 
114  bool HasCellId (uint16_t cellId) const;
115 
119  uint8_t GetUlBandwidth () const;
120 
124  void SetUlBandwidth (uint8_t bw);
125 
129  uint8_t GetDlBandwidth () const;
130 
134  void SetDlBandwidth (uint8_t bw);
135 
139  uint32_t GetDlEarfcn () const;
140 
144  void SetDlEarfcn (uint32_t earfcn);
145 
149  uint32_t GetUlEarfcn () const;
150 
154  void SetUlEarfcn (uint32_t earfcn);
155 
161  uint32_t GetCsgId () const;
162 
175  void SetCsgId (uint32_t csgId);
176 
182  bool GetCsgIndication () const;
183 
199  void SetCsgIndication (bool csgIndication);
200 
207  void SetCcMap (std::map< uint8_t, Ptr<ComponentCarrierEnb> > ccm);
208 
214  std::map< uint8_t, Ptr<ComponentCarrierEnb> > GetCcMap (void);
215 
216 protected:
217  // inherited from Object
218  virtual void DoInitialize (void);
219 
220 
221 private:
224 
235  void UpdateConfig ();
236 
238 
240 
242 
245  uint16_t m_cellId;
247  uint8_t m_dlBandwidth;
248  uint8_t m_ulBandwidth;
250  uint32_t m_dlEarfcn;
251  uint32_t m_ulEarfcn;
253  uint16_t m_csgId;
255 
256  std::map < uint8_t, Ptr<ComponentCarrierEnb> > m_ccMap;
259 
260 }; // end of class LteEnbNetDevice
261 
262 } // namespace ns3
263 
264 #endif /* LTE_ENB_NET_DEVICE_H */
void SetUlEarfcn(uint32_t earfcn)
uint16_t GetCellId() const
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
Ptr< LteAnr > m_anr
ANR.
uint8_t GetUlBandwidth() const
uint8_t m_dlBandwidth
DEPRECATE - It is maintained for backward compatibility after adding CA feature- downlink bandwidth i...
Ptr< LteEnbPhy > GetPhy(void) const
uint32_t m_dlEarfcn
DEPRECATE - It is maintained for backward compatibility after adding CA feature- downlink carrier fre...
std::map< uint8_t, Ptr< ComponentCarrierEnb > > m_ccMap
ComponentCarrier map.
uint32_t GetCsgId() const
Returns the CSG ID of the eNodeB.
Ptr< LteEnbComponentCarrierManager > m_componentCarrierManager
the component carrier manager of this eNb
bool m_isConstructed
is constructed?
uint16_t m_csgId
CSG ID.
a polymophic address class
Definition: address.h:90
uint32_t GetUlEarfcn() const
void UpdateConfig()
Propagate attributes and configuration to sub-modules.
void SetUlBandwidth(uint8_t bw)
Ptr< LteEnbRrc > m_rrc
the RRC
virtual void DoInitialize(void)
Initialize() implementation.
static TypeId GetTypeId(void)
Get the type ID.
Ptr< LteEnbRrc > GetRrc() const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetDlBandwidth(uint8_t bw)
Ptr< LteFfrAlgorithm > m_ffrAlgorithm
DEPRECATED - It is maintained for backward compatibility after adding CA feature. ...
uint32_t GetDlEarfcn() const
void SetDlEarfcn(uint32_t earfcn)
virtual void DoDispose(void)
Destructor implementation.
void SetCsgIndication(bool csgIndication)
Enable or disable the CSG indication flag.
uint32_t m_ulEarfcn
DEPRECATE - It is maintained for backward compatibility after adding CA feature- uplink carrier frequ...
void SetCcMap(std::map< uint8_t, Ptr< ComponentCarrierEnb > > ccm)
Set the ComponentCarrier Map of the Enb.
bool m_csgIndication
CSG indication.
bool GetCsgIndication() const
Returns the CSG indication flag of the eNodeB.
Ptr< LteEnbComponentCarrierManager > GetComponentCarrierManager() const
bool m_isConfigured
is configured?
bool HasCellId(uint16_t cellId) const
Ptr< LteHandoverAlgorithm > m_handoverAlgorithm
the handover algorithm
uint16_t m_cellId
Cell Identifer.
uint8_t GetDlBandwidth() const
void SetCsgId(uint32_t csgId)
Associate the eNodeB device with a particular CSG.
uint8_t m_ulBandwidth
DEPRECATE - It is maintained for backward compatibility after adding CA feature- uplink bandwidth in ...
virtual ~LteEnbNetDevice(void)
LteNetDevice provides basic implementation for all LTE network devices.
std::map< uint8_t, Ptr< ComponentCarrierEnb > > GetCcMap(void)
The eNodeB device implementation.
a unique identifier for an interface.
Definition: type-id.h:58
Ptr< LteEnbMac > GetMac(void) const