User Manual, Developers Guide and API Documentation

wns::scheduler::SchedulingMap Class Reference

collection of all subChannels. SmartPtr inside. More...

#include <scheduler/SchedulingMap.hpp>

Inheritance diagram for wns::scheduler::SchedulingMap:

Inheritance graph
[legend]
Collaboration diagram for wns::scheduler::SchedulingMap:

Collaboration graph
[legend]

List of all members.

Public Member Functions

bool addCompound (strategy::RequestForResource &request, MapInfoEntryPtr mapInfoEntry, wns::ldk::CompoundPtr compoundPtr, bool useHARQ)
 put scheduled compound (one after another) into the SchedulingMap
bool addCompound (int subChannelIndex, int timeSlot, int spatialLayer, simTimeType compoundDuration, wns::scheduler::ConnectionID connectionID, wns::scheduler::UserID userID, wns::scheduler::UserID sourceUserID, wns::ldk::CompoundPtr compoundPtr, wns::service::phy::phymode::PhyModeInterfacePtr phyModePtr, wns::Power txPower, wns::service::phy::ofdma::PatternPtr pattern, ChannelQualityOnOneSubChannel _estimatedCQI, bool useHARQ)
 put scheduled compound (one after another) into the SchedulingMap
void convertToMapInfoCollection (MapInfoCollectionPtr collection)
 make MapInfoCollection structure from myself
void deleteCompounds ()
 Delete all compounds from the map. But keep all other info (PhyMode, usedTime). This is called by the UL master scheduler, because there are no "real" compounds (just fakes).
virtual std::string doToString () const
 output structure (conforming to IOutputStreamable)
std::string dumpContents (const std::string &prefix) const
 output structure (machine readable table for Matlab,Gnuplot,etc)
wns::scheduler::ChannelQualityOnOneSubChannel getEstimatedCQI (wns::scheduler::UserID user) const
int getFrameNr () const
 Get the frame number for this frame.
int getFreeBitsOnSubChannel (MapInfoEntryPtr mapInfoEntry) const
 returns number of bits that fit into the SchedulingSubChannel. Depends on PhyMode provided by mapInfoEntry.
simTimeType getFreeTime () const
 total leftover time (initially numberOfSubChannels*slotLength)
simTimeType getNextPosition (int subChannel, int timeSlot, int spatialLayer) const
 get "offset for new compounds" == used time for already scheduled compounds. Zero for empty subChannel
int getNumberOfCompounds () const
int getNumberOfSpatialLayers () const
int getNumberOfSubChannels () const
int getNumberOfTimeSlots () const
wns::service::phy::phymode::PhyModeInterfacePtr getPhyModeUsedInResource (int subChannelIndex, int timeSlot, int spatialLayer) const
wns::Power getRemainingPower (wns::Power totalPower, int timeSlot) const
 total leftover power. (limitation over frequency=subChannel, but not over time)
double getResourceUsage ()
 statistics for the percentage of resources used. (correcly counts partially filled subChannels). Result is in interval [0..1]. Multiply with 100.0 for Percent. Expensive operation, iterates over all resource blocks. Please do this only once (for probing); or in dbg mode (in MESSAGE).
simTimeType getSlotLength () const
wns::Power getTxPowerUsedInResource (int subChannelIndex, int timeSlot, int spatialLayer) const
wns::Power getUsedPower (int timeSlot) const
 total used power. (count over frequency=subChannel, but not over timeslots)
simTimeType getUsedTime () const
 total used time (up to numberOfSubChannels*slotLength)
void grantFullResources ()
 extent the usage of each resource to 100% so that UL master map doesn't waste resources.
bool hasResourcesForUser (wns::scheduler::UserID user) const
 checks if there are UL resources available for given user
bool isEmpty () const
 true if there is nothing reserved(scheduled) in the whole schedulingMap.
void maskOutSubChannels (const UsableSubChannelVector &usableSubChannels)
 mask out certain subChannels (e.g. for resource partitioning)
bool pduFitsInto (strategy::RequestForResource &request, MapInfoEntryPtr mapInfoEntry) const
 true if compound can be put into the SchedulingSubChannel
