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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Giuseppe Piro <g.piro@poliba.it>
7 * Author: Marco Miozzo <marco.miozzo@cttc.es> : Update to FF API Architecture
8 * Author: Danilo Abrignani <danilo.abrignani@unibo.it> : Integrated with new architecture - GSoC
9 * 2015 - Carrier Aggregation
10 */
11
12#ifndef LTE_ENB_NET_DEVICE_H
13#define LTE_ENB_NET_DEVICE_H
14
15#include "component-carrier.h"
16#include "lte-net-device.h"
17
18#include "ns3/event-id.h"
19#include "ns3/mac48-address.h"
20#include "ns3/nstime.h"
21#include "ns3/traced-callback.h"
22
23#include <map>
24#include <vector>
25
26namespace ns3
27{
28
29class Packet;
30class PacketBurst;
31class Node;
32class LtePhy;
33class LteEnbPhy;
34class LteEnbMac;
35class LteEnbRrc;
36class FfMacScheduler;
37class LteHandoverAlgorithm;
38class LteAnr;
39class LteFfrAlgorithm;
40class LteEnbComponentCarrierManager;
41
42/**
43 * @ingroup lte
44 *
45 * The eNodeB device implementation
46 */
48{
49 public:
50 /**
51 * @brief Get the type ID.
52 * @return the object TypeId
53 */
54 static TypeId GetTypeId();
55
57
58 ~LteEnbNetDevice() override;
59 void DoDispose() override;
60
61 // inherited from NetDevice
62 bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber) override;
63
64 /**
65 * @return a pointer to the MAC of the PCC.
66 */
67 Ptr<LteEnbMac> GetMac() const;
68
69 /**
70 * @param index CC index
71 * @return a pointer to the MAC of the CC addressed by index.
72 */
73 Ptr<LteEnbMac> GetMac(uint8_t index) const;
74
75 /**
76 * @return a pointer to the physical layer of the PCC.
77 */
78 Ptr<LteEnbPhy> GetPhy() const;
79
80 /**
81 * @param index SCC index
82 * @return a pointer to the physical layer of the SCC addressed by index.
83 */
84 Ptr<LteEnbPhy> GetPhy(uint8_t index) const;
85
86 /**
87 * @return a pointer to the Radio Resource Control instance of the eNB
88 */
89 Ptr<LteEnbRrc> GetRrc() const;
90
91 /**
92 * @return a pointer to the ComponentCarrierManager instance of the eNB
93 */
95
96 /**
97 * @return the Cell Identifier of this eNB
98 */
99 uint16_t GetCellId() const;
100
101 /**
102 * @return the identifiers of cells served by this eNB
103 */
104 std::vector<uint16_t> GetCellIds() const;
105
106 /**
107 * @param cellId cell ID
108 * @return true if cellId is served by this eNB
109 */
110 bool HasCellId(uint16_t cellId) const;
111
112 /**
113 * @return the uplink bandwidth in RBs
114 */
115 uint16_t GetUlBandwidth() const;
116
117 /**
118 * @param bw the uplink bandwidth in RBs
119 */
120 void SetUlBandwidth(uint16_t bw);
121
122 /**
123 * @return the downlink bandwidth in RBs
124 */
125 uint16_t GetDlBandwidth() const;
126
127 /**
128 * @param bw the downlink bandwidth in RBs
129 */
130 void SetDlBandwidth(uint16_t bw);
131
132 /**
133 * @return the downlink carrier frequency (EARFCN)
134 */
135 uint32_t GetDlEarfcn() const;
136
137 /**
138 * @param earfcn the downlink carrier frequency (EARFCN)
139 */
140 void SetDlEarfcn(uint32_t earfcn);
141
142 /**
143 * @return the uplink carrier frequency (EARFCN)
144 */
145 uint32_t GetUlEarfcn() const;
146
147 /**
148 * @param earfcn the uplink carrier frequency (EARFCN)
149 */
150 void SetUlEarfcn(uint32_t earfcn);
151
152 /**
153 * @brief Returns the CSG ID of the eNodeB.
154 * @return the Closed Subscriber Group identity
155 * \sa LteEnbNetDevice::SetCsgId
156 */
157 uint32_t GetCsgId() const;
158
159 /**
160 * @brief Associate the eNodeB device with a particular CSG.
161 * @param csgId the intended Closed Subscriber Group identity
162 *
163 * CSG identity is a number identifying a Closed Subscriber Group which the
164 * cell belongs to. eNodeB is associated with a single CSG identity.
165 *
166 * The same CSG identity can also be associated to several UEs, which is
167 * equivalent as enlisting these UEs as the members of this particular CSG.
168 *
169 * \sa LteEnbNetDevice::SetCsgIndication
170 */
171 void SetCsgId(uint32_t csgId);
172
173 /**
174 * @brief Returns the CSG indication flag of the eNodeB.
175 * @return the CSG indication flag
176 * \sa LteEnbNetDevice::SetCsgIndication
177 */
178 bool GetCsgIndication() const;
179
180 /**
181 * @brief Enable or disable the CSG indication flag.
182 * @param csgIndication if TRUE, only CSG members are allowed to access this
183 * cell
184 *
185 * When the CSG indication field is set to TRUE, only UEs which are members of
186 * the CSG (i.e. same CSG ID) can gain access to the eNodeB, therefore
187 * enforcing closed access mode. Otherwise, the eNodeB operates as a non-CSG
188 * cell and implements open access mode.
189 *
190 * @note This restriction only applies to initial cell selection and
191 * EPC-enabled simulation.
192 *
193 * \sa LteEnbNetDevice::SetCsgIndication
194 */
195 void SetCsgIndication(bool csgIndication);
196
197 /**
198 * @brief Set the ComponentCarrier Map of the Enb
199 * @param ccm the map of ComponentCarrierEnb
200 *
201 */
202
203 void SetCcMap(std::map<uint8_t, Ptr<ComponentCarrierBaseStation>> ccm);
204
205 /**
206 * @returns The Component Carrier Map of the Enb.
207 *
208 */
209
210 std::map<uint8_t, Ptr<ComponentCarrierBaseStation>> GetCcMap() const;
211
212 protected:
213 // inherited from Object
214 void DoInitialize() override;
215
216 private:
217 bool m_isConstructed; ///< is constructed?
218 bool m_isConfigured; ///< is configured?
219
220 /**
221 * @brief Propagate attributes and configuration to sub-modules.
222 *
223 * Several attributes (e.g., the bandwidth) are exported as the attributes of
224 * the LteEnbNetDevice from a user perspective, but are actually used also in
225 * other sub-modules (the RRC, the PHY, the scheduler, etc.). This method
226 * takes care of updating the configuration of all these sub-modules so that
227 * their copy of attribute values are in sync with the one in
228 * the LteEnbNetDevice.
229 */
230 void UpdateConfig();
231
232 Ptr<LteEnbRrc> m_rrc; ///< the RRC
233
235
237
238 Ptr<LteFfrAlgorithm> m_ffrAlgorithm; /**< DEPRECATED - It is maintained for backward
239 compatibility after adding CA feature*/
240
241 uint16_t m_cellId; /**< Cell Identifier. Part of the CGI, see TS 29.274, section 8.21.1 */
242
243 uint16_t m_dlBandwidth; /**<DEPRECATE - It is maintained for backward compatibility after adding
244 CA feature- downlink bandwidth in RBs */
245 uint16_t m_ulBandwidth; /**<DEPRECATE - It is maintained for backward compatibility after adding
246 CA feature- uplink bandwidth in RBs */
247
248 uint32_t m_dlEarfcn; /**<DEPRECATE - It is maintained for backward compatibility after adding CA
249 feature- downlink carrier frequency */
250 uint32_t m_ulEarfcn; /**<DEPRECATE - It is maintained for backward compatibility after adding CA
251 feature- uplink carrier frequency */
252
253 uint16_t m_csgId; ///< CSG ID
254 bool m_csgIndication; ///< CSG indication
255
256 std::map<uint8_t, Ptr<ComponentCarrierBaseStation>> m_ccMap; /**< ComponentCarrier map */
257
259 m_componentCarrierManager; ///< the component carrier manager of this eNb
260
261}; // end of class LteEnbNetDevice
262
263} // namespace ns3
264
265#endif /* LTE_ENB_NET_DEVICE_H */
a polymophic address class
Definition address.h:90
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 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.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.