|
50 |
|
50 |
|
51 |
/** |
51 |
/** |
52 |
* \ingroup lte |
52 |
* \ingroup lte |
53 |
* \brief Creation and configuration of LTE entities |
53 |
* Creation and configuration of LTE entities. One LteHelper instance is |
|
|
54 |
* typically enough for an LTE simulation. To create it: |
55 |
* |
56 |
* Ptr<LteHelper> lteHelper = CreateObject<LteHelper> (); |
57 |
* |
58 |
* The general responsibility of the helper is to create various LTE objects |
59 |
* and arrange them together to make the whole LTE system. The overall |
60 |
* arrangement would look like the following: |
61 |
* - Downlink spectrum channel |
62 |
* + Path loss model |
63 |
* + Fading model |
64 |
* - Uplink spectrum channel |
65 |
* + Path loss model |
66 |
* + Fading model |
67 |
* - eNodeB node(s) |
68 |
* + Mobility model |
69 |
* + eNodeB device(s) |
70 |
* * Antenna model |
71 |
* * eNodeB PHY (includes spectrum PHY, interference model, HARQ model) |
72 |
* * eNodeB MAC |
73 |
* * eNodeB RRC (includes RRC protocol) |
74 |
* * Scheduler |
75 |
* * Handover algorithm |
76 |
* * FFR (frequency reuse) algorithm |
77 |
* * ANR (automatic neighbour relation) |
78 |
* + EPC related models (EPC application, Internet stack, X2 interface) |
79 |
* - UE node(s) |
80 |
* + Mobility model |
81 |
* + UE device(s) |
82 |
* * Antenna model |
83 |
* * UE PHY (includes spectrum PHY, interference model, HARQ model) |
84 |
* * UE MAC |
85 |
* * UE RRC (includes RRC protocol) |
86 |
* * NAS |
87 |
* - EPC helper |
88 |
* - Various statistics calculator objects |
89 |
* |
90 |
* Spetrum channels are created automatically: one for DL, and one for UL. |
91 |
* eNodeB devices are created by calling InstallEnbDevice(), while UE devices |
92 |
* are created by calling InstallUeDevice(). EPC helper can be set by using |
93 |
* SetEpcHelper(). |
54 |
*/ |
94 |
*/ |
55 |
class LteHelper : public Object |
95 |
class LteHelper : public Object |
56 |
{ |
96 |
{ |
|
61 |
static TypeId GetTypeId (void); |
101 |
static TypeId GetTypeId (void); |
62 |
virtual void DoDispose (void); |
102 |
virtual void DoDispose (void); |
63 |
|
103 |
|
64 |
|
|
|
65 |
/** |
104 |
/** |
66 |
* Set the EpcHelper to be used to setup the EPC network in |
105 |
* Set the EpcHelper to be used to setup the EPC network in |
67 |
* conjunction with the setup of the LTE radio access network |
106 |
* conjunction with the setup of the LTE radio access network. |
68 |
* |
107 |
* |
69 |
* \note if no EpcHelper is ever set, then LteHelper will default |
108 |
* \note if no EpcHelper is ever set, then LteHelper will default |
70 |
* to creating an LTE-only simulation with no EPC, using LteRlcSm as |
109 |
* to creating an LTE-only simulation with no EPC, using LteRlcSm as |
|
78 |
void SetEpcHelper (Ptr<EpcHelper> h); |
117 |
void SetEpcHelper (Ptr<EpcHelper> h); |
79 |
|
118 |
|
80 |
/** |
119 |
/** |
|
|
120 |
* Set the type of path loss model to be used for both DL and UL channels. |
81 |
* |
121 |
* |
82 |
* |
122 |
* \param type type of path loss model, must be a type name of any class |
83 |
* \param type the type of pathloss model to be used for the eNBs |
123 |
* inheriting from ns3::PropagationLossModel, for example: |
|
|
124 |
* "ns3::FriisPropagationLossModel" |
84 |
*/ |
125 |
*/ |
85 |
void SetPathlossModelType (std::string type); |
126 |
void SetPathlossModelType (std::string type); |
86 |
|
127 |
|
87 |
/** |
128 |
/** |
88 |
* set an attribute for the pathloss model to be created |
129 |
* Set an attribute for the path loss models to be created. |
89 |
* |
130 |
* |
90 |
* \param n the name of the attribute |
131 |
* \param n the name of the attribute |
91 |
* \param v the value of the attribute |
132 |
* \param v the value of the attribute |
|
93 |
void SetPathlossModelAttribute (std::string n, const AttributeValue &v); |
134 |
void SetPathlossModelAttribute (std::string n, const AttributeValue &v); |
94 |
|
135 |
|
95 |
/** |
136 |
/** |
|
|
137 |
* Set the type of scheduler to be used by eNodeB devices. |
96 |
* |
138 |
* |
97 |
* \param type the type of scheduler to be used for the eNBs |
139 |
* \param type type of scheduler, must be a type name of any class |
|
|
140 |
* inheriting from ns3::FfMacScheduler, for example: |
141 |
* "ns3::PfFfMacScheduler" |
142 |
* |
143 |
* Equivalent with setting the `Scheduler` attribute. |
98 |
*/ |
144 |
*/ |
99 |
void SetSchedulerType (std::string type); |
145 |
void SetSchedulerType (std::string type); |
100 |
|
146 |
|
|
105 |
std::string GetSchedulerType () const; |
151 |
std::string GetSchedulerType () const; |
106 |
|
152 |
|
107 |
/** |
153 |
/** |
108 |
* set an attribute for the scheduler to be created |
154 |
* Set an attribute for the scheduler to be created. |
109 |
* |
155 |
* |
110 |
* \param n the name of the attribute |
156 |
* \param n the name of the attribute |
111 |
* \param v the value of the attribute |
157 |
* \param v the value of the attribute |
|
113 |
void SetSchedulerAttribute (std::string n, const AttributeValue &v); |
159 |
void SetSchedulerAttribute (std::string n, const AttributeValue &v); |
114 |
|
160 |
|
115 |
/** |
161 |
/** |
|
|
162 |
* Set the type of FFR algorithm to be used by eNodeB devices. |
116 |
* |
163 |
* |
117 |
* \param type the type of FFR algorithm to be used for the eNBs |
164 |
* \param type type of FFR algorithm, must be a type name of any class |
|
|
165 |
* inheriting from ns3::LteFfrAlgorithm, for example: |
166 |
* "ns3::LteFrNoOpAlgorithm" |
167 |
* |
168 |
* Equivalent with setting the `FfrAlgorithm` attribute. |
118 |
*/ |
169 |
*/ |
119 |
void SetFfrAlgorithmType (std::string type); |
170 |
void SetFfrAlgorithmType (std::string type); |
120 |
|
171 |
|
|
125 |
std::string GetFfrAlgorithmType () const; |
176 |
std::string GetFfrAlgorithmType () const; |
126 |
|
177 |
|
127 |
/** |
178 |
/** |
128 |
* set an attribute for the FFR algorithm to be created |
179 |
* Set an attribute for the FFR algorithm to be created. |
129 |
* |
180 |
* |
130 |
* \param n the name of the attribute |
181 |
* \param n the name of the attribute |
131 |
* \param v the value of the attribute |
182 |
* \param v the value of the attribute |
|
133 |
void SetFfrAlgorithmAttribute (std::string n, const AttributeValue &v); |
184 |
void SetFfrAlgorithmAttribute (std::string n, const AttributeValue &v); |
134 |
|
185 |
|
135 |
/** |
186 |
/** |
|
|
187 |
* Set the type of handover algorithm to be used by eNodeB devices. |
136 |
* |
188 |
* |
137 |
* \param type the type of handover algorithm to be used for the eNBs |
189 |
* \param type type of handover algorithm, must be a type name of any class |
|
|
190 |
* inheriting from ns3::LteHandoverAlgorithm, for example: |
191 |
* "ns3::NoOpHandoverAlgorithm" |
192 |
* |
193 |
* Equivalent with setting the `HandoverAlgorithm` attribute. |
138 |
*/ |
194 |
*/ |
139 |
void SetHandoverAlgorithmType (std::string type); |
195 |
void SetHandoverAlgorithmType (std::string type); |
140 |
|
196 |
|
|
145 |
std::string GetHandoverAlgorithmType () const; |
201 |
std::string GetHandoverAlgorithmType () const; |
146 |
|
202 |
|
147 |
/** |
203 |
/** |
148 |
* set an attribute for the handover algorithm to be created |
204 |
* Set an attribute for the handover algorithm to be created. |
149 |
* |
205 |
* |
150 |
* \param n the name of the attribute |
206 |
* \param n the name of the attribute |
151 |
* \param v the value of the attribute |
207 |
* \param v the value of the attribute |
|
153 |
void SetHandoverAlgorithmAttribute (std::string n, const AttributeValue &v); |
209 |
void SetHandoverAlgorithmAttribute (std::string n, const AttributeValue &v); |
154 |
|
210 |
|
155 |
/** |
211 |
/** |
156 |
* set an attribute for the LteEnbNetDevice to be created |
212 |
* Set an attribute for the eNodeB devices (LteEnbNetDevice) to be created. |
157 |
* |
213 |
* |
158 |
* \param n the name of the attribute |
214 |
* \param n the name of the attribute. |
159 |
* \param v the value of the attribute |
215 |
* \param v the value of the attribute |
160 |
*/ |
216 |
*/ |
161 |
void SetEnbDeviceAttribute (std::string n, const AttributeValue &v); |
217 |
void SetEnbDeviceAttribute (std::string n, const AttributeValue &v); |
162 |
|
218 |
|
163 |
/** |
219 |
/** |
|
|
220 |
* Set the type of antenna model to be used by eNodeB devices. |
164 |
* |
221 |
* |
165 |
* \param type the type of AntennaModel to be used for the eNBs |
222 |
* \param type type of antenna model, must be a type name of any class |
|
|
223 |
* inheriting from ns3::AntennaModel, for example: |
224 |
* "ns3::IsotropicAntennaModel" |
166 |
*/ |
225 |
*/ |
167 |
void SetEnbAntennaModelType (std::string type); |
226 |
void SetEnbAntennaModelType (std::string type); |
168 |
|
227 |
|
169 |
/** |
228 |
/** |
170 |
* set an attribute for the AntennaModel to be used for the eNBs |
229 |
* Set an attribute for the eNodeB antenna model to be created. |
171 |
* |
230 |
* |
172 |
* \param n the name of the attribute |
231 |
* \param n the name of the attribute. |
173 |
* \param v the value of the attribute |
232 |
* \param v the value of the attribute |
174 |
*/ |
233 |
*/ |
175 |
void SetEnbAntennaModelAttribute (std::string n, const AttributeValue &v); |
234 |
void SetEnbAntennaModelAttribute (std::string n, const AttributeValue &v); |
176 |
|
235 |
|
177 |
/** |
236 |
/** |
178 |
* set an attribute for the LteUeNetDevice to be created |
237 |
* Set an attribute for the UE devices (LteUeNetDevice) to be created. |
179 |
* |
238 |
* |
180 |
* \param n the name of the attribute |
239 |
* \param n the name of the attribute. |
181 |
* \param v the value of the attribute |
240 |
* \param v the value of the attribute |
182 |
*/ |
241 |
*/ |
183 |
void SetUeDeviceAttribute (std::string n, const AttributeValue &v); |
242 |
void SetUeDeviceAttribute (std::string n, const AttributeValue &v); |
184 |
|
243 |
|
185 |
/** |
244 |
/** |
|
|
245 |
* Set the type of antenna model to be used by UE devices. |
186 |
* |
246 |
* |
187 |
* \param type the type of AntennaModel to be used for the UEs |
247 |
* \param type type of antenna model, must be a type name of any class |
|
|
248 |
* inheriting from ns3::AntennaModel, for example: |
249 |
* "ns3::IsotropicAntennaModel" |
188 |
*/ |
250 |
*/ |
189 |
void SetUeAntennaModelType (std::string type); |
251 |
void SetUeAntennaModelType (std::string type); |
190 |
|
252 |
|
191 |
/** |
253 |
/** |
192 |
* set an attribute for the AntennaModel to be used for the UEs |
254 |
* Set an attribute for the UE antenna model to be created. |
193 |
* |
255 |
* |
194 |
* \param n the name of the attribute |
256 |
* \param n the name of the attribute |
195 |
* \param v the value of the attribute |
257 |
* \param v the value of the attribute |
|
197 |
void SetUeAntennaModelAttribute (std::string n, const AttributeValue &v); |
259 |
void SetUeAntennaModelAttribute (std::string n, const AttributeValue &v); |
198 |
|
260 |
|
199 |
/** |
261 |
/** |
200 |
* |
262 |
* Set the type of spectrum channel to be used in both DL and UL. |
201 |
* \param type the type of SpectrumChannel to be used for the UEs |
263 |
* |
|
|
264 |
* \param type type of spectrum channel model, must be a type name of any |
265 |
* class inheriting from ns3::SpectrumChannel, for example: |
266 |
* "ns3::MultiModelSpectrumChannel" |
202 |
*/ |
267 |
*/ |
203 |
void SetSpectrumChannelType (std::string type); |
268 |
void SetSpectrumChannelType (std::string type); |
204 |
|
269 |
|
205 |
/** |
270 |
/** |
206 |
* set an attribute for the SpectrumChannel to be used for the UEs |
271 |
* Set an attribute for the spectrum channel to be created (both DL and UL). |
207 |
* |
272 |
* |
208 |
* \param n the name of the attribute |
273 |
* \param n the name of the attribute |
209 |
* \param v the value of the attribute |
274 |
* \param v the value of the attribute |
|
211 |
void SetSpectrumChannelAttribute (std::string n, const AttributeValue &v); |
276 |
void SetSpectrumChannelAttribute (std::string n, const AttributeValue &v); |
212 |
|
277 |
|
213 |
/** |
278 |
/** |
214 |
* create a set of eNB devices |
279 |
* Create a set of eNodeB devices. |
215 |
* |
280 |
* |
216 |
* \param c the node container where the devices are to be installed |
281 |
* \param c the node container where the devices are to be installed |
217 |
* |
|
|
218 |
* \return the NetDeviceContainer with the newly created devices |
282 |
* \return the NetDeviceContainer with the newly created devices |
219 |
*/ |
283 |
*/ |
220 |
NetDeviceContainer InstallEnbDevice (NodeContainer c); |
284 |
NetDeviceContainer InstallEnbDevice (NodeContainer c); |
221 |
|
285 |
|
222 |
/** |
286 |
/** |
223 |
* create a set of UE devices |
287 |
* Create a set of UE devices. |
224 |
* |
288 |
* |
225 |
* \param c the node container where the devices are to be installed |
289 |
* \param c the node container where the devices are to be installed |
226 |
* |
|
|
227 |
* \return the NetDeviceContainer with the newly created devices |
290 |
* \return the NetDeviceContainer with the newly created devices |
228 |
*/ |
291 |
*/ |
229 |
NetDeviceContainer InstallUeDevice (NodeContainer c); |
292 |
NetDeviceContainer InstallUeDevice (NodeContainer c); |
|
328 |
void AttachToClosestEnb (Ptr<NetDevice> ueDevice, NetDeviceContainer enbDevices); |
391 |
void AttachToClosestEnb (Ptr<NetDevice> ueDevice, NetDeviceContainer enbDevices); |
329 |
|
392 |
|
330 |
/** |
393 |
/** |
331 |
* Activate a dedicated EPS bearer on a given set of UE devices |
394 |
* Activate a dedicated EPS bearer on a given set of UE devices. |
332 |
* |
395 |
* |
333 |
* \param ueDevices the set of UE devices |
396 |
* \param ueDevices the set of UE devices |
334 |
* \param bearer the characteristics of the bearer to be activated |
397 |
* \param bearer the characteristics of the bearer to be activated |
|
337 |
void ActivateDedicatedEpsBearer (NetDeviceContainer ueDevices, EpsBearer bearer, Ptr<EpcTft> tft); |
400 |
void ActivateDedicatedEpsBearer (NetDeviceContainer ueDevices, EpsBearer bearer, Ptr<EpcTft> tft); |
338 |
|
401 |
|
339 |
/** |
402 |
/** |
340 |
* Activate a dedicated EPS bearer on a given UE device |
403 |
* Activate a dedicated EPS bearer on a given UE device. |
341 |
* |
404 |
* |
342 |
* \param ueDevice the UE device |
405 |
* \param ueDevice the UE device |
343 |
* \param bearer the characteristics of the bearer to be activated |
406 |
* \param bearer the characteristics of the bearer to be activated |
344 |
* \param tft the Traffic Flow Template that identifies the traffic to go on this bearer |
407 |
* \param tft the Traffic Flow Template that identifies the traffic to go on this bearer. |
345 |
*/ |
408 |
*/ |
346 |
void ActivateDedicatedEpsBearer (Ptr<NetDevice> ueDevice, EpsBearer bearer, Ptr<EpcTft> tft); |
409 |
void ActivateDedicatedEpsBearer (Ptr<NetDevice> ueDevice, EpsBearer bearer, Ptr<EpcTft> tft); |
347 |
|
410 |
|
348 |
|
|
|
349 |
/** |
411 |
/** |
350 |
* Create an X2 interface between all the eNBs in a given set |
412 |
* Create an X2 interface between all the eNBs in a given set. |
351 |
* |
413 |
* |
352 |
* \param enbNodes the set of eNB nodes |
414 |
* \param enbNodes the set of eNB nodes |
353 |
*/ |
415 |
*/ |
354 |
void AddX2Interface (NodeContainer enbNodes); |
416 |
void AddX2Interface (NodeContainer enbNodes); |
355 |
|
417 |
|
356 |
/** |
418 |
/** |
357 |
* Create an X2 interface between two eNBs |
419 |
* Create an X2 interface between two eNBs. |
358 |
* |
420 |
* |
359 |
* \param enbNode1 one eNB of the X2 interface |
421 |
* \param enbNode1 one eNB of the X2 interface |
360 |
* \param enbNode2 the other eNB of the X2 interface |
422 |
* \param enbNode2 the other eNB of the X2 interface |
|
362 |
void AddX2Interface (Ptr<Node> enbNode1, Ptr<Node> enbNode2); |
424 |
void AddX2Interface (Ptr<Node> enbNode1, Ptr<Node> enbNode2); |
363 |
|
425 |
|
364 |
/** |
426 |
/** |
365 |
* \brief Manually trigger an X2-based handover of a UE between two eNBs at a |
427 |
* Manually trigger an X2-based handover. |
366 |
* specific simulation time. |
428 |
* |
367 |
* \param hoTime when the Handover is initiated |
429 |
* \param hoTime when the handover shall be initiated |
368 |
* \param ueDev the UE that hands off, must be of the type LteUeNetDevice |
430 |
* \param ueDev the UE that hands off, must be of the type LteUeNetDevice |
369 |
* \param sourceEnbDev source eNB, must be of the type LteEnbNetDevice |
431 |
* \param sourceEnbDev source eNB, must be of the type LteEnbNetDevice |
370 |
* (originally the UE is attached to this eNB) |
432 |
* (originally the UE is attached to this eNB) |
371 |
* \param targetEnbDev target eNB, must be of the type LteEnbNetDevice |
433 |
* \param targetEnbDev target eNB, must be of the type LteEnbNetDevice |
372 |
* (the UE is finally connected to this eNB) |
434 |
* (the UE would be connected to this eNB after the |
|
|
435 |
* handover) |
373 |
* |
436 |
* |
374 |
* \warning Requires the use of EPC mode. See SetEpcHelper() method. |
437 |
* \warning Requires the use of EPC mode. See SetEpcHelper() method |
375 |
*/ |
438 |
*/ |
376 |
void HandoverRequest (Time hoTime, Ptr<NetDevice> ueDev, |
439 |
void HandoverRequest (Time hoTime, Ptr<NetDevice> ueDev, |
377 |
Ptr<NetDevice> sourceEnbDev, Ptr<NetDevice> targetEnbDev); |
440 |
Ptr<NetDevice> sourceEnbDev, Ptr<NetDevice> targetEnbDev); |
378 |
|
441 |
|
379 |
|
442 |
|
380 |
/** |
443 |
/** |
381 |
* Call ActivateDataRadioBearer (ueDevice, bearer) for each UE |
444 |
* Activate a Data Radio Bearer on a given UE devices (for LTE-only simulation). |
382 |
* device in a given set |
|
|
383 |
* |
445 |
* |
384 |
* \param ueDevices the set of UE devices |
446 |
* \param ueDevices the set of UE devices |
385 |
* \param bearer |
447 |
* \param bearer the characteristics of the bearer to be activated |
386 |
*/ |
448 |
*/ |
387 |
void ActivateDataRadioBearer (NetDeviceContainer ueDevices, EpsBearer bearer); |
449 |
void ActivateDataRadioBearer (NetDeviceContainer ueDevices, EpsBearer bearer); |
388 |
|
450 |
|
389 |
/** |
451 |
/** |
390 |
* Activate a Data Radio Bearer for a simplified LTE-only simulation |
452 |
* Activate a Data Radio Bearer on a UE device (for LTE-only simulation). |
391 |
* without EPC. This method will schedule the actual activation of |
453 |
* This method will schedule the actual activation |
392 |
* the bearer so that it happens after the UE got connected. |
454 |
* the bearer so that it happens after the UE got connected. |
393 |
* |
455 |
* |
394 |
* \param ueDevice the device of the UE for which the radio bearer |
456 |
* \param ueDevice the UE device |
395 |
* is to be activated |
|
|
396 |
* \param bearer the characteristics of the bearer to be activated |
457 |
* \param bearer the characteristics of the bearer to be activated |
397 |
*/ |
458 |
*/ |
398 |
void ActivateDataRadioBearer (Ptr<NetDevice> ueDevice, EpsBearer bearer); |
459 |
void ActivateDataRadioBearer (Ptr<NetDevice> ueDevice, EpsBearer bearer); |
399 |
|
460 |
|
400 |
/** |
461 |
/** |
|
|
462 |
* Set the type of fading model to be used in both DL and UL. |
401 |
* |
463 |
* |
402 |
* |
464 |
* \param type type of fading model, must be a type name of any class |
403 |
* \param model the fading model to be used |
465 |
* inheriting from ns3::SpectrumPropagationLossModel, for |
|
|
466 |
* example: "ns3::TraceFadingLossModel" |
404 |
*/ |
467 |
*/ |
405 |
void SetFadingModel (std::string model); |
468 |
void SetFadingModel (std::string type); |
406 |
|
469 |
|
407 |
/** |
470 |
/** |
408 |
* set an attribute of the fading model |
471 |
* Set an attribute for the fading model to be created (both DL and UL). |
409 |
* |
472 |
* |
410 |
* \param n the name of the attribute |
473 |
* \param n the name of the attribute |
411 |
* \param v the value of the attribute |
474 |
* \param v the value of the attribute |
|
413 |
void SetFadingModelAttribute (std::string n, const AttributeValue &v); |
476 |
void SetFadingModelAttribute (std::string n, const AttributeValue &v); |
414 |
|
477 |
|
415 |
/** |
478 |
/** |
416 |
* Enables logging for all components of the LENA architecture |
479 |
* Enables full-blown logging for major components of the LENA architecture. |
417 |
* |
|
|
418 |
*/ |
480 |
*/ |
419 |
void EnableLogComponents (void); |
481 |
void EnableLogComponents (void); |
420 |
|
482 |
|
|
426 |
void EnableTraces (void); |
488 |
void EnableTraces (void); |
427 |
|
489 |
|
428 |
/** |
490 |
/** |
429 |
* Enable trace sinks for PHY layer |
491 |
* Enable trace sinks for PHY layer. |
430 |
*/ |
492 |
*/ |
431 |
void EnablePhyTraces (void); |
493 |
void EnablePhyTraces (void); |
432 |
|
494 |
|
433 |
|
|
|
434 |
|
435 |
/** |
495 |
/** |
436 |
* Enable trace sinks for DL PHY layer |
496 |
* Enable trace sinks for DL PHY layer. |
437 |
*/ |
497 |
*/ |
438 |
void EnableDlPhyTraces (void); |
498 |
void EnableDlPhyTraces (void); |
439 |
|
499 |
|
440 |
/** |
500 |
/** |
441 |
* Enable trace sinks for UL PHY layer |
501 |
* Enable trace sinks for UL PHY layer. |
442 |
*/ |
502 |
*/ |
443 |
void EnableUlPhyTraces (void); |
503 |
void EnableUlPhyTraces (void); |
444 |
|
504 |
|
445 |
/** |
505 |
/** |
446 |
* Enable trace sinks for DL transmission PHY layer |
506 |
* Enable trace sinks for DL transmission PHY layer. |
447 |
*/ |
507 |
*/ |
448 |
void EnableDlTxPhyTraces (void); |
508 |
void EnableDlTxPhyTraces (void); |
449 |
|
509 |
|
450 |
/** |
510 |
/** |
451 |
* Enable trace sinks for UL transmission PHY layer |
511 |
* Enable trace sinks for UL transmission PHY layer. |
452 |
*/ |
512 |
*/ |
453 |
void EnableUlTxPhyTraces (void); |
513 |
void EnableUlTxPhyTraces (void); |
454 |
|
514 |
|
455 |
/** |
515 |
/** |
456 |
* Enable trace sinks for DL reception PHY layer |
516 |
* Enable trace sinks for DL reception PHY layer. |
457 |
*/ |
517 |
*/ |
458 |
void EnableDlRxPhyTraces (void); |
518 |
void EnableDlRxPhyTraces (void); |
459 |
|
519 |
|
460 |
/** |
520 |
/** |
461 |
* Enable trace sinks for UL reception PHY layer |
521 |
* Enable trace sinks for UL reception PHY layer. |
462 |
*/ |
522 |
*/ |
463 |
void EnableUlRxPhyTraces (void); |
523 |
void EnableUlRxPhyTraces (void); |
464 |
|
524 |
|
465 |
/** |
525 |
/** |
466 |
* Enable trace sinks for MAC layer |
526 |
* Enable trace sinks for MAC layer. |
467 |
*/ |
527 |
*/ |
468 |
void EnableMacTraces (void); |
528 |
void EnableMacTraces (void); |
469 |
|
529 |
|
470 |
/** |
530 |
/** |
471 |
* Enable trace sinks for DL MAC layer |
531 |
* Enable trace sinks for DL MAC layer. |
472 |
*/ |
532 |
*/ |
473 |
void EnableDlMacTraces (void); |
533 |
void EnableDlMacTraces (void); |
474 |
|
534 |
|
475 |
/** |
535 |
/** |
476 |
* Enable trace sinks for UL MAC layer |
536 |
* Enable trace sinks for UL MAC layer. |
477 |
*/ |
537 |
*/ |
478 |
void EnableUlMacTraces (void); |
538 |
void EnableUlMacTraces (void); |
479 |
|
539 |
|
480 |
/** |
540 |
/** |
481 |
* Enable trace sinks for RLC layer |
541 |
* Enable trace sinks for RLC layer. |
482 |
*/ |
542 |
*/ |
483 |
void EnableRlcTraces (void); |
543 |
void EnableRlcTraces (void); |
484 |
|
544 |
|
|
499 |
*/ |
559 |
*/ |
500 |
Ptr<RadioBearerStatsCalculator> GetPdcpStats (void); |
560 |
Ptr<RadioBearerStatsCalculator> GetPdcpStats (void); |
501 |
|
561 |
|
502 |
enum LteEpsBearerToRlcMapping_t {RLC_SM_ALWAYS = 1, |
|
|
503 |
RLC_UM_ALWAYS = 2, |
504 |
RLC_AM_ALWAYS = 3, |
505 |
PER_BASED = 4}; |
506 |
|
507 |
/** |
562 |
/** |
508 |
* Assign a fixed random variable stream number to the random variables |
563 |
* Assign a fixed random variable stream number to the random variables used. |
509 |
* used by this model. Return the number of streams (possibly zero) that |
564 |
* |
510 |
* have been assigned. The Install() method should have previously been |
565 |
* The InstallEnbDevice() or InstallUeDevice method should have previously |
511 |
* called by the user. |
566 |
* been called by the user on the given devices. |
512 |
* |
567 |
* |
513 |
* \param c NetDeviceContainer of the set of net devices for which the |
568 |
* If TraceFadingLossModel has been set as the fading model type, this method |
514 |
* LteNetDevice should be modified to use a fixed stream |
569 |
* will also assign a stream number to it, if none has been assigned before. |
515 |
* \param stream first stream index to use |
570 |
* |
516 |
* \return the number of stream indices assigned by this helper |
571 |
* \param c NetDeviceContainer of the set of net devices for which the |
|
|
572 |
* LteNetDevice should be modified to use a fixed stream |
573 |
* \param stream first stream index to use |
574 |
* \return the number of stream indices (possibly zero) that have been assigned |
517 |
*/ |
575 |
*/ |
518 |
int64_t AssignStreams (NetDeviceContainer c, int64_t stream); |
576 |
int64_t AssignStreams (NetDeviceContainer c, int64_t stream); |
519 |
|
577 |
|
|
523 |
|
581 |
|
524 |
private: |
582 |
private: |
525 |
/** |
583 |
/** |
526 |
* \brief Create an eNodeB device (LteEnbNetDevice) on the given node. |
584 |
* Create an eNodeB device (LteEnbNetDevice) on the given node. |
527 |
* \param n the node where the device is to be installed |
585 |
* \param n the node where the device is to be installed |
528 |
* \return pointer to the created device |
586 |
* \return pointer to the created device |
529 |
*/ |
587 |
*/ |
530 |
Ptr<NetDevice> InstallSingleEnbDevice (Ptr<Node> n); |
588 |
Ptr<NetDevice> InstallSingleEnbDevice (Ptr<Node> n); |
531 |
|
589 |
|
532 |
/** |
590 |
/** |
533 |
* \brief Create a UE device (LteUeNetDevice) on the given node. |
591 |
* Create a UE device (LteUeNetDevice) on the given node |
534 |
* \param n the node where the device is to be installed |
592 |
* \param n the node where the device is to be installed |
535 |
* \return pointer to the created device |
593 |
* \return pointer to the created device |
536 |
*/ |
594 |
*/ |
537 |
Ptr<NetDevice> InstallSingleUeDevice (Ptr<Node> n); |
595 |
Ptr<NetDevice> InstallSingleUeDevice (Ptr<Node> n); |
538 |
|
596 |
|
539 |
/** |
597 |
/** |
540 |
* \brief The actual function to trigger a manual handover. |
598 |
* The actual function to trigger a manual handover. |
541 |
* \param ueDev the UE that hands off, must be of the type LteUeNetDevice |
599 |
* \param ueDev the UE that hands off, must be of the type LteUeNetDevice |
542 |
* \param sourceEnbDev source eNB, must be of the type LteEnbNetDevice |
600 |
* \param sourceEnbDev source eNB, must be of the type LteEnbNetDevice |
543 |
* (originally the UE is attached to this eNB) |
601 |
* (originally the UE is attached to this eNB) |
544 |
* \param targetEnbDev target eNB, must be of the type LteEnbNetDevice |
602 |
* \param targetEnbDev target eNB, must be of the type LteEnbNetDevice |
545 |
* (the UE is finally connected to this eNB) |
603 |
* (the UE would be connected to this eNB after the |
|
|
604 |
* handover) |
546 |
* |
605 |
* |
547 |
* This method is normally scheduled by HandoverRequest() to run at a specific |
606 |
* This method is normally scheduled by HandoverRequest() to run at a specific |
548 |
* time where a manual handover is desired by the simulation user. |
607 |
* time where a manual handover is desired by the simulation user. |
|
551 |
Ptr<NetDevice> sourceEnbDev, |
610 |
Ptr<NetDevice> sourceEnbDev, |
552 |
Ptr<NetDevice> targetEnbDev); |
611 |
Ptr<NetDevice> targetEnbDev); |
553 |
|
612 |
|
|
|
613 |
/// The downlink LTE channel used in the simulation. |
554 |
Ptr<SpectrumChannel> m_downlinkChannel; |
614 |
Ptr<SpectrumChannel> m_downlinkChannel; |
|
|
615 |
/// The uplink LTE channel used in the simulation. |
555 |
Ptr<SpectrumChannel> m_uplinkChannel; |
616 |
Ptr<SpectrumChannel> m_uplinkChannel; |
556 |
|
617 |
/// The path loss model used in the downlink channel. |
557 |
Ptr<Object> m_downlinkPathlossModel; |
618 |
Ptr<Object> m_downlinkPathlossModel; |
|
|
619 |
/// The path loss model used in the uplink channel. |
558 |
Ptr<Object> m_uplinkPathlossModel; |
620 |
Ptr<Object> m_uplinkPathlossModel; |
559 |
|
621 |
|
|
|
622 |
/// Factory of MAC scheduler object. |
560 |
ObjectFactory m_schedulerFactory; |
623 |
ObjectFactory m_schedulerFactory; |
|
|
624 |
/// Factory of FFR (frequency reuse) algorithm object. |
561 |
ObjectFactory m_ffrAlgorithmFactory; |
625 |
ObjectFactory m_ffrAlgorithmFactory; |
|
|
626 |
/// Factory of handover algorithm object. |
562 |
ObjectFactory m_handoverAlgorithmFactory; |
627 |
ObjectFactory m_handoverAlgorithmFactory; |
563 |
ObjectFactory m_propagationModelFactory; |
628 |
/// Factory of LteEnbNetDevice objects. |
564 |
ObjectFactory m_enbNetDeviceFactory; |
629 |
ObjectFactory m_enbNetDeviceFactory; |
|
|
630 |
/// Factory of antenna object for eNodeB. |
565 |
ObjectFactory m_enbAntennaModelFactory; |
631 |
ObjectFactory m_enbAntennaModelFactory; |
|
|
632 |
/// Factory for LteUeNetDevice objects. |
566 |
ObjectFactory m_ueNetDeviceFactory; |
633 |
ObjectFactory m_ueNetDeviceFactory; |
|
|
634 |
/// Factory of antenna object for UE. |
567 |
ObjectFactory m_ueAntennaModelFactory; |
635 |
ObjectFactory m_ueAntennaModelFactory; |
568 |
|
636 |
/// Factory of path loss model object for the downlink channel. |
569 |
ObjectFactory m_dlPathlossModelFactory; |
637 |
ObjectFactory m_dlPathlossModelFactory; |
|
|
638 |
/// Factory of path loss model object for the uplink channel. |
570 |
ObjectFactory m_ulPathlossModelFactory; |
639 |
ObjectFactory m_ulPathlossModelFactory; |
571 |
|
640 |
/// Factory of both the downlink and uplink LTE channels. |
572 |
ObjectFactory m_channelFactory; |
641 |
ObjectFactory m_channelFactory; |
573 |
|
642 |
|
|
|
643 |
/// Name of fading model type, e.g., "ns3::TraceFadingLossModel". |
574 |
std::string m_fadingModelType; |
644 |
std::string m_fadingModelType; |
|
|
645 |
/// Factory of fading model object for both the downlink and uplink channels. |
575 |
ObjectFactory m_fadingModelFactory; |
646 |
ObjectFactory m_fadingModelFactory; |
|
|
647 |
/// The fading model used in both the downlink and uplink channels. |
576 |
Ptr<SpectrumPropagationLossModel> m_fadingModule; |
648 |
Ptr<SpectrumPropagationLossModel> m_fadingModule; |
|
|
649 |
/** |
650 |
* True if a random variable stream number has been assigned for the fading |
651 |
* model. Used to prevent such assignment to be done more than once. |
652 |
*/ |
577 |
bool m_fadingStreamsAssigned; |
653 |
bool m_fadingStreamsAssigned; |
578 |
|
654 |
|
|
|
655 |
/// Container of PHY layer statistics. |
579 |
Ptr<PhyStatsCalculator> m_phyStats; |
656 |
Ptr<PhyStatsCalculator> m_phyStats; |
|
|
657 |
/// Container of PHY layer statistics related to transmission. |
580 |
Ptr<PhyTxStatsCalculator> m_phyTxStats; |
658 |
Ptr<PhyTxStatsCalculator> m_phyTxStats; |
|
|
659 |
/// Container of PHY layer statistics related to reception. |
581 |
Ptr<PhyRxStatsCalculator> m_phyRxStats; |
660 |
Ptr<PhyRxStatsCalculator> m_phyRxStats; |
|
|
661 |
/// Container of MAC layer statistics. |
582 |
Ptr<MacStatsCalculator> m_macStats; |
662 |
Ptr<MacStatsCalculator> m_macStats; |
|
|
663 |
/// Container of RLC layer statistics. |
583 |
Ptr<RadioBearerStatsCalculator> m_rlcStats; |
664 |
Ptr<RadioBearerStatsCalculator> m_rlcStats; |
|
|
665 |
/// Container of PDCP layer statistics. |
584 |
Ptr<RadioBearerStatsCalculator> m_pdcpStats; |
666 |
Ptr<RadioBearerStatsCalculator> m_pdcpStats; |
|
|
667 |
/// |
585 |
RadioBearerStatsConnector m_radioBearerStatsConnector; |
668 |
RadioBearerStatsConnector m_radioBearerStatsConnector; |
586 |
|
669 |
|
|
|
670 |
/** |
671 |
* Helper which provides implementation of core network. Initially empty |
672 |
* (i.e., LTE-only simulation without any core network) and then might be |
673 |
* set using SetEpcHelper(). |
674 |
*/ |
587 |
Ptr<EpcHelper> m_epcHelper; |
675 |
Ptr<EpcHelper> m_epcHelper; |
588 |
|
676 |
|
|
|
677 |
/** |
678 |
* Keep track of the number of IMSI allocated. Increases by one every time a |
679 |
* new UE is installed (by InstallSingleUeDevice()). The first UE will have |
680 |
* an IMSI of 1. The maximum number of UE is 2^64 (~4.2e9). |
681 |
*/ |
589 |
uint64_t m_imsiCounter; |
682 |
uint64_t m_imsiCounter; |
|
|
683 |
/** |
684 |
* Keep track of the number of cell ID allocated. Increases by one every time |
685 |
* a new eNodeB is installed (by InstallSingleEnbDevice()). The first eNodeB |
686 |
* will have a cell ID of 1. The maximum number of eNodeB is 65535. |
687 |
*/ |
590 |
uint16_t m_cellIdCounter; |
688 |
uint16_t m_cellIdCounter; |
591 |
|
689 |
|
|
|
690 |
/** |
691 |
* The `UseIdealRrc` attribute. If true, LteRrcProtocolIdeal will be used for |
692 |
* RRC signaling. If false, LteRrcProtocolReal will be used. |
693 |
*/ |
592 |
bool m_useIdealRrc; |
694 |
bool m_useIdealRrc; |
|
|
695 |
/** |
696 |
* The `AnrEnabled` attribute. Activate or deactivate Automatic Neighbour |
697 |
* Relation function. |
698 |
*/ |
593 |
bool m_isAnrEnabled; |
699 |
bool m_isAnrEnabled; |
|
|
700 |
/** |
701 |
* The `UsePdschForCqiGeneration` attribute. If true, DL-CQI will be |
702 |
* calculated from PDCCH as signal and PDSCH as interference. If false, |
703 |
* DL-CQI will be calculated from PDCCH as signal and PDCCH as interference. |
704 |
*/ |
705 |
bool m_usePdschForCqiGeneration; |
594 |
|
706 |
|
595 |
bool m_usePdschForCqiGeneration; |
707 |
}; // end of `class LteHelper` |
596 |
}; |
|
|
597 |
|
708 |
|
598 |
|
709 |
|
599 |
} // namespace ns3 |
710 |
} // namespace ns3 |