RTP Trace System  1.0
Coral::BandwidthManager Class Reference

Bandwidth Manager. More...

#include <bandwidthmanager.h>

Inheritance diagram for Coral::BandwidthManager:
Coral::TimedThread Coral::Thread Coral::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 (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
multimap
< ManagedStreamInterface
*, StreamDescription * > 
StreamSet
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
ostream * Log
card64 LogStartupTimeStamp
bool Changed

Detailed Description

Bandwidth Manager.

This is the bandwidth manager.

Author:
Thomas Dreibholz
Version:
1.0

Constructor & Destructor Documentation


Member Function Documentation

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

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).

Buffer flush for a given layer.

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

Force a complete remapping.

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

Get fairnes settings.

Parameters:
fairnessSessionReference to store session fairness.
fairnessStreamReference to store stream fairness.
void Coral::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 Coral::BandwidthManager::getPriorityFactor ( const int8  streamPriority) const [inline, private]
void Coral::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 Coral::BandwidthManager::getResourcePart ( const ResourceUtilizationSimplePoint rup) const [inline, private]
double Coral::BandwidthManager::getResourcePart ( const ResourceUtilizationMultiPoint rump) const [inline, private]
double Coral::BandwidthManager::getSessionSortingValue ( const ResourceUtilizationMultiPoint rump) const [inline, private]
double Coral::BandwidthManager::getStreamSortingValue ( const ResourceUtilizationSimplePoint rup) const [inline, private]
void Coral::BandwidthManager::intervalChangeEvent ( ManagedStreamInterface stream,
const bool  isNew,
const card64  when,
const bool  newRUList 
)

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.

Remove stream from management.

Parameters:
streamStream to remove.
void Coral::BandwidthManager::reportEvent ( ManagedStreamInterface stream,
const RTCPReceptionReportBlock report,
const cardinal  layer 
)

Report reception for given layer.

Parameters:
streamStream.
reportReport.
layerLayer.
void Coral::BandwidthManager::setFairness ( const double  fairnessSession,
const double  fairnessStream 
) [inline]

Set fairnes settings.

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

Set log stream.

Parameters:
logStreamStream to write log information to; NULL to disable logging.
void Coral::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 Coral::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 Coral::BandwidthManager::smoothedUpdate ( double &  value,
const double  measured,
const double  alpha 
) [inline, static, private]

Implementation of TimedThread's timerEvent() method.

See also:
TimedThread::timerEvent

Implements Coral::TimedThread.

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

Update stream.

Parameters:
streamStream to be updated.

Member Data Documentation

ostream* Coral::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