5G-LENA nr-v3.3-159-ga6832aa7
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
bwp-manager-algorithm.h
1// Copyright (c) 2018 Natale Patriciello <natale.patriciello@gmail.com>
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#ifndef BWPMANAGERALGORITHM_H
6#define BWPMANAGERALGORITHM_H
7
8#include "nr-eps-bearer.h"
9
10#include "ns3/object.h"
11
12namespace ns3
13{
14
37class BwpManagerAlgorithm : public Object
38{
39 public:
44 static TypeId GetTypeId();
45
53 ~BwpManagerAlgorithm() override = default;
59 virtual uint8_t GetBwpForEpsBearer(const NrEpsBearer::Qci& v) const = 0;
60};
61
69{
70 public:
75 static TypeId GetTypeId();
76
84 ~BwpManagerAlgorithmStatic() override = default;
85
86 // inherited
87 uint8_t GetBwpForEpsBearer(const NrEpsBearer::Qci& v) const override;
88
93 void SetConvVoiceBwp(uint8_t bwpIndex)
94 {
95 m_qciToBwpMap[NrEpsBearer::GBR_CONV_VOICE] = bwpIndex;
96 }
97
102 uint8_t GetConvVoiceBwp() const
103 {
104 return m_qciToBwpMap.at(NrEpsBearer::GBR_CONV_VOICE);
105 }
106
111 void SetConvVideoBwp(uint8_t bwpIndex)
112 {
113 m_qciToBwpMap[NrEpsBearer::GBR_CONV_VIDEO] = bwpIndex;
114 }
115
120 uint8_t GetConvVideoBwp() const
121 {
122 return m_qciToBwpMap.at(NrEpsBearer::GBR_CONV_VIDEO);
123 }
124
129 void SetGamingBwp(uint8_t bwpIndex)
130 {
131 m_qciToBwpMap[NrEpsBearer::GBR_GAMING] = bwpIndex;
132 }
133
138 uint8_t GetGamingBwp() const
139 {
140 return m_qciToBwpMap.at(NrEpsBearer::GBR_GAMING);
141 }
142
147 void SetNonConvVideoBwp(uint8_t bwpIndex)
148 {
149 m_qciToBwpMap[NrEpsBearer::GBR_NON_CONV_VIDEO] = bwpIndex;
150 }
151
156 uint8_t GetNonConvVideoBwp() const
157 {
158 return m_qciToBwpMap.at(NrEpsBearer::GBR_NON_CONV_VIDEO);
159 }
160
165 void SetMcPttBwp(uint8_t bwpIndex)
166 {
167 m_qciToBwpMap[NrEpsBearer::GBR_MC_PUSH_TO_TALK] = bwpIndex;
168 }
169
174 uint8_t GetMcPttBwp() const
175 {
176 return m_qciToBwpMap.at(NrEpsBearer::GBR_MC_PUSH_TO_TALK);
177 }
178
183 void SetNmcPttBwp(uint8_t bwpIndex)
184 {
185 m_qciToBwpMap[NrEpsBearer::GBR_NMC_PUSH_TO_TALK] = bwpIndex;
186 }
187
192 uint8_t GetNmcPttBwp() const
193 {
194 return m_qciToBwpMap.at(NrEpsBearer::GBR_NMC_PUSH_TO_TALK);
195 }
196
201 void SetMcVideoBwp(uint8_t bwpIndex)
202 {
203 m_qciToBwpMap[NrEpsBearer::GBR_MC_VIDEO] = bwpIndex;
204 }
205
210 uint8_t GetMcVideoBwp() const
211 {
212 return m_qciToBwpMap.at(NrEpsBearer::GBR_MC_VIDEO);
213 }
214
219 void SetGbrV2xBwp(uint8_t bwpIndex)
220 {
221 m_qciToBwpMap[NrEpsBearer::GBR_V2X] = bwpIndex;
222 }
223
228 uint8_t GetGbrV2xBwp() const
229 {
230 return m_qciToBwpMap.at(NrEpsBearer::GBR_V2X);
231 }
232
237 void SetImsBwp(uint8_t bwpIndex)
238 {
239 m_qciToBwpMap[NrEpsBearer::NGBR_IMS] = bwpIndex;
240 }
241
246 uint8_t GetImsBwp() const
247 {
248 return m_qciToBwpMap.at(NrEpsBearer::NGBR_IMS);
249 }
250
255 void SetVideoTcpOpBwp(uint8_t bwpIndex)
256 {
257 m_qciToBwpMap[NrEpsBearer::NGBR_VIDEO_TCP_OPERATOR] = bwpIndex;
258 }
259
264 uint8_t GetVideoTcpOpBwp() const
265 {
266 return m_qciToBwpMap.at(NrEpsBearer::NGBR_VIDEO_TCP_OPERATOR);
267 }
268
273 void SetVideoGamingBwp(uint8_t bwpIndex)
274 {
275 m_qciToBwpMap[NrEpsBearer::NGBR_VOICE_VIDEO_GAMING] = bwpIndex;
276 }
277
282 uint8_t GetVideoGamingBwp() const
283 {
284 return m_qciToBwpMap.at(NrEpsBearer::NGBR_VOICE_VIDEO_GAMING);
285 }
286
291 void SetVideoTcpPremiumBwp(uint8_t bwpIndex)
292 {
293 m_qciToBwpMap[NrEpsBearer::NGBR_VIDEO_TCP_PREMIUM] = bwpIndex;
294 }
295
300 uint8_t GetVideoTcpPremiumBwp() const
301 {
302 return m_qciToBwpMap.at(NrEpsBearer::NGBR_VIDEO_TCP_PREMIUM);
303 }
304
309 void SetVideoTcpDefaultBwp(uint8_t bwpIndex)
310 {
311 m_qciToBwpMap[NrEpsBearer::NGBR_VIDEO_TCP_DEFAULT] = bwpIndex;
312 }
313
318 uint8_t GetVideoTcpDefaultBwp() const
319 {
320 return m_qciToBwpMap.at(NrEpsBearer::NGBR_VIDEO_TCP_DEFAULT);
321 }
322
327 void SetMcDelaySignalBwp(uint8_t bwpIndex)
328 {
329 m_qciToBwpMap[NrEpsBearer::NGBR_MC_DELAY_SIGNAL] = bwpIndex;
330 }
331
336 uint8_t GetMcDelaySignalBwp() const
337 {
338 return m_qciToBwpMap.at(NrEpsBearer::NGBR_MC_DELAY_SIGNAL);
339 }
340
345 void SetMcDataBwp(uint8_t bwpIndex)
346 {
347 m_qciToBwpMap[NrEpsBearer::NGBR_MC_DATA] = bwpIndex;
348 }
349
354 uint8_t GetMcDataBwp() const
355 {
356 return m_qciToBwpMap.at(NrEpsBearer::NGBR_MC_DATA);
357 }
358
363 void SetNgbrV2xBwp(uint8_t bwpIndex)
364 {
365 m_qciToBwpMap[NrEpsBearer::NGBR_V2X] = bwpIndex;
366 }
367
372 uint8_t GetNgbrV2xBwp() const
373 {
374 return m_qciToBwpMap.at(NrEpsBearer::NGBR_V2X);
375 }
376
381 void SetLowLatEmbbBwp(uint8_t bwpIndex)
382 {
383 m_qciToBwpMap[NrEpsBearer::NGBR_LOW_LAT_EMBB] = bwpIndex;
384 }
385
390 uint8_t GetLowLatEmbbBwp() const
391 {
392 return m_qciToBwpMap.at(NrEpsBearer::NGBR_LOW_LAT_EMBB);
393 }
394
399 void SetDiscreteAutSmallBwp(uint8_t bwpIndex)
400 {
401 m_qciToBwpMap[NrEpsBearer::DGBR_DISCRETE_AUT_SMALL] = bwpIndex;
402 }
403
409 {
410 return m_qciToBwpMap.at(NrEpsBearer::DGBR_DISCRETE_AUT_SMALL);
411 }
412
417 void SetDiscreteAutLargeBwp(uint8_t bwpIndex)
418 {
419 m_qciToBwpMap[NrEpsBearer::DGBR_DISCRETE_AUT_LARGE] = bwpIndex;
420 }
421
427 {
428 return m_qciToBwpMap.at(NrEpsBearer::DGBR_DISCRETE_AUT_LARGE);
429 }
430
435 void SetItsBwp(uint8_t bwpIndex)
436 {
437 m_qciToBwpMap[NrEpsBearer::DGBR_ITS] = bwpIndex;
438 }
439
444 uint8_t GetItsBwp() const
445 {
446 return m_qciToBwpMap.at(NrEpsBearer::DGBR_ITS);
447 }
448
453 void SetElectricityBwp(uint8_t bwpIndex)
454 {
455 m_qciToBwpMap[NrEpsBearer::DGBR_ELECTRICITY] = bwpIndex;
456 }
457
462 uint8_t GetElectricityBwp() const
463 {
464 return m_qciToBwpMap.at(NrEpsBearer::DGBR_ELECTRICITY);
465 }
466
471 void SetLiveUlStream71Bwp(uint8_t bwpIndex)
472 {
473 m_qciToBwpMap[NrEpsBearer::GBR_LIVE_UL_71] = bwpIndex;
474 }
475
480 uint8_t GetLiveUlStream71Bwp() const
481 {
482 return m_qciToBwpMap.at(NrEpsBearer::GBR_LIVE_UL_71);
483 }
484
489 void SetLiveUlStream72Bwp(uint8_t bwpIndex)
490 {
491 m_qciToBwpMap[NrEpsBearer::GBR_LIVE_UL_72] = bwpIndex;
492 }
493
498 uint8_t GetLiveUlStream72Bwp() const
499 {
500 return m_qciToBwpMap.at(NrEpsBearer::GBR_LIVE_UL_72);
501 }
502
507 void SetLiveUlStream73Bwp(uint8_t bwpIndex)
508 {
509 m_qciToBwpMap[NrEpsBearer::GBR_LIVE_UL_73] = bwpIndex;
510 }
511
516 uint8_t GetLiveUlStream73Bwp() const
517 {
518 return m_qciToBwpMap.at(NrEpsBearer::GBR_LIVE_UL_73);
519 }
520
525 void SetLiveUlStream74Bwp(uint8_t bwpIndex)
526 {
527 m_qciToBwpMap[NrEpsBearer::GBR_LIVE_UL_74] = bwpIndex;
528 }
529
534 uint8_t GetLiveUlStream74Bwp() const
535 {
536 return m_qciToBwpMap.at(NrEpsBearer::GBR_LIVE_UL_74);
537 }
538
543 void SetLiveUlStream76Bwp(uint8_t bwpIndex)
544 {
545 m_qciToBwpMap[NrEpsBearer::GBR_LIVE_UL_76] = bwpIndex;
546 }
547
552 uint8_t GetLiveUlStream76Bwp() const
553 {
554 return m_qciToBwpMap.at(NrEpsBearer::GBR_LIVE_UL_76);
555 }
556
561 void SetInterService87Bwp(uint8_t bwpIndex)
562 {
563 m_qciToBwpMap[NrEpsBearer::DGBR_INTER_SERV_87] = bwpIndex;
564 }
565
570 uint8_t GetInterService87Bwp() const
571 {
572 return m_qciToBwpMap.at(NrEpsBearer::DGBR_INTER_SERV_87);
573 }
574
579 void SetInterService88Bwp(uint8_t bwpIndex)
580 {
581 m_qciToBwpMap[NrEpsBearer::DGBR_INTER_SERV_88] = bwpIndex;
582 }
583
588 uint8_t GetInterService88Bwp() const
589 {
590 return m_qciToBwpMap.at(NrEpsBearer::DGBR_INTER_SERV_88);
591 }
592
597 void SetVisualContent89Bwp(uint8_t bwpIndex)
598 {
599 m_qciToBwpMap[NrEpsBearer::DGBR_VISUAL_CONTENT_89] = bwpIndex;
600 }
601
606 uint8_t GetVisualContent89Bwp() const
607 {
608 return m_qciToBwpMap.at(NrEpsBearer::DGBR_VISUAL_CONTENT_89);
609 }
610
615 void SetVisualContent90Bwp(uint8_t bwpIndex)
616 {
617 m_qciToBwpMap[NrEpsBearer::DGBR_VISUAL_CONTENT_90] = bwpIndex;
618 }
619
624 uint8_t GetVisualContent90Bwp() const
625 {
626 return m_qciToBwpMap.at(NrEpsBearer::DGBR_VISUAL_CONTENT_90);
627 }
628
629 private:
633 std::unordered_map<uint8_t, uint8_t> m_qciToBwpMap;
634};
635
636} // namespace ns3
637#endif // BWPMANAGERALGORITHM_H
Interface for a Bwp selection algorithm based on the bearer.
virtual uint8_t GetBwpForEpsBearer(const NrEpsBearer::Qci &v) const =0
Get the bandwidth part id for the Qci specified.
static TypeId GetTypeId()
GetTypeId.
BwpManagerAlgorithm()=default
constructor
~BwpManagerAlgorithm() override=default
The BwpManagerAlgorithmStatic class.
void SetLiveUlStream73Bwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
void SetInterService88Bwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
void SetNgbrV2xBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
void SetNmcPttBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
void SetMcPttBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
void SetVideoTcpDefaultBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
void SetGbrV2xBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
uint8_t GetLiveUlStream72Bwp() const
Get the BWP index of the QCI in the function name.
void SetLiveUlStream72Bwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
uint8_t GetVideoTcpPremiumBwp() const
Get the BWP index of the QCI in the function name.
void SetVisualContent90Bwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
uint8_t GetVisualContent89Bwp() const
Get the BWP index of the QCI in the function name.
void SetImsBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
uint8_t GetMcPttBwp() const
Get the BWP index of the QCI in the function name.
uint8_t GetLiveUlStream74Bwp() const
Get the BWP index of the QCI in the function name.
uint8_t GetVideoGamingBwp() const
Get the BWP index of the QCI in the function name.
uint8_t GetNonConvVideoBwp() const
Get the BWP index of the QCI in the function name.
void SetLiveUlStream76Bwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
uint8_t GetDiscreteAutSmallBwp() const
Get the BWP index of the QCI in the function name.
uint8_t GetImsBwp() const
Get the BWP index of the QCI in the function name.
uint8_t GetVideoTcpDefaultBwp() const
Get the BWP index of the QCI in the function name.
BwpManagerAlgorithmStatic()=default
constructor
uint8_t GetNmcPttBwp() const
Get the BWP index of the QCI in the function name.
void SetLowLatEmbbBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
void SetLiveUlStream71Bwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
uint8_t GetLiveUlStream71Bwp() const
Get the BWP index of the QCI in the function name.
uint8_t GetVideoTcpOpBwp() const
Get the BWP index of the QCI in the function name.
uint8_t GetLowLatEmbbBwp() const
Get the BWP index of the QCI in the function name.
uint8_t GetInterService87Bwp() const
Get the BWP index of the QCI in the function name.
void SetDiscreteAutLargeBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
uint8_t GetNgbrV2xBwp() const
Get the BWP index of the QCI in the function name.
uint8_t GetItsBwp() const
Get the BWP index of the QCI in the function name.
void SetVideoTcpPremiumBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
uint8_t GetInterService88Bwp() const
Get the BWP index of the QCI in the function name.
uint8_t GetElectricityBwp() const
Get the BWP index of the QCI in the function name.
void SetMcDelaySignalBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
uint8_t GetLiveUlStream73Bwp() const
Get the BWP index of the QCI in the function name.
void SetVisualContent89Bwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
uint8_t GetLiveUlStream76Bwp() const
Get the BWP index of the QCI in the function name.
uint8_t GetVisualContent90Bwp() const
Get the BWP index of the QCI in the function name.
void SetLiveUlStream74Bwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
void SetInterService87Bwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
uint8_t GetDiscreteAutLargeBwp() const
Get the BWP index of the QCI in the function name.
void SetElectricityBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
void SetItsBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
uint8_t GetMcDataBwp() const
Get the BWP index of the QCI in the function name.
void SetMcDataBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
void SetConvVoiceBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
uint8_t GetMcVideoBwp() const
Get the BWP index of the QCI in the function name.
static TypeId GetTypeId()
GetTypeId.
uint8_t GetConvVoiceBwp() const
Get the BWP index of the QCI in the function name.
uint8_t GetGbrV2xBwp() const
Get the BWP index of the QCI in the function name.
uint8_t GetConvVideoBwp() const
Get the BWP index of the QCI in the function name.
void SetMcVideoBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
~BwpManagerAlgorithmStatic() override=default
deconstructor
uint8_t GetGamingBwp() const
Get the BWP index of the QCI in the function name.
void SetVideoGamingBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
void SetGamingBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
void SetConvVideoBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
uint8_t GetBwpForEpsBearer(const NrEpsBearer::Qci &v) const override
Get the bandwidth part id for the Qci specified.
void SetDiscreteAutSmallBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
void SetNonConvVideoBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
void SetVideoTcpOpBwp(uint8_t bwpIndex)
Set BWP index of the QCI in the function name.
uint8_t GetMcDelaySignalBwp() const
Get the BWP index of the QCI in the function name.
@ NGBR_LOW_LAT_EMBB
Non-GBR Low Latency eMBB applications.
@ DGBR_VISUAL_CONTENT_89
Delay-Critical GBR Visual Content for cloud/edge/split rendering (TS 23.501)
@ GBR_V2X
GBR V2X Messages.
@ NGBR_V2X
Non-GBR V2X Messages.
@ GBR_NMC_PUSH_TO_TALK
GBR Non-Mission-Critical User Plane Push To Talk voice.
@ GBR_LIVE_UL_71
GBR Live UL streaming.
@ NGBR_MC_DELAY_SIGNAL
Non-GBR Mission Critical Delay Sensitive Signalling (e.g., MC-PTT)
@ DGBR_DISCRETE_AUT_SMALL
Delay-Critical GBR Discrete Automation Small Packets (TS 22.261)
@ GBR_CONV_VOICE
GBR Conversational Voice.
@ NGBR_VOICE_VIDEO_GAMING
Non-GBR Voice, Video, Interactive Streaming.
@ GBR_LIVE_UL_76
GBR Live UL streaming.
@ NGBR_VIDEO_TCP_OPERATOR
Non-GBR TCP-based Video (Buffered Streaming, e.g., www, e-mail...)
@ GBR_GAMING
GBR Real Time Gaming.
@ GBR_CONV_VIDEO
GBR Conversational Video (Live streaming)
@ GBR_LIVE_UL_72
GBR Live UL streaming.
@ DGBR_INTER_SERV_88
Delay-Critical GBR Interactive Service - Motion tracking data (TS 23.501)
@ NGBR_VIDEO_TCP_DEFAULT
Non-GBR TCP-based Video (Buffered Streaming, e.g., www, e-mail...)
@ DGBR_VISUAL_CONTENT_90
Delay-Critical GBR Visual Content for cloud/edge/split rendering (TS 23.501)
@ DGBR_ITS
Delay-Critical GBR Intelligent Transport Systems (TS 22.261)
@ NGBR_IMS
Non-GBR IMS Signalling.
@ NGBR_MC_DATA
Non-GBR Mission Critical Data.
@ GBR_MC_VIDEO
GBR Mission Critical Video User Plane.
@ DGBR_INTER_SERV_87
Delay-Critical GBR Interactive Service - Motion tracking data (TS 23.501)
@ NGBR_VIDEO_TCP_PREMIUM
Non-GBR TCP-based Video (Buffered Streaming, e.g., www, e-mail...)
@ GBR_LIVE_UL_74
GBR Live UL streaming.
@ GBR_LIVE_UL_73
GBR Live UL streaming.
@ DGBR_ELECTRICITY
Delay-Critical GBR Electricity Distribution High Voltage (TS 22.261)
@ DGBR_DISCRETE_AUT_LARGE
Delay-Critical GBR Discrete Automation Large Packets (TS 22.261)
@ GBR_MC_PUSH_TO_TALK
GBR Mission Critical User Plane Push To Talk voice.
@ GBR_NON_CONV_VIDEO
GBR Non-Conversational Video (Buffered Streaming)