27 #include "ns3/simulator.h"
70 uint32_t allocationSize = 0;
97 allocationSize = bs->GetBwReqOppSize ();
107 allocationSize = bs->GetBwReqOppSize ();
115 allocationSize = bs->GetBwReqOppSize ();
122 return allocationSize;
134 for (std::vector<ServiceFlow*>::iterator iter = serviceFlows.begin (); iter != serviceFlows.end (); ++iter)
144 bytesToRequest = serviceFlow->
GetQueue ()->GetQueueLengthWithMACOverhead ();
158 uint32_t bytesToRequest = 0;
161 if (!serviceFlow || !bytesToRequest)
172 bwRequestHdr.
SetBr (bytesToRequest);
187 ServiceFlow *serviceFlow = bs->GetConnectionManager ()->GetConnection (bwRequestHdr.
GetCid ())->GetServiceFlow ();
190 serviceFlow->GetRecord ()->UpdateRequestedBandwidth (bwRequestHdr.
GetBr ());
194 serviceFlow->GetRecord ()->SetRequestedBandwidth (bwRequestHdr.
GetBr ());
195 bs->GetUplinkScheduler ()->OnSetRequestedBandwidth (serviceFlow->GetRecord ());
197 bs->GetUplinkScheduler ()->ProcessBandwidthRequest (bwRequestHdr);
199 serviceFlow->GetRecord ()->IncreaseBacklogged (bwRequestHdr.
GetBr ());
209 uint32_t symbolsPerFrame = bs->GetPhy ()->GetSymbolsPerFrame ();
212 bs->SetNrDlSymbols (symbolsPerFrame / 2);
213 bs->SetNrUlSymbols (symbolsPerFrame / 2);
221 uint32_t allocationPerFrame = 0;
223 std::vector<SSRecord*> *ssRecords = bs->GetSSManager ()->GetSSRecords ();
224 for (std::vector<SSRecord*>::iterator iter1 = ssRecords->begin (); iter1 != ssRecords->end (); ++iter1)
229 allocationPerFrame += (*iter2)->GetRecord ()->GetGrantSize ();
232 return allocationPerFrame;
void SendBandwidthRequest(uint8_t uiuc, uint16_t allocationSize)
keep track of time values and allow control of global simulation resolution
smart pointer class similar to boost::intrusive_ptr
enum ServiceFlow::SchedulingType GetSchedulingType(void) const
void SetType(uint8_t type)
#define NS_LOG_COMPONENT_DEFINE(name)
Ptr< WimaxMacQueue > GetQueue(void) const
uint8_t GetType(void) const
Ptr< WimaxConnection > GetConnection(void) const
#define NS_FATAL_ERROR(msg)
fatal error handling
Ptr< WimaxNetDevice > m_device
static TypeId GetTypeId(void)
Time GetGrantTimeStamp(void) const
void SetGrantTimeStamp(Time grantTimeStamp)
Set the grant time stamp. Used for data alocation for ugs flows, and unicast poll (bw request) for no...
NS_OBJECT_ENSURE_REGISTERED(AntennaModel)
ServiceFlow * SelectFlowForRequest(uint32_t &bytesToRequest)
void ProcessBandwidthRequest(const BandwidthRequestHeader &bwRequestHdr)
bool GetHasServiceFlowUgs(void) const
bool GetPollMeBit(void) const
this class implements the bandwidth-request mac Header as described by IEEE Standard for Local and me...
BandwidthManager(Ptr< WimaxNetDevice > device)
ServiceFlowRecord * GetRecord(void) const
#define NS_ASSERT_MSG(condition, message)
uint32_t GetBr(void) const
void SetSubframeRatio(void)
uint32_t GetGrantSize(void) const
uint32_t GetSymbolsPerFrameAllocated(void)
uint16_t GetUnsolicitedGrantInterval(void) const
This class is used by the base station to store some information related to subscriber station in the...
a base class which provides memory management and object aggregation
uint32_t CalculateAllocationSize(const SSRecord *ssRecord, const ServiceFlow *serviceFlow)
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
void AddHeader(const Header &header)
uint16_t GetUnsolicitedPollingInterval(void) const
bool HasPackets(void) const