26#include "ns3/packet-burst.h"
27#include "ns3/simulator.h"
41 .SetGroupName(
"Wimax")
63 std::pair<OfdmDlMapIe*, Ptr<PacketBurst>>
pair;
67 pair.second =
nullptr;
76std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst>>>*
93 <<
", pkts: " <<
burst->GetNPackets()
94 <<
", connection: " <<
connection->GetTypeStr()
99 <<
connection->GetServiceFlow()->GetSchedulingTypeStr());
144 "BS scheduler, number of bursts: "
146 <<
"BS scheduler, queues:"
147 <<
" IR " <<
GetBs()->GetInitialRangingConnection()->GetQueue()->
GetSize()
148 <<
" broadcast " <<
GetBs()->GetBroadcastConnection()->GetQueue()->
GetSize()
190 burst->AddPacket(packet);
241 "Base station: Error while scheduling broadcast connection: header CID != "
243 burst->AddPacket(packet);
246 if (
burst->GetNPackets() != 0)
289 "Base station: Error while scheduling initial ranging connection: header CID "
290 "!= connection CID");
291 burst->AddPacket(packet);
294 if (
burst->GetNPackets())
321 GetBs()->GetSSManager()->GetSSRecord(
connection->GetCid())->GetModulationType();
322 diuc =
GetBs()->GetBurstProfileManager()->GetBurstProfile(
348 "Base station: Error while scheduling basic connection: header CID != "
350 burst->AddPacket(packet);
353 if (
burst->GetNPackets() != 0)
382 GetBs()->GetSSManager()->GetSSRecord(
connection->GetCid())->GetModulationType();
383 diuc =
GetBs()->GetBurstProfileManager()->GetBurstProfile(
409 "Base station: Error while scheduling primary connection: header CID != "
411 burst->AddPacket(packet);
414 if (
burst->GetNPackets() != 0)
443 if ((*iter)->HasPackets() &&
445 GetBs()->GetPhy()->GetFrameDuration()) >
MilliSeconds((*iter)->GetMaximumLatency()))
455 GetBs()->GetSSManager()->GetSSRecord(
connection->GetCid())->GetModulationType();
457 diuc =
GetBs()->GetBurstProfileManager()->GetBurstProfile(
469 if (
burst->GetNPackets() != 0)
513 if ((*iter2)->HasPackets())
529 ->GetModulationType();
537 <<
"\n\t\t\t dataToSend = "
553 NS_LOG_INFO(
"\tDL Channel Saturation: totSymbolsRequired > availableSymbols_rtPS");
607 "Base station: Error while scheduling RTPs connection: header CID != "
609 burst->AddPacket(packet);
612 if (
burst->GetNPackets() != 0)
648 GetBs()->GetSSManager()->GetSSRecord(
connection->GetCid())->GetModulationType();
651 diuc =
GetBs()->GetBurstProfileManager()->GetBurstProfile(
665 "Base station: Error while scheduling NRTPs connection: header CID != "
667 burst->AddPacket(packet);
670 if (
burst->GetNPackets() != 0)
705 GetBs()->GetSSManager()->GetSSRecord(
connection->GetCid())->GetModulationType();
707 diuc =
GetBs()->GetBurstProfileManager()->GetBurstProfile(
722 "Base station: Error while scheduling BE connection: header CID != connection CID");
723 burst->AddPacket(packet);
726 if (
burst->GetNPackets() != 0)
virtual Ptr< BaseStationNetDevice > GetBs()
Get the base station.
virtual void SetBs(Ptr< BaseStationNetDevice > bs)
Set the base station.
bool CheckForFragmentation(Ptr< WimaxConnection > connection, int availableSymbols, WimaxPhy::ModulationType modulationType)
Check if the packet fragmentation is possible for transport connection.
This class implements a simple downlink scheduler for rtPS flows.
static TypeId GetTypeId()
Get the type ID.
void Schedule() override
Schedule function.
void BSSchedulerPrimaryConnection(uint32_t &availableSymbols)
schedules the primary connection
std::list< std::pair< OfdmDlMapIe *, Ptr< PacketBurst > > > * GetDownlinkBursts() const override
This function returns all the downlink bursts scheduled for the next downlink sub-frame.
void BSSchedulerUGSConnection(uint32_t &availableSymbols)
schedules the UGS connection
void BSSchedulerBEConnection(uint32_t &availableSymbols)
schedules the BE connection
void BSSchedulerBasicConnection(uint32_t &availableSymbols)
schedules the basic connections
void AddDownlinkBurst(Ptr< const WimaxConnection > connection, uint8_t diuc, WimaxPhy::ModulationType modulationType, Ptr< PacketBurst > burst) override
This function adds a downlink burst to the list of downlink bursts scheduled for the next downlink su...
~BSSchedulerRtps() override
void BSSchedulerInitialRangingConnection(uint32_t &availableSymbols)
schedules the IR connections
void BSSchedulerRTPSConnection(uint32_t &availableSymbols)
Downlink Scheduler for rtPS connections.
void BSSchedulerBroadcastConnection(uint32_t &availableSymbols)
schedules the broadcast connections
void BSSchedulerNRTPSConnection(uint32_t &availableSymbols)
schedules the NRTPS connections
Ptr< PacketBurst > CreateUgsBurst(ServiceFlow *serviceFlow, WimaxPhy::ModulationType modulationType, uint32_t availableSymbols) override
Creates a downlink UGS burst.
bool SelectConnection(Ptr< WimaxConnection > &connection) override
Selects a connection from the list of connections having packets to be sent .
std::list< std::pair< OfdmDlMapIe *, Ptr< PacketBurst > > > * m_downlinkBursts
down link bursts
This class implements the OFDM DL-MAP information element as described by "IEEE Standard for Local an...
this class implement a burst as a list of packets
Smart pointer class similar to boost::intrusive_ptr.
This class implements service flows as described by the IEEE-802.16 standard.
this class implements a structure to manage some parameters and statistics related to a service flow
uint32_t GetGrantSize() const
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.
ModulationType
ModulationType enumeration.
@ MODULATION_TYPE_BPSK_12
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#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 MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t GetSize(Ptr< const Packet > packet, const WifiMacHeader *hdr, bool isAmpdu)
Return the total size of the packet after WifiMacHeader and FCS trailer have been added.