RTP Trace System  1.0
Coral::AbstractLayerDescription Class Reference

Abstract Layer Description. More...

#include <abstractlayerdescription.h>

Inheritance diagram for Coral::AbstractLayerDescription:
Coral::FrameSizeScalabilityInterface Coral::TraceLayerDescription

List of all members.

Public Types

enum  LayerFlags { LF_BaseLayer = 0, LF_ExtensionLayer = (1 << 0) }

Public Member Functions

 AbstractLayerDescription ()
virtual ~AbstractLayerDescription ()
void initLayer (const cardinal pktHeaderSize, const cardinal pktMaxSize, const double maxTransferDelay, const cardinal maxBufferDelay, const double maxLossRate, const double maxJitter, const cardinal flags)
card64 getBandwidth () const
bool setBandwidth (const double frameRate, const card64 bandwidth)
virtual cardinal getPacketRate (const double frameRate) const
card64 bandwidthToBandwidth (const card64 bandwidth, const double frameRate, const cardinal bufferDelay, const cardinal newBufferDelay) const
card64 payloadBandwidthToBandwidth (const card64 bandwidth, const double frameRate, const cardinal bufferDelay, const cardinal newBufferDelay) const
virtual cardinal frameSizeToPacketRate (const double frameRate, const cardinal frameSize) const
double getMaxTransferDelay () const
void setMaxTransferDelay (const double maxDelay)
double getMaxLossRate () const
void setMaxLossRate (const double maxLossRate)
double getMaxJitter () const
void setMaxJitter (const double maxJitter)
bool isValidFrameSize (const double frameRate, const cardinal bufferDelay, const cardinal size) const
cardinal getNearestValidFrameSize (const double frameRate, const cardinal bufferDelay, const cardinal size) const
virtual cardinal payloadToRaw (const double frameRate, const cardinal payload, const cardinal bufferDelay) const
virtual cardinal rawToPayload (const double frameRate, const cardinal raw, const cardinal bufferDelay) const
cardinal getMinFrameSize (const double frameRate) const
cardinal getMaxFrameSize (const double frameRate) const
cardinal getPeakFrameSizeForSize (const double frameRate, const cardinal frameSize) const
cardinal getPacketCountForSize (const double frameRate, const cardinal frameSize) const
double getPrevFrameSizeForSize (const double frameRate, const cardinal frameSize) const
double getNextFrameSizeForSize (const double frameRate, const cardinal frameSize) const
double getFrameSizeScaleFactorForSize (const double frameRate, const cardinal frameSize) const
double getFrameSizeUtilizationForSize (const double frameRate, const cardinal frameSize) const
cardinal getMinFrameSizeForDelay (const double frameRate, const cardinal bufferDelay) const
cardinal getMaxFrameSizeForDelay (const double frameRate, const cardinal bufferDelay) const
cardinal getPeakFrameSizeForDelayAndSize (const double frameRate, const cardinal bufferDelay, const cardinal frameSize) const
cardinal getPacketCountForDelayAndSize (const double frameRate, const cardinal bufferDelay, const cardinal frameSize) const
double getPrevFrameSizeForDelayAndSize (const double frameRate, const cardinal bufferDelay, const cardinal frameSize) const
double getNextFrameSizeForDelayAndSize (const double frameRate, const cardinal bufferDelay, const cardinal frameSize) const
double getFrameSizeScaleFactorForDelayAndSize (const double frameRate, const cardinal bufferDelay, const cardinal frameSize) const
double getFrameSizeUtilizationForDelayAndSize (const double frameRate, const cardinal bufferDelay, const cardinal frameSize) const
cardinal getBufferDelay () const
cardinal setBufferDelay (const cardinal bufferDelay)
cardinal getPrevBufferDelay (const double frameRate) const
cardinal getNextBufferDelay (const double frameRate) const
InternetAddress getSource () const
InternetFlow getDestination () const
void setSource (const InternetAddress &source)
void setDestination (const InternetFlow &destination)
cardinal getFlags () const
void setFlags (const cardinal flags)

Static Public Member Functions

static card64 frameSizeToBandwidth (const double frameRate, const cardinal frameSize)
static cardinal bandwidthToFrameSize (const double frameRate, const card64 bandwidth)

