00001 /*------------------------------------------------------------------------ 00002 *--------------------- WMPSNIFFER -------------------- 00003 *------------------------------------------------------------------------ 00004 * V7.0B 11/05/10 00005 * 00006 * 00007 * File: statistics.h 00008 * Authors: Danilo Tardioli 00009 * ---------------------------------------------------------------------- 00010 * Copyright (C) 2000-2012, Universidad de Zaragoza, SPAIN 00011 * 00012 * Contact Addresses: Danilo Tardioli dantard@unizar.es 00013 * 00014 * RT-WMP is free software; you can redistribute it and/or modify it 00015 * under the terms of the GNU General Public License as published by the 00016 * Free Software Foundation; either version 2, or (at your option) any 00017 * later version. 00018 * 00019 * RT-WMP is distributed in the hope that it will be useful, but 00020 * WITHOUT ANY WARRANTY; without even the implied warranty of 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00022 * General Public License for more details. 00023 * 00024 * You should have received a copy of the GNU General Public License 00025 * distributed with RT-WMP; see file COPYING. If not, write to the 00026 * Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 00027 * 02111-1307, USA. 00028 * 00029 * As a special exception, if you link this unit with other files to 00030 * produce an executable, this unit does not by itself cause the 00031 * resulting executable to be covered by the GNU General Public License. 00032 * This exception does not however invalidate any other reasons why the 00033 * executable file might be covered by the GNU Public License. 00034 * 00035 *----------------------------------------------------------------------*/ 00036 00037 #ifndef STATISTICS_H_ 00038 #define STATISTICS_H_ 00039 00040 #include <stdio.h> 00041 #include <string.h> 00042 #include <vector> 00043 #include <math.h> 00044 #include "wmp_config.h" 00045 00046 #include "core/include/frames.h" 00047 #include "window2.hh" 00048 //using namespace std; 00049 00050 #define NONE -1 00051 #define MIN_V -2 00052 #define MAX_V -3 00053 00054 void statistics_init() ; 00055 void statistics_new_frame(wmpFrame * r, long long time, int i, int bytes, simData_Hdr * sdh=NULL); 00056 void statistics_publish(window2 * w); 00057 void statistics_get_fez(int & min, int & max); 00058 int statistics_from_file(char * filename, int & begin, int & end); 00059 void stat_plot_tg(int i); 00060 void stat_plot_hist(int i, int nbins, double zoom); 00061 bool stat_ask_plotter(int i); 00062 void stat_write_to_file(int i); 00063 #endif /* STATISTICS_H_ */