00001
00002
00003
00004 #ifndef _HISTOGRAM_H
00005 #define _HISTOGRAM_H
00006
00007 #include <ctype.h>
00008
00009 #include "tape.h"
00010
00011 EXPORT void new_histogram(MODULE *mod);
00012
00013 #ifdef __cplusplus
00014 typedef struct s_histogram_bin {
00015 double low_val;
00016 double high_val;
00017 int low_inc;
00018 int high_inc;
00019 } BIN;
00020
00021 class histogram
00022 {
00023 protected:
00024 FINDLIST *group_list;
00025 int *binctr;
00026 CPLPT comp_part;
00027 PROPERTY *prop_ptr;
00028 TAPEOPS *ops;
00029
00030 public:
00031 static CLASS *oclass;
00032 static CLASS *pclass;
00033 static histogram *defaults;
00034
00035 TIMESTAMP next_count, t_count;
00036 TIMESTAMP next_sample, t_sample;
00037
00038 char1024 filename;
00039 char1024 fname;
00040 char32 ftype;
00041 char32 mode;
00042 char8 flags;
00043 char1024 group;
00044 char256 property;
00045 char1024 bins;
00046 int32 bin_count;
00047 double min;
00048 double max;
00049 double sampling_interval;
00050 double counting_interval;
00051 int32 limit;
00052
00053 FILETYPE type;
00054 union {
00055 FILE *fp;
00056 MEMORY *memory;
00057 void *tsp;
00059 };
00060
00061 BIN *bin_list;
00062 public:
00063 histogram(MODULE *mod);
00064 int create(void);
00065 int init(OBJECT *parent);
00066 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1);
00067 int isa(char *classname);
00068 protected:
00069 void test_for_complex(char *, char *);
00070 int feed_bins(OBJECT *);
00071 };
00072
00073 #endif // C++
00074
00075 #endif // _HISTOGRAM_H_