Protected Attributes

cardinal PktHeaderSize
cardinal PktMaxSize
card64 Bandwidth
double MaxTransferDelay
double MaxLossRate
double MaxJitter
cardinal BufferDelay
cardinal MaxBufferDelay
cardinal Flags
InternetAddress Source
InternetFlow Destination

Detailed Description

Abstract Layer Description.

This class contains a layer's QoS requirements. Important node: All frames sizes in this class are *raw* frame sizes, the frames sizes in FrameSizeScalability are payload frame sizes. This class does necessary translation.

Author:
Thomas Dreibholz
Version:
1.0

Member Enumeration Documentation

Layer flags.

Enumerator:
LF_BaseLayer 
LF_ExtensionLayer 

Constructor & Destructor Documentation


Member Function Documentation

card64 Coral::AbstractLayerDescription::bandwidthToBandwidth ( const card64  bandwidth,
const double  frameRate,
const cardinal  bufferDelay,
const cardinal  newBufferDelay 
) const [inline]

Translate bandwidth into bandwidth using different buffer delay.

Parameters:
bandwidthInput bandwidth.
frameRateInput frame rate.
bufferDelayInput buffer delay.
newBufferDelayOutput buffer delay.
Returns:
Output bandwidth.
static cardinal Coral::AbstractLayerDescription::bandwidthToFrameSize ( const double  frameRate,
const card64  bandwidth 
) [inline, static]

Translate bandwidth into frame size.

Parameters:
frameRateFrame rate.
bandwidthBandwidth.
Returns:
Frame size.
static card64 Coral::AbstractLayerDescription::frameSizeToBandwidth ( const double  frameRate,
const cardinal  frameSize 
) [inline, static]

Translate frame size into bandwidth.

Parameters:
frameRateFrame rate.
frameSizeFrame size.
Returns:
Bandwidth.
cardinal Coral::AbstractLayerDescription::frameSizeToPacketRate ( const double  frameRate,
const cardinal  frameSize 
) const [virtual]

Get packets per second for given frame size.

Parameters:
frameRateFrame rate.
frameSizeFrame size.
Returns:
Packets per second.

Get bandwidth.

Returns:
Bandwidth.

Get buffer delay.

Returns:
Buffer delay in frame rate units.

Get destination address.

Returns:
Destination address.

Get flags.

double Coral::AbstractLayerDescription::getFrameSizeScaleFactorForDelayAndSize ( const double  frameRate,
const cardinal  bufferDelay,
const cardinal  frameSize 
) const [inline]

Get frame size scale factor for given frame rate, size and buffer delay. (size - MinFrameSize) / (MaxFrameSize - MinFrameSize).

Parameters:
frameRateFrame rate.
frameSizeFrame size.
Returns:
Scale factor (out of [0,1]).
double Coral::AbstractLayerDescription::getFrameSizeScaleFactorForSize ( const double  frameRate,
const cardinal  frameSize 
) const [inline]

Get frame size scale factor for given frame rate and size: (size - MinFrameSize) / (MaxFrameSize - MinFrameSize).

Parameters:
frameRateFrame rate and size.
frameSizeFrame size.
Returns:
Scale factor (out of [0,1]).
double Coral::AbstractLayerDescription::getFrameSizeUtilizationForDelayAndSize ( const double  frameRate,
const cardinal  bufferDelay,
const cardinal  frameSize 
) const [inline]

Get frame size utilization for given frame rate, size and buffer delay.

Parameters:
frameRateFrame rate.
frameSizeFrame size.
Returns:
Utilization (out of [0,1]).
double Coral::AbstractLayerDescription::getFrameSizeUtilizationForSize ( const double  frameRate,
const cardinal  frameSize 
) const [inline]

Get frame size utilization for given frame rate and size.

Parameters:
frameRateFrame rate and size.
frameSizeFrame size.
Returns:
Utilization (out of [0,1]).
cardinal Coral::AbstractLayerDescription::getMaxFrameSize ( const double  frameRate) const [inline]

Get maximum frame size for given frame rate.

