23#include "ns3/simulator.h"
24#include "ns3/uinteger.h"
66 .SetGroupName(
"Wimax")
88 if (
randNr % 5 == 0 ||
GetBs()->GetNrDcdSent() == 0)
94 if (
randNr % 5 == 0 ||
GetBs()->GetNrUcdSent() == 0)
139 return GetBs()->GetNrDlSymbols() *
GetBs()->GetPhy()->GetPsPerSymbol() +
GetBs()->GetTtg();
172 std::vector<SSRecord*>*
ssRecords =
GetBs()->GetSSManager()->GetSSRecords();
186 if (
ssRecord->GetPollForRanging() &&
209 ulMapIe.SetUiuc(
GetBs()->GetBurstProfileManager()->GetBurstProfile(
215 !
ssRecord->GetAreServiceFlowsAllocated())
303 if (!
ssRecord->GetPollForRanging() &&
305 ssRecord->GetAreServiceFlowsAllocated())
311 ulMapIe.SetUiuc(
GetBs()->GetBurstProfileManager()->GetBurstProfile(
346 GetBs()->GetBandwidthManager()->SetSubframeRatio();
389 record->SetBwSinceLastExpiry(0);
425 <<
", modulation: BPSK 1/2");
495 <<
", CID: " <<
serviceFlow->GetConnection()->GetCid()
497 <<
", bw requested: " <<
record->GetRequestedBandwidth()
498 <<
", bw granted: " <<
record->GetGrantedBandwidth());
534 std::vector<SSRecord*>*
ssRecords =
GetBs()->GetSSManager()->GetSSRecords();
543 if (!
ssRecord->GetPollForRanging() &&
545 ssRecord->GetAreServiceFlowsAllocated())
550 ulMapIe.SetUiuc(
GetBs()->GetBurstProfileManager()->GetBurstProfile(
573 "\t\tUL Scheduler for CID = " << (*iter2)->GetConnection()->GetCid());
590 NS_LOG_INFO(
"\tUL Channel Saturation: totAllocSizeSymbols > availableSymbols");
617 record_[
i]->SetRequestedBandwidth(0);
639 GetBs()->GetInitialRangingInterval() &&
648 NS_LOG_DEBUG(
"BS uplink scheduler, initial ranging allocation, size: "
650 <<
", modulation: BPSK 1/2");
655 GetBs()->MarkRangingOppStart(
659 GetBs()->GetSymbolDuration().GetSeconds()));
699 serviceFlow->SetUnsolicitedGrantInterval(interval);
709 serviceFlow->SetUnsolicitedPollingInterval(interval);
This class implements the bandwidth-request mac Header as described by IEEE Standard for Local and me...
static Cid InitialRanging()
This class implements the DSA-REQ message described by "IEEE Standard for Local and metropolitan area...
This class implements the UL-MAP_IE message as described by "IEEE Standard for Local and metropolitan...
void SetCid(const Cid &cid)
Set CID.
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...
Cid GetBasicCid() const
Get basic CID.
This class implements service flows as described by the IEEE-802.16 standard.
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
this class implements a structure to manage some parameters and statistics related to a service flow
static Time Now()
Return the current simulation virtual time.
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Virtual class for uplink scheduler.
virtual void SetUcdTimeStamp(Time ucdTimeStamp)
Set UCD timestamp.
virtual void SetDcdTimeStamp(Time dcdTimeStamp)
Set DCD timestamp.
virtual void SetNrIrOppsAllocated(uint8_t nrIrOppsAllocated)
Set the number of IR opps allocated.
virtual void SetBs(Ptr< BaseStationNetDevice > bs)
Set base station device.
virtual void SetIsIrIntrvlAllocated(bool isIrIntrvlAllocated)
Set if the IR interval is allocated.
virtual uint8_t GetNrIrOppsAllocated() const
virtual void SetIsInvIrIntrvlAllocated(bool isInvIrIntrvlAllocated)
Set if the Inv IR interval is allocated.
virtual Time GetTimeStampIrInterval()
virtual Time GetDcdTimeStamp() const
virtual void SetTimeStampIrInterval(Time timeStampIrInterval)
Set timestamp IR interval.
virtual Ptr< BaseStationNetDevice > GetBs()
virtual Time GetUcdTimeStamp() const
This class implements a simple uplink scheduler for rtPS flows.
void AddUplinkAllocation(OfdmUlMapIe &ulMapIe, const uint32_t &allocationSize, uint32_t &symbolsToAllocation, uint32_t &availableSymbols) override
Add Uplink Allocation function.
void ProcessBandwidthRequest(const BandwidthRequestHeader &bwRequestHdr) override
Process bandwidth request function.
std::list< OfdmUlMapIe > m_uplinkAllocations
uplink allocations
void GetChannelDescriptorsToUpdate(bool &updateDcd, bool &updateUcd, bool &sendDcd, bool &sendUcd) override
Determines if channel descriptors sent in the current frame are required to be updated.
void AllocateInitialRangingInterval(uint32_t &symbolsToAllocation, uint32_t &availableSymbols) override
Allocate Initial Ranging Interval function.
~UplinkSchedulerRtps() override
std::list< OfdmUlMapIe > GetUplinkAllocations() const override
Get uplink allocations.
static TypeId GetTypeId()
Get the type ID.
void ServiceUnsolicitedGrants(const SSRecord *ssRecord, ServiceFlow::SchedulingType schedulingType, OfdmUlMapIe &ulMapIe, const WimaxPhy::ModulationType modulationType, uint32_t &symbolsToAllocation, uint32_t &availableSymbols) override
Service Unsolicited Grants function.
uint32_t CalculateAllocationStartTime() override
Calculate allocation start time function.
void InitOnce() override
Init once function.
void SetupServiceFlow(SSRecord *ssRecord, ServiceFlow *serviceFlow) override
Setup service flow function.
void OnSetRequestedBandwidth(ServiceFlowRecord *sfr) override
Set requested bandwidth function.
void ULSchedulerRTPSConnection(uint32_t &symbolsToAllocation, uint32_t &availableSymbols)
Uplink Scheduler for rtPS connections.
void Schedule() override
Schedule function.
void ServiceBandwidthRequests(const SSRecord *ssRecord, ServiceFlow::SchedulingType schedulingType, OfdmUlMapIe &ulMapIe, const WimaxPhy::ModulationType modulationType, uint32_t &symbolsToAllocation, uint32_t &availableSymbols) override
Service Bandwidth Requests function.
@ RANGING_STATUS_CONTINUE
ModulationType
ModulationType enumeration.
#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.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.