window2.hh
Go to the documentation of this file.
00001 /*------------------------------------------------------------------------
00002  *---------------------           WMPSNIFFER          --------------------
00003  *------------------------------------------------------------------------
00004  *                                                         V7.0B  11/05/10
00005  *
00006  *
00007  *  File: window2.cc
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 _WINDOW2_HH
00038 #  include "window2_glade.hh"
00039 #  define _WINDOW2_HH
00040 #include <gtkmm/treestore.h>
00041 #include <vector>
00042 #include <string>
00043 #include <sstream>
00044 #include "stats.h"
00045 //using namespace std;
00046 
00047 
00048 struct  QoSD{
00049         int flow_id;
00050         int msg_id;
00051 };
00052 
00053 class main_window;
00054 class window2 : public window2_glade{
00055 
00056         void on_button10_clicked();
00057         void on_button11_clicked();
00058         void on_button12_clicked();
00059         void on_button20_clicked();
00060         void on_button21_clicked();
00061         void on_cursor_changed();
00062         void on_button22_clicked();
00063         bool on_treeview2_button_press_event(GdkEventButton *ev);
00064         void time_graph();
00065         void dist_graph_1000();
00066         void dist_graph_100();
00067         void dist_graph_10();
00068         void dist_graph_a5();
00069         void dist_graph_100_5();
00070         void dist_graph();
00071         void write_to_file();
00072         std::vector<std::string> xrow_name;
00073         Gtk::Menu m_Menu_Popup;
00074         int selected;
00075         int range_setted,min_c,max_c;
00076         int level, old_level;
00077         bool already_created;
00078         main_window* mw;
00079         FILE * sfile;
00080         char stats[100000];
00081         char filename[256];
00082         std::ostringstream oss;
00083         class ModelColumns : public Gtk::TreeModel::ColumnRecord {
00084         public:
00085                         ModelColumns() {
00086                                 add(m_col_id);
00087                                 add(m_col_uid);
00088                                 add(m_col_name);
00089                                 add(m_col_value);
00090                                 add(m_col_type);
00091                         }
00092                         Gtk::TreeModelColumn<int> m_col_type;
00093                         Gtk::TreeModelColumn<int> m_col_id;
00094                         Gtk::TreeModelColumn<int> m_col_uid;
00095                         Gtk::TreeModelColumn<Glib::ustring> m_col_name;
00096                         Gtk::TreeModelColumn<Glib::ustring> m_col_value;
00097 
00098         };
00099                 ModelColumns m_Columns;
00100                 Gtk::TreeModel::Row row, xrow, actual;
00101                 Gtk::TreeModel::Row subrow, raiz;
00102                 Gtk::TreeModel::Row row_level[10];
00103                 Gtk::TreeNodeChildren  * arow;
00104                 int rowSelected;
00105         public:
00106                 Glib::RefPtr<Gtk::TreeStore> m_refTreeModel;
00107                 int get_selected();
00108                 window2(main_window *);
00109                 void show_statistics(char * filename = NULL);
00110                 void show_statistics_from_values();
00111 
00112                 void row_append(int id, const char* txt, long long value,const char* uni);
00113                 void row_append(int id, const char* txt, int value,const char* uni);
00114                 void row_append(int id, const char* txt, float value,const char* uni);
00115 
00116 
00117                 void row_child_append(int id, const char* txt, float value,const char* uni);
00118                 void row_child_append(int id, const char* txt, long long value,const char* uni);
00119                 void row_child_append(int type, int id, const char* txt, long long value, const char*uni);
00120                 void row_child_append(int id, const char* txt, int value,const char* uni);
00121                 void row_child_append(int type, int id, const char* txt, int value, const char*uni);
00122 
00123                 void row_append(int id, const char* txt, const char*uni);
00124                 void row_child_child_append(int id, const char* txt, long long value, const char*uni);
00125 
00126                 void root();
00127                 void subSectionBegin();
00128                 void subSectionEnd();
00129                 void row_create(std::string txt1, std::string txt2, int pos = -1, int uid = -1);
00130                 char *  getFileName();
00131                 std::string  getCurrentRowName();
00132 
00133 };
00134 
00135 #endif


ros_rt_wmp_sniffer
Author(s): Danilo Tardioli, dantard@unizar.es
autogenerated on Mon Oct 6 2014 08:27:57