25#include "ns3/packet-burst.h"
26#include "ns3/simulator.h"
40 .SetGroupName(
"Wimax")
62 std::pair<OfdmDlMapIe*, Ptr<PacketBurst>>
pair;
66 pair.second =
nullptr;
74std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst>>>*
91 <<
", pkts: " <<
burst->GetNPackets()
92 <<
", connection: " <<
connection->GetTypeStr()
97 <<
connection->GetServiceFlow()->GetSchedulingTypeStr());
131 GetBs()->GetSSManager()->GetSSRecord(
connection->GetCid())->GetModulationType();
133 diuc =
GetBs()->GetBurstProfileManager()->GetBurstProfile(
162 if (
burst->GetNPackets() != 0)
202 burst->AddPacket(packet);
215 "BS scheduler, number of bursts: "
217 <<
"BS scheduler, queues:"
218 <<
" IR " <<
GetBs()->GetInitialRangingConnection()->GetQueue()->
GetSize()
219 <<
" broadcast " <<
GetBs()->GetBroadcastConnection()->GetQueue()->
GetSize()
236 NS_LOG_INFO(
"BS Scheduler: Selecting connection...");
237 if (
GetBs()->GetBroadcastConnection()->HasPackets())
243 else if (
GetBs()->GetInitialRangingConnection()->HasPackets())
257 if ((*iter1)->HasPackets())
268 if ((*iter1)->HasPackets())
281 << (*iter2)->HasPackets() <<
"max Latency = "
282 <<
MilliSeconds((*iter2)->GetMaximumLatency()) <<
"Delay = "
284 GetBs()->GetPhy()->GetFrameDuration()));
288 GetBs()->GetPhy()->GetFrameDuration()) >
293 NS_LOG_INFO(
"Return UGS SF: CID = " << (*iter2)->GetCid()
294 <<
"SFID = " << (*iter2)->GetSfid());
306 GetBs()->GetPhy()->GetFrameDuration()) >
311 NS_LOG_INFO(
"Return RTPS SF: CID = " << (*iter2)->GetCid()
312 <<
"SFID = " << (*iter2)->GetSfid());
322 if ((*iter2)->HasPackets())
324 NS_LOG_INFO(
"Return NRTPS SF: CID = " << (*iter2)->GetCid()
325 <<
"SFID = " << (*iter2)->GetSfid());
335 if ((*iter2)->HasPackets())
337 NS_LOG_INFO(
"Return BE SF: CID = " << (*iter2)->GetCid()
338 <<
"SFID = " << (*iter2)->GetSfid());
379 burst->AddPacket(packet);
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.
BaseStation Scheduler - simplified.
~BSSchedulerSimple() override
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 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...
std::list< std::pair< OfdmDlMapIe *, Ptr< PacketBurst > > > * m_downlinkBursts
down link bursts
static TypeId GetTypeId()
Get the type ID.
void Schedule() override
the scheduling function for the downlink subframe.
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 .
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.
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.
ModulationType
ModulationType enumeration.
@ MODULATION_TYPE_BPSK_12
#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.