Parameters:
frameRateFrame rate.
Returns:
Maximum frame size.
cardinal Coral::AbstractLayerDescription::getMaxFrameSizeForDelay ( const double  frameRate,
const cardinal  bufferDelay 
) const [inline]

Get maximum frame size for given frame rate and buffer delay.

Parameters:
frameRateFrame rate.
Returns:
Maximum frame size.

Get maximum jitter.

Returns:
Maximum jitter in microseconds.

Get maximum loss rate.

Returns:
Maximum loss rate (out of [0,1]).

Get maximum transfer delay.

Returns:
Maximum transfer delay in microseconds.
cardinal Coral::AbstractLayerDescription::getMinFrameSize ( const double  frameRate) const [inline]

Get minimum frame size for given frame rate.

Parameters:
frameRateFrame rate.
Returns:
Minimum frame size.
cardinal Coral::AbstractLayerDescription::getMinFrameSizeForDelay ( const double  frameRate,
const cardinal  bufferDelay 
) const [inline]

Get minimum frame size for given frame rate and buffer delay.

Parameters:
frameRateFrame rate.
Returns:
Minimum frame size.
cardinal Coral::AbstractLayerDescription::getNearestValidFrameSize ( const double  frameRate,
const cardinal  bufferDelay,
const cardinal  size 
) const [inline]

Get nearest lower frame size for given frame rate and buffer delay.

Parameters:
frameRateFrame rate.
bufferDelayBuffer delay.
sizeFrameSize.
Returns:
Nearest lower frame size.
cardinal Coral::AbstractLayerDescription::getNextBufferDelay ( const double  frameRate) const [inline]

Get next higher buffer delay.

Parameters:
frameRateFrame rate.
Returns:
Buffer delay in frame rate units.
double Coral::AbstractLayerDescription::getNextFrameSizeForDelayAndSize ( const double  frameRate,
const cardinal  bufferDelay,
const cardinal  frameSize 
) const [inline]

Get next higher frame size for given frame rate, size and buffer delay.

Parameters:
frameRateFrame rate.
frameSizeFrame size.
Returns:
Next higher frame size.
double Coral::AbstractLayerDescription::getNextFrameSizeForSize ( const double  frameRate,
const cardinal  frameSize 
) const [inline]

Get next higher frame size for given frame rate and size.

Parameters:
frameRateFrame rate and size.
frameSizeFrame size.
Returns:
Next higher frame size.
cardinal Coral::AbstractLayerDescription::getPacketCountForDelayAndSize ( const double  frameRate,
const cardinal  bufferDelay,
const cardinal  frameSize 
) const [inline]

Get number of packets (upper limit) for given frame rate, size and buffer delay.

Parameters:
frameRateFrame rate.
Returns:
Number of packets.
cardinal Coral::AbstractLayerDescription::getPacketCountForSize ( const double  frameRate,
const cardinal  frameSize 
) const [inline]

Get number of packets (upper limit) for given frame rate and size.

Parameters:
frameRateFrame rate.
Returns:
Number of packets.
cardinal Coral::AbstractLayerDescription::getPacketRate ( const double  frameRate) const [virtual]

Get packet rate.

Parameters:
frameRateFrame rate.
Returns:
Bandwidth limit.
cardinal Coral::AbstractLayerDescription::getPeakFrameSizeForDelayAndSize ( const double  frameRate,
const cardinal  bufferDelay,
const cardinal  frameSize 
) const [inline]

Get peak frame size for given frame rate, size and buffer delay.

Parameters:
frameRateFrame rate.
Returns:
Peak frame size.
cardinal Coral::AbstractLayerDescription::getPeakFrameSizeForSize ( const double  frameRate,
const cardinal  frameSize 
) const [inline]

Get peak frame size for given frame rate and size.

Parameters:
frameRateFrame rate.
Returns:
Peak frame size.
cardinal Coral::AbstractLayerDescription::getPrevBufferDelay ( const double  frameRate) const [inline]

Get next lower buffer delay.

Parameters:
frameRateFrame rate.
Returns:
Buffer delay in frame rate units.
double Coral::AbstractLayerDescription::getPrevFrameSizeForDelayAndSize ( const double  frameRate,
const cardinal  bufferDelay,
const cardinal  frameSize 
) const [inline]

