A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
bs-uplink-scheduler-rtps.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007,2008 INRIA
3 * 2009 TELEMATICS LAB, Politecnico di Bari
4 *
5 * SPDX-License-Identifier: GPL-2.0-only
6 *
7 * Author: Giuseppe Piro <g.piro@poliba.it>
8 */
9
11
12#include "bandwidth-manager.h"
13#include "bs-link-manager.h"
14#include "bs-net-device.h"
16#include "cid.h"
17#include "service-flow-record.h"
18#include "service-flow.h"
19#include "ss-manager.h"
20#include "ss-record.h"
21
22#include "ns3/log.h"
23#include "ns3/simulator.h"
24#include "ns3/uinteger.h"
25
26namespace ns3
27{
28
29NS_LOG_COMPONENT_DEFINE("UplinkSchedulerRtps");
30
31NS_OBJECT_ENSURE_REGISTERED(UplinkSchedulerRtps);
32
43
54
60
63{
64 static TypeId tid = TypeId("ns3::UplinkSchedulerRtps")
66 .SetGroupName("Wimax")
67 .AddConstructor<UplinkSchedulerRtps>();
68 return tid;
69}
70
71std::list<OfdmUlMapIe>
76
77void
79 bool& updateUcd,
80 bool& sendDcd,
81 bool& sendUcd)
82{
83 /*DCD and UCD shall actually be updated when channel or burst profile definitions
84 change. burst profiles are updated based on number of SSs, network conditions and etc.
85 for now temporarily assuming DCD/UCD shall be updated every time */
86
87 uint32_t randNr = rand();
88 if (randNr % 5 == 0 || GetBs()->GetNrDcdSent() == 0)
89 {
90 sendDcd = true;
91 }
92
93 randNr = rand();
94 if (randNr % 5 == 0 || GetBs()->GetNrUcdSent() == 0)
95 {
96 sendUcd = true;
97 }
98
99 // -------------------------------------
100 // additional, just to send more frequently
101 if (!sendDcd)
102 {
103 randNr = rand();
104 if (randNr % 4 == 0)
105 {
106 sendDcd = true;
107 }
108 }
109
110 if (!sendUcd)
111 {
112 randNr = rand();
113 if (randNr % 4 == 0)
114 {
115 sendUcd = true;
116 }
117 }
118 // -------------------------------------
119
120 Time timeSinceLastDcd = Simulator::Now() - GetDcdTimeStamp();
121 Time timeSinceLastUcd = Simulator::Now() - GetUcdTimeStamp();
122
123 if (timeSinceLastDcd > GetBs()->GetDcdInterval())
124 {
125 sendDcd = true;
127 }
128
129 if (timeSinceLastUcd > GetBs()->GetUcdInterval())
130 {
131 sendUcd = true;
133 }
134}
135
138{
139 return GetBs()->GetNrDlSymbols() * GetBs()->GetPhy()->GetPsPerSymbol() + GetBs()->GetTtg();
140}
141
142void
144 const uint32_t& allocationSize,
145 uint32_t& symbolsToAllocation,
146 uint32_t& availableSymbols)
147{
148 ulMapIe.SetDuration(allocationSize);
149 ulMapIe.SetStartTime(symbolsToAllocation);
150 m_uplinkAllocations.push_back(ulMapIe);
151 symbolsToAllocation += allocationSize;
152 availableSymbols -= allocationSize;
153}
154
155void
157{
158 m_uplinkAllocations.clear();
161 bool allocationForDsa = false;
162
163 uint32_t symbolsToAllocation = 0;
164 uint32_t allocationSize = 0; // size in symbols
165 uint32_t availableSymbols = GetBs()->GetNrUlSymbols();
166
167 WimaxPhy::ModulationType modulationType;
168 Cid cid;
169
170 AllocateInitialRangingInterval(symbolsToAllocation, availableSymbols);
171
172 std::vector<SSRecord*>* ssRecords = GetBs()->GetSSManager()->GetSSRecords();
173 NS_LOG_INFO("UL Scheduler start, availableSymbols = " << availableSymbols);
174
175 for (auto iter = ssRecords->begin(); iter != ssRecords->end(); ++iter)
176 {
177 SSRecord* ssRecord = *iter;
178 if (ssRecord->GetIsBroadcastSS())
179 {
180 continue;
181 }
182 cid = ssRecord->GetBasicCid();
183 OfdmUlMapIe ulMapIe;
184 ulMapIe.SetCid(cid);
185
186 if (ssRecord->GetPollForRanging() &&
188 {
189 // SS's ranging is not yet complete
190 // allocating invited initial ranging interval
192 allocationSize = GetBs()->GetRangReqOppSize();
194
195 if (availableSymbols >= allocationSize)
196 {
197 AddUplinkAllocation(ulMapIe, allocationSize, symbolsToAllocation, availableSymbols);
198 }
199 else
200 {
201 break;
202 }
203 }
204 else
205 {
206 modulationType = ssRecord->GetModulationType();
207
208 // need to update because modulation/FEC to UIUC mapping may vary over time
209 ulMapIe.SetUiuc(GetBs()->GetBurstProfileManager()->GetBurstProfile(
210 modulationType,
212
213 // establish service flows for SS
215 !ssRecord->GetAreServiceFlowsAllocated())
216 {
217 // allocating grant (with arbitrary size) to allow SS to send DSA messages DSA-REQ
218 // and DSA-ACK only one DSA allocation per frame
219 if (!allocationForDsa)
220 {
221 allocationSize =
222 GetBs()->GetPhy()->GetNrSymbols(sizeof(DsaReq), modulationType);
223 if (availableSymbols >= allocationSize)
224 {
225 AddUplinkAllocation(ulMapIe,
226 allocationSize,
227 symbolsToAllocation,
228 availableSymbols);
229 allocationForDsa = true;
230 }
231 else
232 {
233 break;
234 }
235 }
236 }
237 else
238 {
239 // all service flows associated to SS are established now
240
241 /*allocating grants for data transmission for UGS flows (Data Grant Burst Type
242 IEs, 6.3.7.4.3.3) (grant has been referred by different names e.g. transmission
243 opportunity, slot, uplink allocation, etc)*/
246 ulMapIe,
247 modulationType,
248 symbolsToAllocation,
249 availableSymbols);
250
251 // allocate unicast polls for rtPS flows if bandwidth is available
252 if (availableSymbols)
253 {
256 ulMapIe,
257 modulationType,
258 symbolsToAllocation,
259 availableSymbols);
260 }
261 // allocate unicast polls for nrtPS flows if bandwidth is available
262 if (availableSymbols)
263 {
266 ulMapIe,
267 modulationType,
268 symbolsToAllocation,
269 availableSymbols);
270 }
271 // finally allocate unicast polls for BE flows if bandwidth is available
272 if (availableSymbols)
273 {
276 ulMapIe,
277 modulationType,
278 symbolsToAllocation,
279 availableSymbols);
280 }
281 }
282 }
283 }
284
285 /*
286 * Uplink Scheduler for rtPS Connection
287 */
288 if (availableSymbols)
289 {
290 ULSchedulerRTPSConnection(symbolsToAllocation, availableSymbols);
291 }
292
293 // UL Scheduler for nrtPS and BE flows
294 if (availableSymbols)
295 {
296 for (auto iter = ssRecords->begin(); iter != ssRecords->end(); ++iter)
297 {
298 SSRecord* ssRecord = *iter;
299 if (ssRecord->GetIsBroadcastSS())
300 {
301 continue;
302 }
303 if (!ssRecord->GetPollForRanging() &&
305 ssRecord->GetAreServiceFlowsAllocated())
306 {
307 OfdmUlMapIe ulMapIe;
308 cid = ssRecord->GetBasicCid();
309 ulMapIe.SetCid(cid);
310 modulationType = ssRecord->GetModulationType();
311 ulMapIe.SetUiuc(GetBs()->GetBurstProfileManager()->GetBurstProfile(
312 modulationType,
314
315 // allocate unicast polls for nrtPS flows if bandwidth is available
316
319 ulMapIe,
320 modulationType,
321 symbolsToAllocation,
322 availableSymbols);
323
324 // finally allocate unicast polls for BE flows if bandwidth is available
325 if (availableSymbols)
326 {
329 ulMapIe,
330 modulationType,
331 symbolsToAllocation,
332 availableSymbols);
333 }
334 }
335 }
336 }
337
338 OfdmUlMapIe ulMapIeEnd;
339 ulMapIeEnd.SetCid(Cid::InitialRanging());
340 ulMapIeEnd.SetStartTime(symbolsToAllocation);
342 ulMapIeEnd.SetDuration(0);
343 m_uplinkAllocations.push_back(ulMapIeEnd);
344
345 // setting DL/UL subframe allocation for the next frame
346 GetBs()->GetBandwidthManager()->SetSubframeRatio();
347}
348
349void
351 ServiceFlow::SchedulingType schedulingType,
352 OfdmUlMapIe& ulMapIe,
353 const WimaxPhy::ModulationType modulationType,
354 uint32_t& symbolsToAllocation,
355 uint32_t& availableSymbols)
356{
357 uint32_t allocationSize = 0; // size in symbols
358 uint8_t uiuc = ulMapIe.GetUiuc(); // SS's burst profile
359 std::vector<ServiceFlow*> serviceFlows = ssRecord->GetServiceFlows(schedulingType);
360
361 for (auto iter = serviceFlows.begin(); iter != serviceFlows.end(); ++iter)
362 {
363 ServiceFlow* serviceFlow = *iter;
364
365 /* in case of rtPS, nrtPS and BE, allocating unicast polls for bandwidth requests (Request
366 IEs, 6.3.7.4.3.1). in case of UGS, allocating grants for data transmission (Data Grant
367 Burst Type IEs, 6.3.7.4.3.3) (grant has been referred in this code by different names e.g.
368 transmission opportunity, slot, allocation, etc) */
369
370 allocationSize =
371 GetBs()->GetBandwidthManager()->CalculateAllocationSize(ssRecord, serviceFlow);
372
373 // verifying that minimum reserved traffic rate of nrtPS flow is maintained
374 if (serviceFlow->GetSchedulingType() == ServiceFlow::SF_TYPE_NRTPS)
375 {
376 Time currentTime = Simulator::Now();
377 ServiceFlowRecord* record = serviceFlow->GetRecord();
378 if (currentTime - record->GetGrantTimeStamp() > Seconds(1))
379 {
380 uint32_t bps = (record->GetBwSinceLastExpiry() * 8);
381 if (bps < serviceFlow->GetMinReservedTrafficRate())
382 {
383 ServiceBandwidthRequests(serviceFlow,
384 schedulingType,
385 ulMapIe,
386 modulationType,
387 symbolsToAllocation,
388 availableSymbols);
389 record->SetBwSinceLastExpiry(0);
390 record->SetGrantTimeStamp(currentTime);
391 }
392 }
393 }
394
395 if (availableSymbols < allocationSize)
396 {
397 break;
398 }
399
400 if (allocationSize > 0)
401 {
402 ulMapIe.SetStartTime(symbolsToAllocation);
403 if (serviceFlow->GetSchedulingType() != ServiceFlow::SF_TYPE_UGS)
404 {
405 // special burst profile with most robust modulation type is used for unicast polls
406 // (Request IEs)
408 }
409 }
410 else
411 {
412 continue;
413 }
414
415 if (serviceFlow->GetSchedulingType() == ServiceFlow::SF_TYPE_UGS)
416 {
417 NS_LOG_DEBUG("BS uplink scheduler, UGS allocation, size: " << allocationSize
418 << " symbols");
419 }
420 else
421 {
422 NS_LOG_DEBUG("BS uplink scheduler, " << serviceFlow->GetSchedulingTypeStr()
423 << " unicast poll, size: " << allocationSize
424 << " symbols, modulation: BPSK 1/2");
425 }
426
427 NS_LOG_DEBUG(", CID: " << serviceFlow->GetConnection()->GetCid()
428 << ", SFID: " << serviceFlow->GetSfid());
429
430 AddUplinkAllocation(ulMapIe, allocationSize, symbolsToAllocation, availableSymbols);
431 ulMapIe.SetUiuc(uiuc);
432 }
433}
434
435void
437 ServiceFlow::SchedulingType schedulingType,
438 OfdmUlMapIe& ulMapIe,
439 const WimaxPhy::ModulationType modulationType,
440 uint32_t& symbolsToAllocation,
441 uint32_t& availableSymbols)
442{
443 std::vector<ServiceFlow*> serviceFlows = ssRecord->GetServiceFlows(schedulingType);
444
445 for (auto iter = serviceFlows.begin(); iter != serviceFlows.end(); ++iter)
446 {
447 if (!ServiceBandwidthRequests(*iter,
448 schedulingType,
449 ulMapIe,
450 modulationType,
451 symbolsToAllocation,
452 availableSymbols))
453 {
454 break;
455 }
456 }
457}
458
459bool
461 ServiceFlow::SchedulingType schedulingType,
462 OfdmUlMapIe& ulMapIe,
463 const WimaxPhy::ModulationType modulationType,
464 uint32_t& symbolsToAllocation,
465 uint32_t& availableSymbols)
466{
467 uint32_t allocSizeBytes = 0;
468 uint32_t allocSizeSymbols = 0;
469 uint16_t sduSize = 0;
470
471 ServiceFlowRecord* record = serviceFlow->GetRecord();
472 sduSize = serviceFlow->GetSduSize();
473
474 uint32_t requiredBandwidth = record->GetRequestedBandwidth() - record->GetGrantedBandwidth();
475 if (requiredBandwidth > 0)
476 {
477 if (sduSize > 0)
478 {
479 // if SDU size is mentioned, allocate grant of that size
480 allocSizeBytes = sduSize;
481 allocSizeSymbols = GetBs()->GetPhy()->GetNrSymbols(sduSize, modulationType);
482 }
483 else
484 {
485 allocSizeBytes = requiredBandwidth;
486 allocSizeSymbols = GetBs()->GetPhy()->GetNrSymbols(requiredBandwidth, modulationType);
487 }
488
489 if (availableSymbols >= allocSizeSymbols)
490 {
491 NS_LOG_DEBUG("BS uplink scheduler, "
492 << serviceFlow->GetSchedulingTypeStr()
493 << " allocation, size: " << allocSizeSymbols << " symbols"
494 << ", CID: " << serviceFlow->GetConnection()->GetCid()
495 << ", SFID: " << serviceFlow->GetSfid()
496 << ", bw requested: " << record->GetRequestedBandwidth()
497 << ", bw granted: " << record->GetGrantedBandwidth());
498
499 record->UpdateGrantedBandwidth(allocSizeBytes);
500
501 if (schedulingType == ServiceFlow::SF_TYPE_NRTPS)
502 {
503 record->SetBwSinceLastExpiry(allocSizeBytes);
504 }
505
506 AddUplinkAllocation(ulMapIe, allocSizeSymbols, symbolsToAllocation, availableSymbols);
507 }
508 else
509 {
510 return false;
511 }
512 }
513 return true;
514}
515
516void
518 uint32_t& availableSymbols)
519{
520 NS_LOG_INFO("\tUL Scheduler for rtPS flows");
521 NS_LOG_INFO("\t\tavailableSymbols = " << availableSymbols);
522 ServiceFlowRecord* record_[100];
523 uint32_t allocSizeSymbols_[100]; // symbolsRequired for each SSRecord
524 OfdmUlMapIe ulMapIe_[100];
525 OfdmUlMapIe ulMapIe;
526 WimaxPhy::ModulationType modulationType_[100];
527 WimaxPhy::ModulationType modulationType;
528 int nbAllocation = 0;
529 uint32_t allocSizeBytes;
530 uint32_t totAllocSizeSymbols = 0;
531
532 Cid cid;
533 std::vector<SSRecord*>* ssRecords = GetBs()->GetSSManager()->GetSSRecords();
534
535 for (auto iter = ssRecords->begin(); iter != ssRecords->end(); ++iter)
536 {
537 SSRecord* ssRecord = *iter;
538 if (ssRecord->GetIsBroadcastSS())
539 {
540 continue;
541 }
542 if (!ssRecord->GetPollForRanging() &&
544 ssRecord->GetAreServiceFlowsAllocated())
545 {
546 cid = ssRecord->GetBasicCid();
547 ulMapIe.SetCid(cid);
548 modulationType = ssRecord->GetModulationType();
549 ulMapIe.SetUiuc(GetBs()->GetBurstProfileManager()->GetBurstProfile(
550 modulationType,
552
553 std::vector<ServiceFlow*> serviceFlows =
555 for (auto iter2 = serviceFlows.begin(); iter2 != serviceFlows.end(); ++iter2)
556 {
557 record_[nbAllocation] = (*iter2)->GetRecord();
558 uint32_t requiredBandwidth = record_[nbAllocation]->GetRequestedBandwidth() -
559 record_[nbAllocation]->GetGrantedBandwidth();
560
561 if (requiredBandwidth > 0)
562 {
563 modulationType_[nbAllocation] = modulationType;
564 ulMapIe_[nbAllocation] = ulMapIe;
565 allocSizeBytes = requiredBandwidth;
566 allocSizeSymbols_[nbAllocation] =
567 GetBs()->GetPhy()->GetNrSymbols(allocSizeBytes,
568 modulationType_[nbAllocation]);
569 totAllocSizeSymbols += allocSizeSymbols_[nbAllocation];
570
572 "\t\tUL Scheduler for CID = " << (*iter2)->GetConnection()->GetCid());
573 NS_LOG_INFO("\t\t\trequiredBandwidth = "
574 << record_[nbAllocation]->GetRequestedBandwidth()
575 << ", allocSizeSymbols = " << allocSizeSymbols_[nbAllocation]
576 << ", modulationType = " << modulationType_[nbAllocation]);
577
578 nbAllocation += 1;
579 }
580 }
581 }
582 }
583
584 NS_LOG_INFO("\t\ttotAllocSizeSymbols = " << totAllocSizeSymbols);
585
586 // Channel Saturation
587 while (totAllocSizeSymbols > availableSymbols)
588 {
589 NS_LOG_INFO("\tUL Channel Saturation: totAllocSizeSymbols > availableSymbols");
590 double delta = double(availableSymbols) / double(totAllocSizeSymbols);
591 NS_LOG_INFO("\t\tdelta = " << delta);
592 totAllocSizeSymbols = 0;
593 for (int i = 0; i < nbAllocation; i++)
594 {
595 NS_LOG_INFO("\t\tprevious allocSizeSymbols_[" << i << "] = " << allocSizeSymbols_[i]);
596 allocSizeSymbols_[i] = (uint32_t)std::floor(allocSizeSymbols_[i] * delta);
597 totAllocSizeSymbols += allocSizeSymbols_[i];
598 NS_LOG_INFO("\t\tnew allocSizeSymbols_[" << i << "] = " << allocSizeSymbols_[i]);
599 }
600 NS_LOG_INFO("\t\ttotAllocSizeSymbols = " << totAllocSizeSymbols);
601 }
602
603 // Uplink Bandwidth Allocation
604 for (int i = 0; i < nbAllocation; i++)
605 {
606 AddUplinkAllocation(ulMapIe_[i],
607 allocSizeSymbols_[i],
608 symbolsToAllocation,
609 availableSymbols);
610 allocSizeBytes = GetBs()->GetPhy()->GetNrBytes(allocSizeSymbols_[i], modulationType_[i]);
611 NS_LOG_INFO("\t\tUpdateGrantedBandwidth for " << i << " = " << allocSizeBytes);
612 if (record_[i]->GetRequestedBandwidth() < allocSizeBytes)
613 {
614 // the flow need new poll to set the newer requiredBandwidth
615 record_[i]->SetGrantedBandwidth(0);
616 record_[i]->SetRequestedBandwidth(0);
617 }
618 else
619 {
620 record_[i]->UpdateGrantedBandwidth(allocSizeBytes);
621 }
622 }
623}
624
625void
627 uint32_t& availableSymbols)
628{
629 Time ssUlStartTime =
630 Seconds(CalculateAllocationStartTime() * GetBs()->GetPsDuration().GetSeconds());
631 SetNrIrOppsAllocated(GetBs()->GetLinkManager()->CalculateRangingOppsToAllocate());
632 uint32_t allocationSize = GetNrIrOppsAllocated() * GetBs()->GetRangReqOppSize();
633 Time timeSinceLastIrInterval = Simulator::Now() - GetTimeStampIrInterval();
634
635 // adding one frame because may be the time has not elapsed now but will elapse before the next
636 // frame is sent
637 if (timeSinceLastIrInterval + GetBs()->GetPhy()->GetFrameDuration() >
638 GetBs()->GetInitialRangingInterval() &&
639 availableSymbols >= allocationSize)
640 {
642 OfdmUlMapIe ulMapIeIr;
643 ulMapIeIr.SetCid(GetBs()->GetBroadcastConnection()->GetCid());
644 ulMapIeIr.SetStartTime(symbolsToAllocation);
646
647 NS_LOG_DEBUG("BS uplink scheduler, initial ranging allocation, size: "
648 << allocationSize << " symbols, modulation: BPSK 1/2");
649
650 // marking start and end of each TO, only for debugging
651 for (uint8_t i = 0; i < GetNrIrOppsAllocated(); i++)
652 {
653 GetBs()->MarkRangingOppStart(
654 ssUlStartTime +
655 Seconds(symbolsToAllocation * GetBs()->GetSymbolDuration().GetSeconds()) +
656 Seconds(i * GetBs()->GetRangReqOppSize() *
657 GetBs()->GetSymbolDuration().GetSeconds()));
658 }
659
660 AddUplinkAllocation(ulMapIeIr, allocationSize, symbolsToAllocation, availableSymbols);
662 }
663}
664
665void
667{
668 uint8_t delayNrFrames = 1;
669 uint32_t bitsPerSecond = serviceFlow->GetMinReservedTrafficRate();
670 WimaxPhy::ModulationType modulation;
671 uint32_t bytesPerFrame =
672 (uint32_t((double)(bitsPerSecond)*GetBs()->GetPhy()->GetFrameDuration().GetSeconds())) / 8;
673 uint32_t frameDurationMSec = GetBs()->GetPhy()->GetFrameDuration().GetMilliSeconds();
674
675 switch (serviceFlow->GetSchedulingType())
676 {
678 if (serviceFlow->GetIsMulticast())
679 {
680 modulation = serviceFlow->GetModulation();
681 }
682 else
683 {
684 modulation = ssRecord->GetModulationType();
685 }
686 uint32_t grantSize = GetBs()->GetPhy()->GetNrSymbols(bytesPerFrame, modulation);
687 serviceFlow->GetRecord()->SetGrantSize(grantSize);
688
689 uint32_t toleratedJitter = serviceFlow->GetToleratedJitter();
690
691 if (toleratedJitter > frameDurationMSec)
692 {
693 delayNrFrames = (uint8_t)(toleratedJitter / frameDurationMSec);
694 }
695
696 uint16_t interval = delayNrFrames * frameDurationMSec;
697 serviceFlow->SetUnsolicitedGrantInterval(interval);
698 }
699 break;
701 if (serviceFlow->GetSduSize() > bytesPerFrame)
702 {
703 delayNrFrames = (uint8_t)(serviceFlow->GetSduSize() / bytesPerFrame);
704 }
705
706 uint16_t interval = delayNrFrames * frameDurationMSec;
707 serviceFlow->SetUnsolicitedPollingInterval(interval);
708 }
709 break;
711 // no real-time guarantees are given to NRTPS, serviced based on available bandwidth
713 // no real-time guarantees are given to BE, serviced based on available bandwidth
714 break;
715 default:
716 NS_FATAL_ERROR("Invalid scheduling type");
717 }
718}
719
720void
724
725void
729
730void
732{
733 // m_grantedBandwidth must be reset to zero
734 uint32_t grantedBandwidth = 0;
735 sfr->SetGrantedBandwidth(grantedBandwidth);
736}
737
738} // namespace ns3
This class implements the bandwidth-request mac Header as described by IEEE Standard for Local and me...
Cid class.
Definition cid.h:26
static Cid InitialRanging()
Definition cid.cc:76
This class implements the DSA-REQ message described by "IEEE Standard forLocal and metropolitan area ...
This class implements the UL-MAP_IE message as described by "IEEE Standard forLocal and metropolitan ...
void SetStartTime(uint16_t startTime)
Set start time.
uint8_t GetUiuc() const
Get UIUC.
void SetDuration(uint16_t duration)
Set duration.
void SetCid(const Cid &cid)
Set CID.
void SetUiuc(uint8_t uiuc)
Set UIUC.
Smart pointer class similar to boost::intrusive_ptr.
This class is used by the base station to store some information related to subscriber station in the...
Definition ss-record.h:35
Cid GetBasicCid() const
Get basic CID.
Definition ss-record.cc:84
WimaxNetDevice::RangingStatus GetRangingStatus() const
Get ranging status.
Definition ss-record.cc:168
bool GetPollForRanging() const
Get poll for ranging.
Definition ss-record.cc:186
std::vector< ServiceFlow * > GetServiceFlows(ServiceFlow::SchedulingType schedulingType) const
Get service flows.
Definition ss-record.cc:222
bool GetAreServiceFlowsAllocated() const
Check if service flows are allocated.
Definition ss-record.cc:198
bool GetIsBroadcastSS() const
Get is broadcast SS.
Definition ss-record.cc:243
WimaxPhy::ModulationType GetModulationType() const
Get modulation type.
Definition ss-record.cc:156
This class implements service flows as described by the IEEE-802.16 standard.
uint32_t GetSfid() const
Get SFID.
ServiceFlow::SchedulingType GetSchedulingType() const
Get scheduling type.
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
char * GetSchedulingTypeStr() const
Get scheduling type string.
uint32_t GetMinReservedTrafficRate() const
Get minimum reserved traffic rate.
uint8_t GetSduSize() const
Get SDU size.
WimaxPhy::ModulationType GetModulation() const
Get modulation.
void SetUnsolicitedGrantInterval(uint16_t unsolicitedGrantInterval)
Set unsolicited grant interval.
ServiceFlowRecord * GetRecord() const
Get service flow record.
void SetUnsolicitedPollingInterval(uint16_t unsolicitedPollingInterval)
Set unsolicited polling interval.
bool GetIsMulticast() const
Get is multicast.
uint32_t GetToleratedJitter() const
Get tolerated jitter.
Ptr< WimaxConnection > GetConnection() const
Can return a null connection is this service flow has not been associated yet to a connection.
this class implements a structure to manage some parameters and statistics related to a service flow
uint32_t GetRequestedBandwidth() const
void SetRequestedBandwidth(uint32_t requestedBandwidth)
set the requested bandwidth
void SetGrantSize(uint32_t grantSize)
Set the grant size (only for UGS service flows)
uint32_t GetGrantedBandwidth() const
void SetBwSinceLastExpiry(uint32_t bwSinceLastExpiry)
set BW since last expiry
void UpdateGrantedBandwidth(uint32_t grantedBandwidth)
update the granted bandwidth
uint32_t GetBwSinceLastExpiry() const
void SetGrantTimeStamp(Time grantTimeStamp)
Set the grant time stamp.
void SetGrantedBandwidth(uint32_t grantedBandwidth)
set the granted bandwidth
static Time Now()
Return the current simulation virtual time.
Definition simulator.cc:197
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
a unique identifier for an interface.
Definition type-id.h:49
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1001
ModulationType
ModulationType enumeration.
Definition wimax-phy.h:43
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition log.h:257
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition log.h:264
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition object-base.h:35
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1345
Every class exported by the ns3 library is enclosed in the ns3 namespace.