RTP Trace System
1.0
|
Abstract Layer Description. More...
#include <abstractlayerdescription.h>
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 |
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.
Constructor.
Destructor.
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.
bandwidth | Input bandwidth. |
frameRate | Input frame rate. |
bufferDelay | Input buffer delay. |
newBufferDelay | Output buffer delay. |
static cardinal Coral::AbstractLayerDescription::bandwidthToFrameSize | ( | const double | frameRate, |
const card64 | bandwidth | ||
) | [inline, static] |
Translate bandwidth into frame size.
frameRate | Frame rate. |
bandwidth | Bandwidth. |
static card64 Coral::AbstractLayerDescription::frameSizeToBandwidth | ( | const double | frameRate, |
const cardinal | frameSize | ||
) | [inline, static] |
Translate frame size into bandwidth.
frameRate | Frame rate. |
frameSize | Frame size. |
cardinal Coral::AbstractLayerDescription::frameSizeToPacketRate | ( | const double | frameRate, |
const cardinal | frameSize | ||
) | const [virtual] |
Get packets per second for given frame size.
frameRate | Frame rate. |
frameSize | Frame size. |
card64 Coral::AbstractLayerDescription::getBandwidth | ( | ) | const [inline] |
Get bandwidth.
cardinal Coral::AbstractLayerDescription::getBufferDelay | ( | ) | const [inline] |
Get buffer delay.
InternetFlow Coral::AbstractLayerDescription::getDestination | ( | ) | const [inline] |
Get destination address.
cardinal Coral::AbstractLayerDescription::getFlags | ( | ) | const [inline] |
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).
frameRate | Frame rate. |
frameSize | Frame size. |
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).
frameRate | Frame rate and size. |
frameSize | Frame size. |
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.
frameRate | Frame rate. |
frameSize | Frame size. |
double Coral::AbstractLayerDescription::getFrameSizeUtilizationForSize | ( | const double | frameRate, |
const cardinal | frameSize | ||
) | const [inline] |
Get frame size utilization for given frame rate and size.
frameRate | Frame rate and size. |
frameSize | Frame size. |
cardinal Coral::AbstractLayerDescription::getMaxFrameSize | ( | const double | frameRate | ) | const [inline] |
Get maximum frame size for given frame rate.
frameRate | Frame rate. |
cardinal Coral::AbstractLayerDescription::getMaxFrameSizeForDelay | ( | const double | frameRate, |
const cardinal | bufferDelay | ||
) | const [inline] |
Get maximum frame size for given frame rate and buffer delay.
frameRate | Frame rate. |
double Coral::AbstractLayerDescription::getMaxJitter | ( | ) | const [inline] |
Get maximum jitter.
double Coral::AbstractLayerDescription::getMaxLossRate | ( | ) | const [inline] |
Get maximum loss rate.
double Coral::AbstractLayerDescription::getMaxTransferDelay | ( | ) | const [inline] |
Get maximum transfer delay.
cardinal Coral::AbstractLayerDescription::getMinFrameSize | ( | const double | frameRate | ) | const [inline] |
Get minimum frame size for given frame rate.
frameRate | Frame rate. |
cardinal Coral::AbstractLayerDescription::getMinFrameSizeForDelay | ( | const double | frameRate, |
const cardinal | bufferDelay | ||
) | const [inline] |
Get minimum frame size for given frame rate and buffer delay.
frameRate | Frame rate. |
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.
frameRate | Frame rate. |
bufferDelay | Buffer delay. |
size | FrameSize. |
cardinal Coral::AbstractLayerDescription::getNextBufferDelay | ( | const double | frameRate | ) | const [inline] |
Get next higher buffer delay.
frameRate | Frame rate. |
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.
frameRate | Frame rate. |
frameSize | 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.
frameRate | Frame rate and size. |
frameSize | 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.
frameRate | Frame rate. |
cardinal Coral::AbstractLayerDescription::getPacketCountForSize | ( | const double | frameRate, |
const cardinal | frameSize | ||
) | const [inline] |
Get number of packets (upper limit) for given frame rate and size.
frameRate | Frame rate. |
cardinal Coral::AbstractLayerDescription::getPacketRate | ( | const double | frameRate | ) | const [virtual] |
Get packet rate.
frameRate | Frame rate. |
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.
frameRate | Frame rate. |
cardinal Coral::AbstractLayerDescription::getPeakFrameSizeForSize | ( | const double | frameRate, |
const cardinal | frameSize | ||
) | const [inline] |
Get peak frame size for given frame rate and size.
frameRate | Frame rate. |
cardinal Coral::AbstractLayerDescription::getPrevBufferDelay | ( | const double | frameRate | ) | const [inline] |
Get next lower buffer delay.
frameRate | Frame rate. |
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.
frameRate | Frame rate. |
frameSize | 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.
frameRate | Frame rate. |
frameSize | Frame size. |
InternetAddress Coral::AbstractLayerDescription::getSource | ( | ) | const [inline] |
Get 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.
pktHeaderSize | Packet header size, e.g. 40 + 8 + 12 (IPv6 + UDP + RTP). |
pktMaxSize | Maximum packet size, e.g. 1500. |
maxTransferDelay | Maximum transfer delay in microseconds. |
maxBufferDelay | Maximum buffer delay in frame rate units. |
maxLossRate | Maximum loss rate (out of [0,1]). |
maxJitter | Maximum 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.
frameRate | Frame rate. |
bufferDelay | Buffer delay. |
size | FrameSize. |
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.
bandwidth | Input payload bandwidth. |
frameRate | Input frame rate. |
bufferDelay | Input buffer delay. |
newBufferDelay | Output buffer delay. |
cardinal Coral::AbstractLayerDescription::payloadToRaw | ( | const double | frameRate, |
const cardinal | payload, | ||
const cardinal | bufferDelay | ||
) | const [virtual] |
Translate payload frame size into raw frame size.
frameRate | Frame rate. |
payload | Payload frame size. |
bufferDelay | Buffer delay. |
cardinal Coral::AbstractLayerDescription::rawToPayload | ( | const double | frameRate, |
const cardinal | raw, | ||
const cardinal | bufferDelay | ||
) | const [virtual] |
Translate raw frame size into payload frame size.
frameRate | Frame rate. |
raw | Raw frame size. |
bufferDelay | Buffer delay. |
bool Coral::AbstractLayerDescription::setBandwidth | ( | const double | frameRate, |
const card64 | bandwidth | ||
) | [inline] |
Set bandwidth.
frameRate | Frame rate. |
bandwidth | Bandwidth. |
cardinal Coral::AbstractLayerDescription::setBufferDelay | ( | const cardinal | bufferDelay | ) | [inline] |
Set buffer delay.
bufferDelay | Buffer delay in frame rate units. |
void Coral::AbstractLayerDescription::setDestination | ( | const InternetFlow & | destination | ) | [inline] |
Set destination address.
destination | Destination address |
void Coral::AbstractLayerDescription::setFlags | ( | const cardinal | flags | ) | [inline] |
Set flags.
void Coral::AbstractLayerDescription::setMaxJitter | ( | const double | maxJitter | ) | [inline] |
Get maximum jitter.
maxJitter | Maximum jitter in microseconds. |
void Coral::AbstractLayerDescription::setMaxLossRate | ( | const double | maxLossRate | ) | [inline] |
Set maximum loss rate.
maxLossRate | Maximum loss rate (out of [0,1]). |
void Coral::AbstractLayerDescription::setMaxTransferDelay | ( | const double | maxDelay | ) | [inline] |
Set maximum transfer delay.
maxDelay | Maximum transfer delay in microseconds. |
void Coral::AbstractLayerDescription::setSource | ( | const InternetAddress & | source | ) | [inline] |
Set source address.
source | Source address. |
card64 Coral::AbstractLayerDescription::Bandwidth [protected] |
cardinal Coral::AbstractLayerDescription::BufferDelay [protected] |
cardinal Coral::AbstractLayerDescription::Flags [protected] |
double Coral::AbstractLayerDescription::MaxJitter [protected] |
double Coral::AbstractLayerDescription::MaxLossRate [protected] |
double Coral::AbstractLayerDescription::MaxTransferDelay [protected] |
cardinal Coral::AbstractLayerDescription::PktMaxSize [protected] |