Source: traceconfiguration.h
|
|
|
|
// ##########################################################################
// #### ####
// #### Master Thesis Implementation ####
// #### Management of Layered Variable Bitrate Multimedia Streams over ####
// #### DiffServ with A Priori Knowledge ####
// #### ####
// #### ================================================================ ####
// #### ####
// #### ####
// #### Trace Configuration ####
// #### ####
// #### Version 1.00 -- October 10, 2000 ####
// #### ####
// #### Copyright (C) 2000 Thomas Dreibholz ####
// #### University of Bonn, Department of Computer Science IV ####
// #### EMail: Dreibholz@bigfoot.com ####
// #### WWW: http://www.bigfoot.com/~dreibholz/diplom/index.html ####
// #### ####
// ##########################################################################
#ifndef TRACECONFIGURATION_H
#define TRACECONFIGURATION_H
#include "system.h"
#include "tdtf.h"
namespace Coral {
/**
* This is a layer's trace configuration.
*
* @short Trace Layer Configuration
* @author Thomas Dreibholz (Dreibholz@bigfoot.com)
* @version 1.0
*/
struct TraceLayerConfiguration
{
// ====== Scalability ====================================================
/**
* Scalability.
* MinFrameSize = Scalability * MaxFrameSize.
*/
double Scalability;
// ====== Layer cost factor ==============================================
/**
* Cost factor for this layer.
*/
double CostFactor;
// ====== Empirical envelopes ============================================
/**
* Number of pairs in byterate empirical envelope.
*/
cardinal ByterateEmpiricalEnvelopePairs;
/**
* Number of pairs in frame count empirical envelope.
*/
cardinal FrameCountEmpiricalEnvelopePairs;
// ====== Frame size utilization =========================================
/**
* Maximum number of frame size utilization constants.
*/
static const card16 MaxFrameSizeUtilizationConstants = 8;
/**
* Layer flags.
*/
cardinal LayerFlags;
/**
* Number of frame size utilization constants.
*/
card16 FrameSizeUtilizationMaxConstants;
/**
* Number of frame size utilization constants.
*/
card16 FrameSizeUtilizationConstants;
/**
* Frame size utility function type.
*/
card16 FrameSizeUtilizationType;
/**
* Frame size utilization weight.
*/
double FrameSizeUtilizationWeight;
/**
* Array of frame size utilization constants.
*/
double FrameSizeUtilizationConstant[MaxFrameSizeUtilizationConstants];
};
/**
* This is a trace configuration.
*
* @short Trace Configuration
* @author Thomas Dreibholz (Dreibholz@bigfoot.com)
* @version 1.0
*/
struct TraceConfiguration
{
// ====== Input trace description ========================================
/**
* Frame rate.
*/
double FrameRate;
/**
* Frame pattern, e.g. "IBBPBBPBBPBBP".
*/
char FramePattern[256];
/**
* Name of input trace file.
*/
char InputName[128];
// ====== Extension layers ===============================================
/**
* Number of extension layers.
*/
cardinal ExtLayers;
/**
* Fake factor for 1st extension layer: FrameSizeE1 = FakeE1 * FrameSizeBase.
*/
double FakeE1;
/**
* Fake factor for 2nd extension layer: FrameSizeE2 = FakeE2 * FrameSizeBase.
*/
double FakeE2;
// ====== Delay, interval lengths, remapping cost ========================
/**
* Maximum buffer delay in microseconds.
*/
cardinal MaxBufferDelay;
/**
* Minimum interval length in microseconds.
*/
card64 MinIntervalLength;
/**
* Maximum interval length in microseconds.
*/
card64 MaxIntervalLength;
/**
* Remapping cost.
*/
double RemappingCost;
// ====== Resource/utilization list ======================================
/**
* Number of resource/utilization points.
*/
card16 RUPoints;
/**
* Bandwidth threshold.
*/
cardinal BandwidthThreshold;
/**
* Utilization threshold.
*/
double UtilizationThreshold;
// ====== Frame rate utilization =========================================
/**
* Maximum number of frame rate utilization constants.
*/
static const card16 MaxFrameRateUtilizationConstants = 8;
/**
* Number of frame rate utilization constants.
*/
card16 FrameRateUtilizationMaxConstants;
/**
* Number of frame rate utilization constants.
*/
card16 FrameRateUtilizationConstants;
/**
* Frame rate utility function type.
*/
card16 FrameRateUtilizationType;
/**
* Frame rate utilization weight.
*/
double FrameRateUtilizationWeight;
/**
* Array of frame rate utilization constants.
*/
double FrameRateUtilizationConstant[MaxFrameRateUtilizationConstants];
// ====== Information ====================================================
/**
* Title.
*/
char Title[TDTFPrefix::MaxTitleLength];
/**
* Copyright.
*/
char Copyright[TDTFPrefix::MaxCopyrightLength];
/**
* Comment.
*/
char Comment[TDTFPrefix::MaxCopyrightLength];
/**
* URL.
*/
char URL[TDTFPrefix::MaxURLLength];
// ====== Layer configuration ============================================
/**
* Maximum number of layers.
*/
static const cardinal MaxLayers = 9;
/**
* Array of layer configurations.
*/
TraceLayerConfiguration Layer[MaxLayers];
// ====== Print ==========================================================
/**
* Print configuration to given output stream.
*
* @param os Output stream.
* @param utilitazionOnly true to print utilization values only; false otherwise.
*/
void print(ostream& os,
const bool utilizationOnly = false) const;
// ====== Load ===========================================================
/**
* Load configuration from file.
*
* @param fileName File name of file to load.
* @param utilitazionOnly true to load utilization values only; false otherwise.
* @return true, if load has been successful; false otherwise.
*/
bool load(const char* fileName,
const bool utilizationOnly = false);
};
/**
* Output operator.
*/
ostream& operator<<(ostream& os, const TraceConfiguration& config);
}
#endif
Generated by: viper@odin on Mon Oct 16 11:49:26 2000, using kdoc 2.0a36. |