22#include "ns3/simulator.h"
23#include "ns3/uinteger.h"
70 .SetGroupName(
"Wimax")
92 if (
randNr % 5 == 0 ||
GetBs()->GetNrDcdSent() == 0)
98 if (
randNr % 5 == 0 ||
GetBs()->GetNrUcdSent() == 0)
143 return GetBs()->GetNrDlSymbols() *
GetBs()->GetPhy()->GetPsPerSymbol() +
GetBs()->GetTtg();
173 std::vector<SSRecord*>*
ssRecords =
GetBs()->GetSSManager()->GetSSRecords();
186 if (
ssRecord->GetPollForRanging() &&
209 ulMapIe.SetUiuc(
GetBs()->GetBurstProfileManager()->GetBurstProfile(
215 !
ssRecord->GetAreServiceFlowsAllocated())
326 GetBs()->GetBandwidthManager()->SetSubframeRatio();
368 record->SetBwSinceLastExpiry(0);
488 GetBs()->GetInitialRangingInterval() &&
497 NS_LOG_DEBUG(
"BS uplink scheduler, initial ranging allocation, size: "
499 <<
", modulation: BPSK 1/2");
504 GetBs()->MarkRangingOppStart(
508 GetBs()->GetSymbolDuration().GetSeconds()));
548 serviceFlow->SetUnsolicitedGrantInterval(interval);
558 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...
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
Uplink Scheduler - simplified.
void SetupServiceFlow(SSRecord *ssRecord, ServiceFlow *serviceFlow) override
Setup service flow function.
void OnSetRequestedBandwidth(ServiceFlowRecord *sfr) override
Set requested bandwidth function.
void AddUplinkAllocation(OfdmUlMapIe &ulMapIe, const uint32_t &allocationSize, uint32_t &symbolsToAllocation, uint32_t &availableSymbols) override
Add uplink allocation.
uint32_t CalculateAllocationStartTime() override
std::list< OfdmUlMapIe > m_uplinkAllocations
uplink allocations
~UplinkSchedulerSimple() override
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.
std::list< OfdmUlMapIe > GetUplinkAllocations() const override
static TypeId GetTypeId()
Get the type ID.
void AllocateInitialRangingInterval(uint32_t &symbolsToAllocation, uint32_t &availableSymbols) override
Allocate Initial Ranging Interval function.
void ProcessBandwidthRequest(const BandwidthRequestHeader &bwRequestHdr) override
Process bandwidth request function.
void Schedule() override
Schedule function.
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 ServiceUnsolicitedGrants(const SSRecord *ssRecord, ServiceFlow::SchedulingType schedulingType, OfdmUlMapIe &ulMapIe, const WimaxPhy::ModulationType modulationType, uint32_t &symbolsToAllocation, uint32_t &availableSymbols) override
Service Unsolicited Grants function.
void InitOnce() override
Init once 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_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.