RTP Audio System  2.0.0
BandwidthManager Class Reference

Bandwidth Manager. More...

#include <bandwidthmanager.h>

Inheritance diagram for BandwidthManager:
QoSManagerInterface TimedThread MultiTimerThread< Timers > Thread Synchronizable

List of all members.

Public Member Functions

 BandwidthManager (ServiceLevelAgreement *sla, RoundTripTimePinger *rttp)
 ~BandwidthManager ()
void addStream (ManagedStreamInterface *stream, const cardinal sessionID=0, const char *name=NULL)
void removeStream (ManagedStreamInterface *stream)
void updateStream (ManagedStreamInterface *stream)
void forceCompleteRemapping ()
void intervalChangeEvent (ManagedStreamInterface *stream, const bool isNew, const card64 when, const bool newRUList)
void reportEvent (ManagedStreamInterface *stream, const RTCPReceptionReportBlock *report, const cardinal layer)
void bufferFlushEvent (ManagedStreamInterface *stream, const cardinal layer)
void timerEvent ()
void setLogStream (std::ostream *logStream)
void getPartialRemapping (bool &enabled, double &reservedPortion, double &utilizationTolerance, double &maxRemappingInterval) const
void setPartialRemapping (const bool enabled, const double reservedPortion, const double utilizationTolerance, const double maxRemappingInterval)
void getFairness (double &fairnessSession, double &fairnessStream) const
void setFairness (const double fairnessSession, const double fairnessStream)
void getQoSOptimizationParameters (cardinal &maxRUPoints, double &utilizationThreshold, card64 &bandwidthThreshold, double &systemDelayTolerance, bool &unlayeredAllocation) const
void setQoSOptimizationParameters (const cardinal maxRUPoints, const double utilizationThreshold, const card64 bandwidthThreshold, const double systemDelayTolerance, const bool unlayeredAllocation)
void updateReservation (StreamDescription *streamDescription)

Public Attributes

card64 TotalAvailableBandwidth
card64 ClassAvailableBandwidthArray [TrafficClassValues::MaxValues]
card64 TotalBandwidth
card64 ClassBandwidthArray [TrafficClassValues::MaxValues]
int64 SLAUpdateRecommendation [TrafficClassValues::MaxValues]
card64 StreamIDGenerator
card64 LastCompleteRemapping
card64 LastCompleteRemappingDuration
cardinal CompleteRemappings
cardinal PartialRemappings
cardinal TotalBufferFlushes
std::multimap
< ManagedStreamInterface
*, StreamDescription * > 
StreamSet
std::multimap< cardinal,
SessionDescription * > 
SessionSet
ServiceLevelAgreementSLA
cardinal Streams
cardinal Sessions
cardinal MaxRUPoints
double UtilizationThreshold
card64 BandwidthThreshold
double SystemDelayTolerance
double FairnessSession
double FairnessStream
double AlphaLossRate
double AlphaJitter
double PartialRemappingPortion
double PartialRemappingUtilizationTolerance
card64 MaxRemappingInterval
bool EnablePartialRemappings
bool UnlayeredAllocation

Static Public Attributes

static card64 SimulatorTime = 0

Private Member Functions

cardinal calculateSessionMultiPoints (SessionDescription *session, const cardinal offset, const cardinal lastPoint, ResourceUtilizationMultiPoint *rumpList)
void getRoundTripTimes (StreamDescription *sd)
double getPriorityFactor (const int8 streamPriority) const
double getResourcePart (const ResourceUtilizationSimplePoint &rup) const
double getResourcePart (const ResourceUtilizationMultiPoint &rump) const
double getStreamSortingValue (const ResourceUtilizationSimplePoint &rup) const
double getSessionSortingValue (const ResourceUtilizationMultiPoint &rump) const
bool tryAllocation (ResourceUtilizationMultiPoint &rump, const card64 bandwidthLimit=(card64)-1)
void doAllocationTrials (ResourceUtilizationMultiPoint *rumpList, const cardinal points, const card64 bandwidthLimit=(card64)-1)
bool doPartialRemapping (StreamDescription *streamDescription)
void doCompleteRemapping ()

Static Private Member Functions

static void smoothedUpdate (double &value, const double measured, const double alpha)

Private Attributes

RoundTripTimePingerRTTP
std::ostream * Log
card64 LogStartupTimeStamp
bool Changed

Detailed Description

Bandwidth Manager.

This is the bandwidth manager.

Author:
Thomas Dreibholz
Version:
1.0

Constructor & Destructor Documentation

Constructor.

Parameters:
slaServiceLevelAgreement object.
rttpRoundTripTimePinger object.

Member Function Documentation

void BandwidthManager::addStream ( ManagedStreamInterface stream,
const cardinal  sessionID = 0,
const char *  name = NULL 
) [virtual]

Add stream to management.

Parameters:
streamStream to add.
sessionSessionID of session to add stream to (0 for no session).
nameStream name (only for log printing).

Implements QoSManagerInterface.

void BandwidthManager::bufferFlushEvent ( ManagedStreamInterface stream,
const cardinal  layer 
) [virtual]

Buffer flush for a given layer.

Parameters:
streamStream.

Implements QoSManagerInterface.

