TSP: The Transport Sample Protocol



Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

histogram.h

Go to the documentation of this file.
00001 
00034 #ifndef _H_HISTO
00035 #define _H_HISTO
00036 
00037 
00038 /*----------------------------------------------------------------------+
00039  |                                                                      |
00040  |      FILE :          histogram.c                                     |
00041  |                                                                      |
00042  |      DESCRIPTION :   contains functions to build histogram in which  |
00043  |                      values are automatically sorted and archived    |
00044  |                      according to a paramtizable interval lenght     |
00045  |                                                                      |
00046  |      AUTHORS :       Marc LEROY                                      |
00047  |                                                                      |
00048  |      CREATION :      16/06/94                                        |
00049  |                                                                      |
00050  |      UPDATES :       20/12/94 Bruno Moisan                           |
00051  |                      interval lenght is parametrizable               |
00052  |                      number of intervals is parametrizable           |
00053  |                                                                      |
00054  +----------------------------------------------------------------------*/
00055 
00056 /*----------------------------------------------------------------------+
00057  |                                                                      |
00058  |      FUNCTION :      tsp_histo_nb_interval                           |
00059  |                                                                      |
00060  |      DESCRIPTION :   set the number of used intervals                |
00061  |                                                                      |
00062  |      PARAMETERS :    nb      number of requested interval            |
00063  |                                                                      |
00064  |      GLOBAL VAR :    histo, max                                      |
00065  |                                                                      |
00066  |      RETURN :        0 if ok, -1 if nb > TSP_HISTO_MAX                       |
00067  |                                                                      |
00068  +----------------------------------------------------------------------*/
00069 
00070 int tsp_histo_nb_interval( unsigned int nb );
00071 
00072 /*----------------------------------------------------------------------+
00073  |                                                                      |
00074  |      FUNCTION :      tsp_histo_set_delta                                     |
00075  |                                                                      |
00076  |      DESCRIPTION :   set the width of the intervals                  |
00077  |                                                                      |
00078  |      PARAMETERS :    width   requested width                         |
00079  |                                                                      |
00080  |      GLOBAL VAR :    histo, delta                                    |
00081  |                                                                      |
00082  |      RETURN :        0 if ok, -1 if width <= 0                       |
00083  |                                                                      |
00084  +----------------------------------------------------------------------*/
00085 
00086 int tsp_histo_set_delta( unsigned int width /*us*/);
00087 
00088 /*----------------------------------------------------------------------+
00089  |                                                                      |
00090  |      FUNCTION :      tsp_histo_init                                  |
00091  |                                                                      |
00092  |      DESCRIPTION :   clear the histogram                             |
00093  |                                                                      |
00094  |      PARAMETERS :    none                                            |
00095  |                                                                      |
00096  |      GLOBAL VAR :    histo, max                                      |
00097  |                                                                      |
00098  |      RETURN :        none                                            |
00099  |                                                                      |
00100  +----------------------------------------------------------------------*/
00101 
00102 void tsp_histo_init(void);
00103 
00104 /*----------------------------------------------------------------------+
00105  |                                                                      |
00106  |      FUNCTION :      tsp_histo_enter                                 |
00107  |                                                                      |
00108  |      DESCRIPTION :   outputs the histogram                           |
00109  |                                                                      |
00110  |      PARAMETERS :    value   value to put in the histogram           |
00111  |                                                                      |
00112  |      GLOBAL VAR :    histo, max, delta                               |
00113  |                                                                      |
00114  |      RETURN :        none                                            |
00115  |                                                                      |
00116  +----------------------------------------------------------------------*/
00117 
00118 void tsp_histo_enter( unsigned long value /*us*/);
00119 void tsp_histo_enter_with_date( unsigned long value, double date_evt );
00120 
00121 
00122 
00123 /*----------------------------------------------------------------------+
00124  |                                                                      |
00125  |      FUNCTION :      tsp_histo_dump                                  |
00126  |                                                                      |
00127  |      DESCRIPTION :   outputs the histogram                           |
00128  |                                                                      |
00129  |      PARAMETERS :    f       stream on which histogram has to be     |
00130  |                              displayed                               |
00131  |                                                                      |
00132  |                      title   title of the histogram                  |
00133  |                                                                      |
00134  |      GLOBAL VAR :    histo, max, delta                               |
00135  |                                                                      |
00136  |      RETURN :        none                                            |
00137  |                                                                      |
00138  +----------------------------------------------------------------------*/
00139 
00140 void tsp_histo_dump( FILE *f, char *title );
00141 
00142 #endif
00143 
Framework Home Page.

Beware !! TSP wave is coming...