void processMasterMap ()
 perform modifications to use this as MasterMap (called in uplink slave scheduler)
 SchedulingMap (simTimeType _slotLength, int _numberOfSubChannels, int _numberOfTimeSlots, int _numSpatialLayers, int _frameNr)
 construct a new empty SchedulingMap which contains a number of SchedulingSubChannel's
 SchedulingMap ()
std::string toString ()
 output structure (structured text)
void writeFile (std::string fileName) const
 output SchedulingMap structure (table file). open/append+close.
void writeToFile (std::ofstream &f, const std::string &prefix) const
 output SchedulingMap structure (table file) into already opened file.
 ~SchedulingMap ()

Static Public Member Functions

static void writeHeaderToFile (std::ofstream &f)
 output SchedulingMap table header into already opened file.

Public Attributes

SubChannelVector subChannels
 collection of all subChannels

Private Attributes

int frameNr
 index of the frame this map is for (system dependent)
int numberOfCompounds
 just counting compounds as they are inserted
int numberOfSubChannels
 size of resources in frequency-direction
int numberOfTimeSlots
 number of resource blocks in time-direction (TDMA component)
int numSpatialLayers
 size of resources in spatial direction. This can be beamforming beams (available for WiMAC) or MIMO paths (not yet available).
double resourceUsage
 result of getResourceUsage() stored for convenience and efficiency
simTimeType slotLength
 size of resources in time-direction


Detailed Description

this class contains the results over all subChannels

Definition at line 496 of file SchedulingMap.hpp.


Constructor & Destructor Documentation

wns::scheduler::SchedulingMap::SchedulingMap (  )  [inline]

Definition at line 501 of file SchedulingMap.hpp.

SchedulingMap::SchedulingMap ( simTimeType  _slotLength,
int  _numberOfSubChannels,
int  _numberOfTimeSlots,
int  _numSpatialLayers,
int  _frameNr 
)

Definition at line 1037 of file SchedulingMap.cpp.

SchedulingMap::~SchedulingMap (  ) 

Definition at line 1057 of file SchedulingMap.cpp.


Member Function Documentation

bool SchedulingMap::addCompound ( strategy::RequestForResource request,
MapInfoEntryPtr  mapInfoEntry,
wns::ldk::CompoundPtr  compoundPtr,
bool  useHARQ 
)

Parameters:
MapInfoEntryPtr contains result from doAdaptiveResourceScheduling(), but without compound contained
compoundPtr is the PDU to be put into the resource
Returns:
true if successful, false if not enough space.

Definition at line 1123 of file SchedulingMap.cpp.

bool SchedulingMap::addCompound ( int  subChannelIndex,
int  timeSlot,
int  spatialLayer,
simTimeType  compoundDuration,
wns::scheduler::ConnectionID  connectionID,
wns::scheduler::UserID  userID,
wns::scheduler::UserID  sourceUserID,
wns::ldk::CompoundPtr  compoundPtr,
wns::service::phy::phymode::PhyModeInterfacePtr  phyModePtr,
wns::Power  txPower,
wns::service::phy::ofdma::PatternPtr  pattern,
ChannelQualityOnOneSubChannel  _estimatedCQI,
bool  useHARQ 
)

Returns:
true if successful, false if not enough space.

Definition at line 1088 of file SchedulingMap.cpp.

void wns::scheduler::SchedulingMap::convertToMapInfoCollection ( MapInfoCollectionPtr  collection  ) 

void SchedulingMap::deleteCompounds (  ) 

Definition at line 1350 of file SchedulingMap.cpp.

std::string SchedulingMap::doToString (  )  const [virtual]

Implements wns::IOutputStreamable.

Definition at line 1428 of file SchedulingMap.cpp.

std::string SchedulingMap::dumpContents ( const std::string &  prefix  )  const

Definition at line 1452 of file SchedulingMap.cpp.

wns::scheduler::ChannelQualityOnOneSubChannel SchedulingMap::getEstimatedCQI ( wns::scheduler::UserID  user  )  const

Definition at line 1389 of file SchedulingMap.cpp.

int SchedulingMap::getFrameNr (  )  const

Definition at line 1167 of file SchedulingMap.cpp.

int SchedulingMap::getFreeBitsOnSubChannel ( MapInfoEntryPtr  mapInfoEntry  )  const

Definition at line 1077 of file SchedulingMap.cpp.

simTimeType SchedulingMap::getFreeTime (  )  const

Definition at line 1204 of file SchedulingMap.cpp.

simTimeType SchedulingMap::getNextPosition ( int  subChannel,
int  timeSlot,
int  spatialLayer 
) const

Definition at line 1148 of file SchedulingMap.cpp.

int wns::scheduler::SchedulingMap::getNumberOfCompounds (  )  const [inline]

Definition at line 578 of file SchedulingMap.hpp.

int wns::scheduler::SchedulingMap::getNumberOfSpatialLayers (  )  const [inline]

Definition at line 577 of file SchedulingMap.hpp.

int wns::scheduler::SchedulingMap::getNumberOfSubChannels (  )  const [inline]

Definition at line 575 of file SchedulingMap.hpp.

int wns::scheduler::SchedulingMap::getNumberOfTimeSlots (  )  const [inline]

Definition at line 576 of file SchedulingMap.hpp.

wns::service::phy::phymode::PhyModeInterfacePtr SchedulingMap::getPhyModeUsedInResource ( int  subChannelIndex,
int  timeSlot,
int  spatialLayer 
) const

Definition at line 1258 of file SchedulingMap.cpp.

wns::Power SchedulingMap::getRemainingPower ( wns::Power  totalPower,
int  timeSlot 
) const

Definition at line 1235 of file SchedulingMap.cpp.

double SchedulingMap::getResourceUsage (  ) 

Definition at line 1173 of file SchedulingMap.cpp.

simTimeType wns::scheduler::SchedulingMap::getSlotLength (  )  const [inline]

Definition at line 574 of file SchedulingMap.hpp.

wns::Power SchedulingMap::getTxPowerUsedInResource ( int  subChannelIndex,
int  timeSlot,
int  spatialLayer 
) const

Definition at line 1267 of file SchedulingMap.cpp.

wns::Power SchedulingMap::getUsedPower ( int  timeSlot  )  const

Definition at line 1216 of file SchedulingMap.cpp.

simTimeType SchedulingMap::getUsedTime (  )  const

Definition at line 1192 of file SchedulingMap.cpp.

void SchedulingMap::grantFullResources (  ) 

Definition at line 1360 of file SchedulingMap.cpp.

bool SchedulingMap::hasResourcesForUser ( wns::scheduler::UserID  user  )  const

Definition at line 1378 of file SchedulingMap.cpp.

bool SchedulingMap::isEmpty (  )  const

Definition at line 1157 of file SchedulingMap.cpp.

void SchedulingMap::maskOutSubChannels ( const UsableSubChannelVector usableSubChannels  ) 

Definition at line 1280 of file SchedulingMap.cpp.

bool SchedulingMap::pduFitsInto ( strategy::RequestForResource request,
MapInfoEntryPtr  mapInfoEntry 
) const

Definition at line 1063 of file SchedulingMap.cpp.

void SchedulingMap::processMasterMap (  ) 

Definition at line 1369 of file SchedulingMap.cpp.

std::string SchedulingMap::toString (  ) 

Definition at line 1402 of file SchedulingMap.cpp.

void SchedulingMap::writeFile ( std::string  fileName  )  const

Definition at line 1494 of file SchedulingMap.cpp.

void SchedulingMap::writeHeaderToFile ( std::ofstream &  f  )  [static]

Definition at line 1469 of file SchedulingMap.cpp.

void SchedulingMap::writeToFile ( std::ofstream &  f,
const std::string &  prefix 
) const

Definition at line 1484 of file SchedulingMap.cpp.


Member Data Documentation

Definition at line 637 of file SchedulingMap.hpp.

Definition at line 649 of file SchedulingMap.hpp.

Definition at line 641 of file SchedulingMap.hpp.

Definition at line 643 of file SchedulingMap.hpp.

Definition at line 647 of file SchedulingMap.hpp.

Definition at line 651 of file SchedulingMap.hpp.

Definition at line 639 of file SchedulingMap.hpp.

Definition at line 633 of file SchedulingMap.hpp.


The documentation for this class was generated from the following files:

Generated on Sun May 27 03:33:03 2012 for openWNS by  doxygen 1.5.5