cardinal BandwidthManager::calculateSessionMultiPoints ( SessionDescription session,
const cardinal  offset,
const cardinal  lastPoint,
ResourceUtilizationMultiPoint rumpList 
) [private]
void BandwidthManager::doAllocationTrials ( ResourceUtilizationMultiPoint rumpList,
const cardinal  points,
const card64  bandwidthLimit = (card64)-1 
) [private]
bool BandwidthManager::doPartialRemapping ( StreamDescription streamDescription) [private]

Force a complete remapping.

void BandwidthManager::getFairness ( double &  fairnessSession,
double &  fairnessStream 
) const [inline]

Get fairnes settings.

Parameters:
fairnessSessionReference to store session fairness.
fairnessStreamReference to store stream fairness.
void BandwidthManager::getPartialRemapping ( bool &  enabled,
double &  reservedPortion,
double &  utilizationTolerance,
double &  maxRemappingInterval 
) const [inline]

Get partial remapping parameters.

Parameters:
enabledReference to store true, if partial remappings are enabled; false otherwise.
reservedPortionReference to store reserved bandwidth portion (out of [0,1]).
utilizationToleranceReference to store utilization tolerance for partial remapping.
maxRemappingIntervalReference to store maximum interval between two complete remappings.
double BandwidthManager::getPriorityFactor ( const int8  streamPriority) const [inline, private]
void BandwidthManager::getQoSOptimizationParameters ( cardinal maxRUPoints,
double &  utilizationThreshold,
card64 bandwidthThreshold,
double &  systemDelayTolerance,
bool &  unlayeredAllocation 
) const [inline]

Get QoS optimization parameters.

Parameters:
maxRUPointsReference to store maximum number of RU points per stream.
utilizationThresholdReference to store utilization threshold.
bandwidthThresholdReference to store bandwidth threshold.
systemDelayToleranceReference to store the system's delay tolerance for the buffering optimization.
double BandwidthManager::getResourcePart ( const ResourceUtilizationSimplePoint rup) const [inline, private]
double BandwidthManager::getResourcePart ( const ResourceUtilizationMultiPoint rump) const [inline, private]
double BandwidthManager::getSessionSortingValue ( const ResourceUtilizationMultiPoint rump) const [inline, private]
double BandwidthManager::getStreamSortingValue ( const ResourceUtilizationSimplePoint rup) const [inline, private]
void BandwidthManager::intervalChangeEvent ( ManagedStreamInterface stream,
const bool  isNew,
const card64  when,
const bool  newRUList 
) [virtual]

Interval has changed.

Parameters:
streamStream with changed interval.
isNewtrue, if new interval has been reached; false otherwise.
whenMicroseconds to next interval.
newRUListtrue, if new resource/utiliztion list has been reached; false otherwise.

Implements QoSManagerInterface.

Remove stream from management.

Parameters:
streamStream to remove.

Implements QoSManagerInterface.

void BandwidthManager::reportEvent ( ManagedStreamInterface stream,
const RTCPReceptionReportBlock report,
const cardinal  layer 
) [virtual]

Report reception for given layer.

Parameters:
streamStream.
reportReport.
layerLayer.

Implements QoSManagerInterface.

void BandwidthManager::setFairness ( const double  fairnessSession,
const double  fairnessStream 
) [inline]

Set fairnes settings.

Parameters:
fairnessSessionSession fairness.
fairnessStreamStream fairness.
void BandwidthManager::setLogStream ( std::ostream *  logStream)

Set log stream.

Parameters:
logStreamStream to write log information to; NULL to disable logging.
void BandwidthManager::setPartialRemapping ( const bool  enabled,
const double  reservedPortion,
const double  utilizationTolerance,
const double  maxRemappingInterval 
) [inline]

Set partial remapping parameters.

Parameters:
enabledtrue, if partial remappings are enabled; false otherwise.
reservedPortionReserved bandwidth portion (out of [0,1]).
utilizationToleranceUtilization tolerance for partial remapping.
maxRemappingIntervalMaximum interval between two complete remappings.
void BandwidthManager::setQoSOptimizationParameters ( const cardinal  maxRUPoints,
const double  utilizationThreshold,
const card64  bandwidthThreshold,
const double  systemDelayTolerance,
const bool  unlayeredAllocation 
) [inline]

Set QoS optimization parameters.

Parameters:
maxRUPointsMaximum number of RU points per stream.
utilizationThresholdUtilization threshold.
bandwidthThresholdBandwidth threshold.
systemDelayToleranceThe system's delay tolerance for the buffering optimization.
static void BandwidthManager::smoothedUpdate ( double &  value,
const double  measured,
const double  alpha 
) [inline, static, private]
void BandwidthManager::timerEvent ( ) [virtual]

Implementation of TimedThread's timerEvent() method.

See also:
TimedThread::timerEvent

Implements TimedThread.

bool BandwidthManager::tryAllocation ( ResourceUtilizationMultiPoint rump,
const card64  bandwidthLimit = (card64)-1 
) [private]

Update stream.

Parameters:
streamStream to be updated.

Implements QoSManagerInterface.


Member Data Documentation

bool BandwidthManager::Changed [private]
std::ostream* BandwidthManager::Log [private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines