A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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
37namespace ns3
38{
39
40class Packet;
41class PacketBurst;
42class Node;
43class LtePhy;
44class LteEnbPhy;
45class LteEnbMac;
46class LteEnbRrc;
47class FfMacScheduler;
48class LteHandoverAlgorithm;
49class LteAnr;
50class LteFfrAlgorithm;
51class LteEnbComponentCarrierManager;
52
53/**
54 * \ingroup lte
55 *
56 * The eNodeB device implementation
57 */
59{
60 public:
61 /**
62 * \brief Get the type ID.
63 * \return the object TypeId
64 */
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
75 /**
76 * \return a pointer to the MAC of the PCC.
77 */
78 Ptr<LteEnbMac> GetMac() const;
79
80 /**
81 * \param index CC index
82 * \return a pointer to the MAC of the CC addressed by index.
83 */
84 Ptr<LteEnbMac> GetMac(uint8_t index) const;
85
86 /**
87 * \return a pointer to the physical layer of the PCC.
88 */
89 Ptr<LteEnbPhy> GetPhy() const;
90
91 /**
92 * \param index SCC index
93 * \return a pointer to the physical layer of the SCC addressed by index.
94 */
95 Ptr<LteEnbPhy> GetPhy(uint8_t index) const;
96
97 /**
98 * \return a pointer to the Radio Resource Control instance of the eNB
99 */
100 Ptr<LteEnbRrc> GetRrc() const;
101
102 /**
103 * \return a pointer to the ComponentCarrierManager instance of the eNB
104 */
106
107 /**
108 * \return the Cell Identifier of this eNB
109 */
110 uint16_t GetCellId() const;
111
112 /**
113 * \return the identifiers of cells served by this eNB
114 */
115 std::vector<uint16_t> GetCellIds() const;
116
117 /**
118 * \param cellId cell ID
119 * \return true if cellId is served by this eNB
120 */
121 bool HasCellId(uint16_t cellId) const;
122
123 /**
124 * \return the uplink bandwidth in RBs
125 */
126 uint16_t GetUlBandwidth() const;
127
128 /**
129 * \param bw the uplink bandwidth in RBs
130 */
131 void SetUlBandwidth(uint16_t bw);
132
133 /**
134 * \return the downlink bandwidth in RBs
135 */
136 uint16_t GetDlBandwidth() const;
137
138 /**
139 * \param bw the downlink bandwidth in RBs
140 */
141 void SetDlBandwidth(uint16_t bw);
142
143 /**
144 * \return the downlink carrier frequency (EARFCN)
145 */
146 uint32_t GetDlEarfcn() const;
147
148 /**
149 * \param earfcn the downlink carrier frequency (EARFCN)
150 */
151 void SetDlEarfcn(uint32_t earfcn);
152
153 /**
154 * \return the uplink carrier frequency (EARFCN)
155 */
156 uint32_t GetUlEarfcn() const;
157
158 /**
159 * \param earfcn the uplink carrier frequency (EARFCN)
160 */
161 void SetUlEarfcn(uint32_t earfcn);
162
163 /**
164 * \brief Returns the CSG ID of the eNodeB.
165 * \return the Closed Subscriber Group identity
166 * \sa LteEnbNetDevice::SetCsgId
167 */
168 uint32_t GetCsgId() const;
169
170 /**
171 * \brief Associate the eNodeB device with a particular CSG.
172 * \param csgId the intended Closed Subscriber Group identity
173 *
174 * CSG identity is a number identifying a Closed Subscriber Group which the
175 * cell belongs to. eNodeB is associated with a single CSG identity.
176 *
177 * The same CSG identity can also be associated to several UEs, which is
178 * equivalent as enlisting these UEs as the members of this particular CSG.
179 *
180 * \sa LteEnbNetDevice::SetCsgIndication
181 */
182 void SetCsgId(uint32_t csgId);
183
184 /**
185 * \brief Returns the CSG indication flag of the eNodeB.
186 * \return the CSG indication flag
187 * \sa LteEnbNetDevice::SetCsgIndication
188 */
189 bool GetCsgIndication() const;
190
191 /**
192 * \brief Enable or disable the CSG indication flag.
193 * \param csgIndication if TRUE, only CSG members are allowed to access this
194 * cell
195 *
196 * When the CSG indication field is set to TRUE, only UEs which are members of
197 * the CSG (i.e. same CSG ID) can gain access to the eNodeB, therefore
198 * enforcing closed access mode. Otherwise, the eNodeB operates as a non-CSG
199 * cell and implements open access mode.
200 *
201 * \note This restriction only applies to initial cell selection and
202 * EPC-enabled simulation.
203 *
204 * \sa LteEnbNetDevice::SetCsgIndication
205 */
206 void SetCsgIndication(bool csgIndication);
207
208 /**
209 * \brief Set the ComponentCarrier Map of the Enb
210 * \param ccm the map of ComponentCarrierEnb
211 *
212 */
213
214 void SetCcMap(std::map<uint8_t, Ptr<ComponentCarrierBaseStation>> ccm);
215
216 /**
217 * \returns The Component Carrier Map of the Enb.
218 *
219 */
220
221 std::map<uint8_t, Ptr<ComponentCarrierBaseStation>> GetCcMap() const;
222
223 protected:
224 // inherited from Object
225 void DoInitialize() override;
226
227 private:
228 bool m_isConstructed; ///< is constructed?
229 bool m_isConfigured; ///< is configured?
230
231 /**
232 * \brief Propagate attributes and configuration to sub-modules.
233 *
234 * Several attributes (e.g., the bandwidth) are exported as the attributes of
235 * the LteEnbNetDevice from a user perspective, but are actually used also in
236 * other sub-modules (the RRC, the PHY, the scheduler, etc.). This method
237 * takes care of updating the configuration of all these sub-modules so that
238 * their copy of attribute values are in sync with the one in
239 * the LteEnbNetDevice.
240 */
241 void UpdateConfig();
242
243 Ptr<LteEnbRrc> m_rrc; ///< the RRC
244
246
248
249 Ptr<LteFfrAlgorithm> m_ffrAlgorithm; /**< DEPRECATED - It is maintained for backward
250 compatibility after adding CA feature*/
251
252 uint16_t m_cellId; /**< Cell Identifier. Part of the CGI, see TS 29.274, section 8.21.1 */
253
254 uint16_t m_dlBandwidth; /**<DEPRECATE - It is maintained for backward compatibility after adding
255 CA feature- downlink bandwidth in RBs */
256 uint16_t m_ulBandwidth; /**<DEPRECATE - It is maintained for backward compatibility after adding
257 CA feature- uplink bandwidth in RBs */
258
259 uint32_t m_dlEarfcn; /**<DEPRECATE - It is maintained for backward compatibility after adding CA
260 feature- downlink carrier frequency */
261 uint32_t m_ulEarfcn; /**<DEPRECATE - It is maintained for backward compatibility after adding CA
262 feature- uplink carrier frequency */
263
264 uint16_t m_csgId; ///< CSG ID
265 bool m_csgIndication; ///< CSG indication
266
267 std::map<uint8_t, Ptr<ComponentCarrierBaseStation>> m_ccMap; /**< ComponentCarrier map */
268
270 m_componentCarrierManager; ///< the component carrier manager of this eNb
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)
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?
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
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.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.