00001
00005 #ifndef _generators_H
00006 #define _generators_H
00007
00008 #include <stdarg.h>
00009 #include "gridlabd.h"
00010
00011 #ifdef _GENERATORS_GLOBALS
00012 #define GLOBAL
00013 #define INIT(A) = (A)
00014 #else
00015 #define GLOBAL extern
00016 #define INIT(A)
00017 #endif
00018
00019
00020 #define PHASE_A 0x0001
00021 #define PHASE_B 0x0002
00022 #define PHASE_C 0x0004
00023 #define PHASE_ABC 0x0007
00024 #define PHASE_N 0x0008
00025 #define PHASE_ABCN 0x000f
00026 #define GROUND 0x0080
00027
00028 #define PHASE_D 0x0100
00029
00030 #define PHASE_S1 0x0010
00031 #define PHASE_S2 0x0020
00032 #define PHASE_SN 0x0040
00033 #define PHASE_S 0x0070
00034 #define TSNVRDBL 9223372036854775808.0
00035
00036 GLOBAL bool enable_subsecond_models INIT(false);
00037 GLOBAL unsigned long deltamode_timestep INIT(10000000);
00038 GLOBAL double deltamode_timestep_publish INIT(10000000.0);
00039 GLOBAL OBJECT **delta_objects INIT(NULL);
00040 GLOBAL FUNCTIONADDR *delta_preupdate_functions INIT(NULL);
00041 GLOBAL FUNCTIONADDR *delta_functions INIT(NULL);
00042 GLOBAL FUNCTIONADDR *post_delta_functions INIT(NULL);
00043 GLOBAL int gen_object_count INIT(0);
00044 GLOBAL int gen_object_current INIT(-1);
00045 GLOBAL TIMESTAMP deltamode_starttime INIT(TS_NEVER);
00046 GLOBAL TIMESTAMP deltamode_endtime INIT(TS_NEVER);
00047 GLOBAL double deltamode_endtime_dbl INIT(TSNVRDBL);
00048 GLOBAL TIMESTAMP deltamode_supersec_endtime INIT(TS_NEVER);
00049 GLOBAL double deltatimestep_running INIT(-1.0);
00051 GLOBAL double default_line_voltage INIT(120.0);
00052 GLOBAL double default_temperature_value INIT(59.0);
00053
00054 void schedule_deltamode_start(TIMESTAMP tstart);
00055 void allocate_deltamode_arrays(void);
00056
00057 #define UNKNOWN 0
00058
00059
00060 #ifdef OPTIONAL
00061
00062
00063 EXPORT int check(void);
00064
00065
00066 EXPORT int import_file(char *filename);
00067
00068
00069 EXPORT int export_file(char *filename);
00070
00071
00072 EXPORT int kmldump(FILE *fp, OBJECT *obj);
00073 #endif
00074
00075 #endif