probejitter.h

Go to the documentation of this file.
00001 /* *********
00002 *  
00003 *  This file is part of:
00004 *  NePSing, Network Protocol Simulator next generation
00005 *  
00006 *  Copyright (C) 2004  Tommaso Pecorella <tpecorella@mac.com>
00007 *  
00008 *  This library is free software; you can redistribute it and/or
00009 *  modify it under the terms of the GNU Lesser General Public
00010 *  License as published by the Free Software Foundation; either
00011 *  version 2.1 of the License, or (at your option) any later version.
00012 *  
00013 *  This library is distributed in the hope that it will be useful,
00014 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 *  Lesser General Public License for more details.
00017 *  
00018 *  You should have received a copy of the GNU Lesser General Public
00019 *  License along with this library; if not, write to the Free Software
00020 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 *  
00022 ********* */
00023 
00024 #ifndef __PROBEJITTER_H__
00025 #define __PROBEJITTER_H__
00026 
00027 #include "probe.h"
00028 
00034 
00041 // **************************************************************************
00042 // 
00043 // Output values:
00044 // Time   Standard_Deviation (Sigma)  Mean   Quadratic_Mean    Sigma^2 (Quadratic_Mean-Mean^2)
00045 // 
00046 // **************************************************************************
00047 
00049 
00063 class ProbeJitter : public Probe
00064 {
00065  private:
00066   unsigned long int N;
00067   double Sum;
00068   double SumSq;
00069   
00070   double oldVal;
00071   bool initialized;
00072   
00073  public:
00074   ProbeJitter( string _theName, bool _isGlobal = false );
00075   
00076   virtual void Reset( void );
00077   virtual void Zap( double );
00078   
00079   virtual void Observe( double value );
00080   virtual void WriteToFile( double time );
00081 };
00082 
00084 
00085 #endif
00086 

Generated on Wed Dec 22 23:23:48 2004 for NePSing by doxygen 1.3.9.1 ---- Hosted by SourceForge.net Logo