00001
00002
00003
00004 #ifndef _jsondump_H
00005 #define _jsondump_H
00006
00007 #include "powerflow.h"
00008 #include "power_metrics.h"
00009 #include "line.h"
00010 #include "fuse.h"
00011 #include "recloser.h"
00012 #include "sectionalizer.h"
00013 #include "regulator.h"
00014 #include "capacitor.h"
00015 #include "switch_object.h"
00016 #include "line_configuration.h"
00017 #include "triplex_line_configuration.h"
00018 #include "transformer.h"
00019
00020
00021 class jsondump : public gld_object
00022 {
00023 public:
00024 int first_run;
00025 char32 group;
00026 char256 filename_dump_system;
00027 char256 filename_dump_reliability;
00028 bool write_system;
00029 bool write_reliability;
00030 bool write_per_unit;
00031 double system_VA_base;
00032 power_metrics **pPowerMetrics;
00033 fuse **pFuse;
00034 line **pOhLine;
00035 recloser **pRecloser;
00036 regulator **pRegulator;
00037
00038 sectionalizer **pSectionalizer;
00039
00040 switch_object **pSwitch;
00041 line **pTpLine;
00042 line **pUgLine;
00043 OBJECT **pLineConf;
00044 OBJECT **pTpLineConf;
00045 OBJECT **pTransConf;
00046 OBJECT **pRegConf;
00047 capacitor **pCapacitor;
00048 transformer **pTransformer;
00049 TIMESTAMP runtime;
00050 int32 runcount;
00051 complex *node_voltage;
00052 double min_volt_value;
00053 double max_volt_value;
00054
00055 private:
00056 double get_double_value(OBJECT *obj, char *name);
00057 complex get_complex_value(OBJECT *obj, char *name);
00058 set get_set_value(OBJECT *obj, char *name);
00059 enumeration get_enum_value(OBJECT *obj, char *name);
00060 OBJECT *get_object_value(OBJECT *obj,char *name);
00061
00062 public:
00063 static CLASS *oclass;
00064
00065 public:
00066 jsondump(MODULE *mod);
00067 int create(void);
00068 int init(OBJECT *parent);
00069 TIMESTAMP commit(TIMESTAMP t);
00070 STATUS finalize();
00071 int isa(char *classname);
00072 STATUS dump_system(void);
00073 STATUS dump_reliability(void);
00074 };
00075
00076 #endif // _jsondump_H
00077