Get next lower frame size for given frame rate, size and buffer delay.

Parameters:
frameRateFrame rate.
frameSizeFrame size.
Returns:
Next lower frame size.
double Coral::AbstractLayerDescription::getPrevFrameSizeForSize ( const double  frameRate,
const cardinal  frameSize 
) const [inline]

Get next lower frame size for given frame rate and size and size.

Parameters:
frameRateFrame rate.
frameSizeFrame size.
Returns:
Next lower frame size.

Get source address.

Returns:
Source address.
void Coral::AbstractLayerDescription::initLayer ( const cardinal  pktHeaderSize,
const cardinal  pktMaxSize,
const double  maxTransferDelay,
const cardinal  maxBufferDelay,
const double  maxLossRate,
const double  maxJitter,
const cardinal  flags 
) [inline]

Initialize layer description.

Parameters:
pktHeaderSizePacket header size, e.g. 40 + 8 + 12 (IPv6 + UDP + RTP).
pktMaxSizeMaximum packet size, e.g. 1500.
maxTransferDelayMaximum transfer delay in microseconds.
maxBufferDelayMaximum buffer delay in frame rate units.
maxLossRateMaximum loss rate (out of [0,1]).
maxJitterMaximum jitter in microseconds.
bool Coral::AbstractLayerDescription::isValidFrameSize ( const double  frameRate,
const cardinal  bufferDelay,
const cardinal  size 
) const [inline]

Check, if given frame size is valid for given frame rate and buffer delay.

Parameters:
frameRateFrame rate.
bufferDelayBuffer delay.
sizeFrameSize.
Returns:
true, if frame size is valid; false otherwise.
card64 Coral::AbstractLayerDescription::payloadBandwidthToBandwidth ( const card64  bandwidth,
const double  frameRate,
const cardinal  bufferDelay,
const cardinal  newBufferDelay 
) const

Translate *payload* bandwidth into bandwidth using different buffer delay.

Parameters:
bandwidthInput payload bandwidth.
frameRateInput frame rate.
bufferDelayInput buffer delay.
newBufferDelayOutput buffer delay.
Returns:
Output payload bandwidth.
cardinal Coral::AbstractLayerDescription::payloadToRaw ( const double  frameRate,
const cardinal  payload,
const cardinal  bufferDelay 
) const [virtual]

Translate payload frame size into raw frame size.

Parameters:
frameRateFrame rate.
payloadPayload frame size.
bufferDelayBuffer delay.
Returns:
Raw frame size.
cardinal Coral::AbstractLayerDescription::rawToPayload ( const double  frameRate,
const cardinal  raw,
const cardinal  bufferDelay 
) const [virtual]

Translate raw frame size into payload frame size.

Parameters:
frameRateFrame rate.
rawRaw frame size.
bufferDelayBuffer delay.
Returns:
Payload frame size.
bool Coral::AbstractLayerDescription::setBandwidth ( const double  frameRate,
const card64  bandwidth 
) [inline]

Set bandwidth.

Parameters:
frameRateFrame rate.
bandwidthBandwidth.
Returns:
true, if bandwidth is sufficient for minimum requirement.

Set buffer delay.

Parameters:
bufferDelayBuffer delay in frame rate units.
Returns:
Buffer delay set in frame rate units.
void Coral::AbstractLayerDescription::setDestination ( const InternetFlow destination) [inline]

Set destination address.

Parameters:
destinationDestination address
void Coral::AbstractLayerDescription::setFlags ( const cardinal  flags) [inline]

Set flags.

void Coral::AbstractLayerDescription::setMaxJitter ( const double  maxJitter) [inline]

Get maximum jitter.

Parameters:
maxJitterMaximum jitter in microseconds.
void Coral::AbstractLayerDescription::setMaxLossRate ( const double  maxLossRate) [inline]

Set maximum loss rate.

Parameters:
maxLossRateMaximum loss rate (out of [0,1]).
void Coral::AbstractLayerDescription::setMaxTransferDelay ( const double  maxDelay) [inline]

Set maximum transfer delay.

Parameters:
maxDelayMaximum transfer delay in microseconds.

Set source address.

Parameters:
sourceSource address.

Member Data Documentation


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