Source: servicelevelagreement.h
|
|
|
|
// ##########################################################################
// #### ####
// #### Master Thesis Implementation ####
// #### Management of Layered Variable Bitrate Multimedia Streams over ####
// #### DiffServ with A Priori Knowledge ####
// #### ####
// #### ================================================================ ####
// #### ####
// #### ####
// #### Service Level Agreement ####
// #### ####
// #### 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 SERVICELEVELAGREEMENT_H
#define SERVICELEVELAGREEMENT_H
#include "system.h"
#include "bandwidthinfo.h"
#include "trafficclassvalues.h"
namespace Coral {
/**
* This is a DiffServ class.
*
* @short DiffServ Class
* @author Thomas Dreibholz (Dreibholz@bigfoot.com)
* @version 1.0
*/
struct DiffServClass
{
/**
* Bytes per second.
*/
cardinal BytesPerSecond;
/**
* Maximum transfer delay.
*/
double MaxTransferDelay;
/**
* Maximum loss rate.
*/
double MaxLossRate;
/**
* Maximum jitter.
*/
double MaxJitter;
/**
* Cost factor.
*/
double CostFactor;
/**
* Traffic class byte.
*/
card8 TrafficClass;
// ====== Comparision operators ==========================================
/**
* Operator "<".
*/
inline int operator<(const BandwidthInfo& dsClass) const;
/**
* Operator "<=".
*/
inline int operator<=(const BandwidthInfo& dsClass) const;
/**
* Operator ">".
*/
inline int operator>(const BandwidthInfo& dsClass) const;
/**
* Operator ">=".
*/
inline int operator>=(const BandwidthInfo& dsClass) const;
/**
* Operator "==".
*/
inline int operator==(const BandwidthInfo& dsClass) const;
/**
* Operator "!=".
*/
inline int operator!=(const BandwidthInfo& dsClass) const;
};
/**
* This class is a service level agreement (SLA).
*
* @short Trace Layer Configuration
* @author Thomas Dreibholz (Dreibholz@bigfoot.com)
* @version 1.0
*/
class ServiceLevelAgreement
{
// ====== Constructor/Destructor =========================================
public:
/**
* Constructor.
*/
ServiceLevelAgreement();
/**
* Destructor.
*/
~ServiceLevelAgreement();
// ====== Load SLA =======================================================
/**
* Load configuration from file.
*/
bool load(const char* fileName);
// ====== SLA access =====================================================
/**
* Get possible DiffServ classes for given bandwidth info.
*
* @param bandwidthInfo BandwidthInfo.
* @param classList Array to store class index numbers.
* @return Number of class index numbers stored (0 = no possible classes found).
*/
cardinal getPossibleClassesForBandwidthInfo(
const BandwidthInfo& bandwidthInfo,
cardinal* classList) const;
// ====== Public data ====================================================
public:
cardinal TotalBandwidth;
cardinal Classes;
DiffServClass Class[TrafficClassValues::MaxValues];
};
/**
* Output operator.
*/
ostream& operator<<(ostream& os, const ServiceLevelAgreement config);
}
#include "servicelevelagreement.icc"
#endif
Generated by: viper@odin on Mon Oct 16 11:49:26 2000, using kdoc 2.0a36. |