climate/init.cpp

00001 // init.cpp
00002 
00003 #include <stdlib.h>
00004 #include <stdio.h>
00005 #include <errno.h>
00006 #include <math.h>
00007 #include "gridlabd.h"
00008 
00009 #include "climate.h"
00010 
00011 EXPORT CLASS *init(CALLBACKS *fntable, MODULE *module, int argc, char *argv[])
00012 {
00013     if (set_callback(fntable)==NULL)
00014     {
00015         errno = EINVAL;
00016         return NULL;
00017     }
00018 
00019     new climate(module);
00020 
00021     /* always return the first class registered */
00022     return climate::oclass;
00023 }
00024 
00025 
00026 CDECL int do_kill()
00027 {
00028     /* if global memory needs to be released, this is a good time to do it */
00029     return 0;
00030 }
00031 
00032 EXPORT int check(){
00033     /* if any climate objects have bad filenames, they'll fail on init() */
00034     return 0;
00035 }

GridLAB-DTM Version 1.0
An open-source project initiated by the US Department of Energy