Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

adc.h

Go to the documentation of this file.
00001 /* -*-  Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */
00002 /*
00003  * Copyright (c) Xerox Corporation 1997. All rights reserved.
00004  *
00005  * License is granted to copy, to use, and to make and to use derivative
00006  * works for research and evaluation purposes, provided that Xerox is
00007  * acknowledged in all documentation pertaining to any such copy or
00008  * derivative work. Xerox grants no other licenses expressed or
00009  * implied. The Xerox trade name should not be used in any advertising
00010  * without its written permission. 
00011  *
00012  * XEROX CORPORATION MAKES NO REPRESENTATIONS CONCERNING EITHER THE
00013  * MERCHANTABILITY OF THIS SOFTWARE OR THE SUITABILITY OF THIS SOFTWARE
00014  * FOR ANY PARTICULAR PURPOSE.  The software is provided "as is" without
00015  * express or implied warranty of any kind.
00016  *
00017  * These notices must be retained in any copies of any part of this
00018  * software. 
00019  * @(#) $Header: /nfs/jade/vint/CVSROOT/ns-2/adc/adc.h,v 1.5 1999/02/12 22:01:31 breslau Exp $
00020  */
00021 
00022 #ifndef ns_adc_h
00023 #define ns_adc_h
00024 
00025 #include "estimator.h"
00026 
00027 #define CLASS 10
00028 class ADC : public NsObject {
00029 public:
00030         ADC();
00031         int command(int,const char*const*);
00032         virtual int admit_flow(int cl,double r, int b)=0;
00033         virtual void rej_action(int,double,int){}; 
00034         virtual void teardown_action(int,double,int){}; 
00035         inline void recv(Packet*, Handler *){} 
00036         inline void setest(int cl,Estimator *est) {est_[cl]=est;
00037                                                  est_[cl]->setactype(type_);}
00038         double peak_rate(int cl,double r,int b) {return r+b/est_[cl]->period();}
00039         char *type() {return type_;}
00040 protected:
00041         Estimator *est_[CLASS];
00042         double bandwidth_;
00043         char *type_;
00044         Tcl_Channel tchan_;
00045         int src_;
00046         int dst_;
00047         int backoff_;
00048         int dobump_;
00049 };
00050 
00051 #endif
00052 
00053 
00054 
00055 
00056 

Generated on Tue Apr 20 12:14:10 2004 for NS2.26SourcesOriginal by doxygen 1.3.3