// comments are preceded by two slashes, which must follow a white-space #set urlbase=http://www.nowhere.net/ // www.nowhere.net/ is not a comment
${varname} syntax. First global variables are matched, and if none is found, then environment variables are matched. If the global variable name is provided in the form ${module::varname} then the module global is substituted if it exists..${varname/from/to} and ${varname//from/to}.#set <global>="<value>" // sets the existing global variable to the value #define <global>="<value>" // defines a new global variable as the value #setenv <variable>=<expression> // set the environment variable to the expression #include "<file>" // includes the file in the load process #if <expression> // includes the text if expression is non-zero otherwise includes alternate ... <text> ... #else ... <alternate> ... #endif #ifdef <global> // includes the text if global is defined otherwise includes alternate ... <text> ... #else ... <alternate> ... #endif #ifndef <global> // includes the text if global is undefined otherwise includes alternate ... <text> ... #else ... <alternate> ... #endif #ifexist <file> // includes the text if file exists otherwise includes alternate ... <text> ... #else ... <alternate> ... #endif #print <expression> // displays the expression on the output stream #error <expression> // displays the expression on the error stream and fails the load #warning <expression> // displays the warning on the warning stream
The following blocks are recognized at the root level:
clock {
timezone "ZZZTTTZZZ"; // sets the timezone to use for the simulation
timestamp "YYYY-MM-DD HH:MM:SS ZZZ"; // sets the global clock starting time
}
global {
<global> <expression>; // sets the global to the expression
}
module {
<variable> <expression>; // sets the module variable to expression
class <class> { // verifies existing static class
<type> <property>[<unit>]; // defines /verifies a property in class
}
}
class <class> { // creates a new runtime class
// publish a GridLAB-D property
<type> <property>[<unit>];
// define an intrinsic function (i.e., create, init, presync, sync, postsync, etc.)
intrinsic <name> ( <arglist> )
{
<C++ code>
};
// embed a C++ member variable or function
public|protected|private <C++ member definition>;
// declare a function in another class
function <class-name>::<function-name>;
// publish a C++ member function
export <C++ member definition>;
}
object <class>[:<spec>] { // spec may be <id>, or <startid>..<endid>, or ..<count>
<property> <expression>;
[parent] object ...; // create a child object
<object-property> object ...; // reference another object
}
Functions | |
| STATUS | loadall (char *file) |
| Load a file. | |
| STATUS | loadall_glm (char *file) |
| STATUS | loadall_glm_roll (char *file) |
| STATUS loadall | ( | char * | file | ) |
Load a file.
Definition at line 5121 of file load.c.
References find_file(), loadall_glm_roll(), object_get_count(), output_error(), and output_warning().
Referenced by cmdarg_load(), and cmex_load().
| STATUS loadall_glm | ( | char * | file | ) |
| file | a pointer to the first character in the file name string |
Definition at line 4941 of file load.c.
References object_get_count(), object_get_first(), object_set_parent(), output_error(), output_error_raw(), and output_verbose().
| STATUS loadall_glm_roll | ( | char * | file | ) |
| file | a pointer to the first character in the file name string |
Definition at line 5024 of file load.c.
References object_get_count(), object_get_first(), object_set_parent(), output_error(), output_error_raw(), and output_verbose().
Referenced by loadall().