Source: streamdescription.h


Annotated List
Files
Globals
Hierarchy
Index
// ##########################################################################
// ####                                                                  ####
// ####                    Master Thesis Implementation                  ####
// ####  Management of Layered Variable Bitrate Multimedia Streams over  ####
// ####                  DiffServ with A Priori Knowledge                ####
// ####                                                                  ####
// #### ================================================================ ####
// ####                                                                  ####
// ####                                                                  ####
// #### Stream Description                                               ####
// ####                                                                  ####
// #### 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 STREAMDESCRIPTION_H
#define STREAMDESCRIPTION_H


#include "system.h"
#include "servicelevelagreement.h"
#include "managedstreaminterface.h"
#include "abstractqosdescription.h"


namespace Coral {


/**
  * This class contains a description of a stream. It is used
  * for the bandwidth manager's remapping algorithm.
  *
  * @short   Stream Description
  * @author  Thomas Dreibholz (Dreibholz@bigfoot.com)
  * @version 1.0
  */
class StreamDescription
{
   // ====== Constructor/Destructor =========================================
   public:
   /**
     * Constructor.
     */
   StreamDescription();

   /**
     * Destructor.
     */
   ~StreamDescription();


   // ====== Initialization =================================================
   /**
     * Initialize.
     *
     * @param aqd The stream's AbstractQoSDescription.
     ?????????
     */
// ???????????????????
   void init(ManagedStreamInterface* stream);


   // ====== Layer -> DiffServ class mapping and bandwidth allocation =======
   /**
     * Calculate list of possible layer -> DiffServ class mappings.
     *
     * @param sla Service level agreement.
     * @param rup Resource/utilization point to do calculation for.
     * @return true, if a mapping has been found; false otherwise.
     */
   bool calculateLayerClassMapping(const ServiceLevelAgreement*    sla,
                                   const ResourceUtilizationPoint* rup);

   /**
     * Try to allocate given layer bandwidths to a stream. If allocation
     * is successful, the availability references are decremented by the
     * bandwidth allocation.
     *
     * @param totalAvailableBandwidth Reference to total available bandwidth.
     * @param classAvailableBandwidthArray Available bandwidths for each DiffServ class.
     * @param rup Resource/utilization point to do allocation for.
     */
   bool tryAllocation(cardinal&                 totalAvailableBandwidth,
                      cardinal*                 classAvailableBandwidthArray,
                      ResourceUtilizationPoint* rup);


   // ====== Public data ====================================================
//???????????????
ManagedStreamInterface* Interface;

   /**
     * Stream's AbstractQoSDescription.
     */
   AbstractQoSDescription* QoSDescription;

   /**
     * Number of layers.
     */
   cardinal Layers;

   /**
     * Number of possible DiffServ classes for the layers.
     */
   cardinal LayerClasses[RTPConstants::RTPMaxQualityLayers];

   /**
     * List of possible DiffServ classes for the layers.
     */
   cardinal LayerClassMapping[RTPConstants::RTPMaxQualityLayers][TrafficClassValues::MaxValues];

   /**
     * The layer's allocated DiffServ class number.
     */
   cardinal ClassNumber[RTPConstants::RTPMaxQualityLayers];

   /**
     * The layer's allocated bandwidth.
     */
   cardinal ClassBandwidth[RTPConstants::RTPMaxQualityLayers];

   /**
     * Old utilization of the stream.
     */
   double OldUtilization;

   /**
     * New utilization of the stream.
     */
   double NewUtilization;

   /**
     * True, if all following higher bandwidth allocations will fail (no more
     * bandwidth available to achieve higher quality -> no more allocation trials
     * necessary); false otherwise.
     */
   bool MaximumReached;


   // ???????????????????
   static const cardinal RUMaxEntries = 128;

   // ?????????????????
     ResourceUtilizationPoint Quality;
card64 NextInterval;

   cardinal                 RUEntries;
   ResourceUtilizationPoint RUList[RUMaxEntries];
};


}


#endif

Generated by: viper@odin on Mon Oct 16 11:49:26 2000, using kdoc 2.0a36.