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 typedef enum e_complex_part {
00022 NONE = 0,
00023 REAL,
00024 IMAG,
00025 MAG,
00026 ANG
00027 } CPLPT;
00028
00029 class histogram
00030 {
00031 protected:
00032 FINDLIST *group_list;
00033 int *binctr;
00034 CPLPT comp_part;
00035 PROPERTY *prop_ptr;
00036 TAPEOPS *ops;
00037
00038 public:
00039 static CLASS *oclass;
00040 static CLASS *pclass;
00041 static histogram *defaults;
00042
00043 TIMESTAMP next_count, t_count;
00044 TIMESTAMP next_sample, t_sample;
00045
00046 char1024 filename;
00047 char1024 fname;
00048 char32 ftype;
00049 char8 flags;
00050 char1024 group;
00051 char32 property;
00052 char1024 bins;
00053 int32 bin_count;
00054 double min;
00055 double max;
00056 double sampling_interval;
00057 double counting_interval;
00058 int32 limit;
00059
00060 FILETYPE type;
00061 union {
00062 FILE *fp;
00063 MEMORY *memory;
00064 void *tsp;
00066 };
00067
00068 BIN *bin_list;
00069 public:
00070 histogram(MODULE *mod);
00071 int create(void);
00072 int init(OBJECT *parent);
00073 TIMESTAMP sync(TIMESTAMP t0, TIMESTAMP t1);
00074 int isa(char *classname);
00075 protected:
00076 void test_for_complex(char *, char *);
00077 int feed_bins(OBJECT *);
00078 };
00079
00080 #endif // C++
00081
00082 #endif // _HISTOGRAM_H_