Players and recorders (tape)
[Runtime modules]


Detailed Description

Tape players and recorders are used to manage the boundary conditions and record properties of objects during simulation.

There are two kinds of players and two kinds of recorders:


Modules

 Collectors
 Tape collectors are different from recorders in that they aggregate multiple object properties into a single value.
 Players
 Tape players use the following properties
  • file specifies the source of the data.

 Recorders
 Tape recorders use the following additional properties
  • format specifies whether to use raw timestamp instead of date-time format
  • interval specifies the sampling interval to use (0 means every pass, -1 means only transients)
  • limit specifies the maximum length limit for the number of samples taken
  • trigger specifies a trigger condition on a property to start recording the condition is specified in the format property comparison value
  • The loop property is not available in recording.

 Shapers
 Shapers produce boundary conditions based on a shape, either by playing a scaled result that conforms to the defined shape, or producing a series of pulse-width modulated events of a set amplitude that aggregate over time to the given shape.
 File-based tapes
 Tape Files read or write comma-seperated values in a flat file on the local computer.
 Memory Tapes
 The Memory tape type was originally created to provide a work buffer for Matlab in memory space that GridLAB-D could access.
 ODBC Tapes
 ODBC-type tapes work on databases.

Defines

#define _STR(x)   #x
#define _TAPE_C
#define DLLOAD(P)   dlopen(P,RTLD_LAZY)
#define DLSYM(H, S)   dlsym(H,S)
#define LIBEXT   .so
#define LIBPREFIX   "lib"
#define MAP_DOUBLE(X, LO, HI)   {#X,VT_DOUBLE,&X,LO,HI}
#define MAP_END   {NULL}
#define MAP_INTEGER(X, LO, HI)   {#X,VT_INTEGER,&X,LO,HI}
#define MAP_STRING(X)   {#X,VT_STRING,X,sizeof(X),0}
#define STR(x)   _STR(x)

Typedefs

typedef void(*) CLOSEFUNC (void *)
typedef int(*) OPENFUNC (void *, char *, char *)
typedef char *(*) READFUNC (void *, char *, unsigned int)
typedef int(*) REWINDFUNC (void *)
typedef int(*) WRITEFUNC (void *, char *, char *)

Functions

EXPORT int check (void)
int do_kill ()
TAPEFUNCSget_ftable (char *mode)
EXPORT CLASSinit (CALLBACKS *fntable, void *module, int argc, char *argv[])

Variables

CLASScollector_class
CLASSplayer_class
CLASSrecorder_class
CLASSshaper_class
VARMAP varmap []


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