RTP Trace System  1.0
abstractqosdescription.h
Go to the documentation of this file.
00001 // ##########################################################################
00002 // ####                                                                  ####
00003 // ####                    Master Thesis Implementation                  ####
00004 // ####  Management of Layered Variable Bitrate Multimedia Streams over  ####
00005 // ####                  DiffServ with A Priori Knowledge                ####
00006 // ####                                                                  ####
00007 // #### ================================================================ ####
00008 // ####                                                                  ####
00009 // ####                                                                  ####
00010 // #### Abstract QoS Description Inlines                                 ####
00011 // ####                                                                  ####
00012 // #### Version 1.00  --  February 19, 2001                              ####
00013 // ####                                                                  ####
00014 // #### Copyright (C) 2000/2001 Thomas Dreibholz                         ####
00015 // #### University of Bonn, Department of Computer Science IV            ####
00016 // #### EMail: dreibh@iem.uni-due.de                                     ####
00017 // #### WWW:   https://www.uni-due.de/~be0001/diplom/index.html          ####
00018 // ####                                                                  ####
00019 // ##########################################################################
00020 
00021 
00022 #ifndef ABSTRACTQOSDESCRIPTION_H
00023 #define ABSTRACTQOSDESCRIPTION_H
00024 
00025 
00026 #include "system.h"
00027 #include "frameratescalabilityinterface.h"
00028 #include "abstractlayerdescription.h"
00029 #include "rtppacket.h"
00030 #include "resourceutilizationpoint.h"
00031 
00032 
00033 namespace Coral {
00034 
00035 
00043 class AbstractQoSDescription : virtual public FrameRateScalabilityInterface
00044 {
00045    // ====== Constructor/Destructor =========================================
00046    public:
00050    AbstractQoSDescription();
00051 
00055    virtual ~AbstractQoSDescription();
00056 
00057 
00058    // ====== Initialization/update ==========================================
00064    inline void initDescription(const double frameRate);
00065 
00072    virtual void updateDescription(const cardinal pktHeaderSize,
00073                                   const cardinal pktMaxSize) = 0;
00074 
00075 
00076    // ====== Frame rate methods =============================================
00082    inline double getFrameRate() const;
00083 
00090    inline double setFrameRate(const double frameRate);
00091 
00097    inline double getNextFrameRate() const;
00098 
00104    inline double getPrevFrameRate() const;
00105 
00112    inline double getFrameRateScaleFactor() const;
00113 
00114 
00115    // ====== Total bandwidth methods ========================================
00121    card64 getMinBandwidth() const;
00122 
00128    card64 getMaxBandwidth() const;
00129 
00130 
00131    // ====== Position =======================================================
00137    inline card64 getPosition() const;
00138 
00144    inline void setPosition(const card64 position);
00145 
00146 
00147    // ====== Abstract layer methods =========================================
00153    virtual cardinal getLayers() const = 0;
00154 
00161    virtual AbstractLayerDescription* getLayer(const cardinal layer) const = 0;
00162 
00163 
00164    // ====== Get/set resources, calculate utilization for bandwidths ========
00171    double getResources(ResourceUtilizationPoint& rup) const;
00172 
00179    double setResources(const ResourceUtilizationPoint& rup);
00180 
00189    virtual double calculateUtilizationForLayerBandwidths(
00190                      const double    frameRate,
00191                      const cardinal  layers,
00192                      const card64*   bandwidth) const;
00193 
00194 
00195    // ====== Resource/Utilization calculation ===============================
00208    virtual cardinal getPrecomputedResourceUtilizationList(
00209                        ResourceUtilizationPoint* rup,
00210                        const card64              bwThreshold,
00211                        const double              utThreshold,
00212                        const cardinal            maxPoints) const = 0;
00213 
00225    virtual cardinal calculateResourceUtilizationList(
00226                        ResourceUtilizationPoint* rup,
00227                        const card64              bwThreshold,
00228                        const double              utThreshold,
00229                        const cardinal            maxPoints) const;
00230 
00241    inline double calculateMaxUtilizationForBandwidth(
00242                     const card64              totalBandwidth,
00243                     ResourceUtilizationPoint& rup) const;
00244 
00252    virtual void calculateMaxUtilizationForBandwidthArray(
00253                    const card64*             totalBandwidthArray,
00254                    ResourceUtilizationPoint* rupArray,
00255                    const cardinal            points) const;
00256 
00257 
00258    // ====== Wanted quality settings ========================================
00264    inline double getWantedUtilization() const;
00265 
00271    inline void setWantedUtilization(const double utilization);
00272 
00278    card64 getMinWantedBandwidth() const;
00279 
00285    card64 getMaxWantedBandwidth() const;
00286 
00292    void setMinWantedBandwidth(const card64 bandwidth);
00293 
00299    void setMaxWantedBandwidth(const card64 bandwidth);
00300 
00306    inline int8 getStreamPriority() const;
00307 
00313    inline void setStreamPriority(const int8 priority);
00314 
00320    inline int8 getSessionPriority() const;
00321 
00327    inline void setSessionPriority(const int8 priority);
00328 
00329 
00330    // ====== Protected data =================================================
00331    protected:
00332    double   WantedUtilization;
00333    card64   MinWantedBandwidth;
00334    card64   MaxWantedBandwidth;
00335    double   FrameRate;
00336    card64   Position;
00337    cardinal PktHeaderSize;
00338    cardinal PktMaxSize;
00339    int8     StreamPriority;
00340    int8     SessionPriority;
00341 
00342 
00343    // ====== Private data ===================================================
00344    private:
00345    void doResourceUtilizationIteration(
00346            ResourceUtilizationPoint* rup,
00347            const card64              bwThreshold,
00348            const double              utThreshold,
00349            double*                   utilizationCache,
00350            card64*                   bandwidthCache,
00351            const cardinal            maxPoints,
00352            const cardinal            maxCachePoints,
00353            const cardinal            start,
00354            const cardinal            end,
00355            const card64              startBandwidth,
00356            const card64              endBandwidth,
00357            const cardinal            level,
00358            const cardinal            maxLevel,
00359            cardinal&                 count) const;
00360 
00361    void calculateBandwidthInfo(const cardinal layer,
00362                                BandwidthInfo& bandwidthInfo) const;
00363 };
00364 
00365 
00369 ostream& operator<<(ostream& os, const AbstractQoSDescription& aqd);
00370 
00371 
00372 }
00373 
00374 
00375 #include "abstractqosdescription.icc"
00376 
00377 
00378 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines