Memory Tapes
[Players and recorders (tape)]

The Memory tape type was originally created to provide a work buffer for Matlab in memory space that GridLAB-D could access. More...

Functions

int open_shaper (struct shaper *my, char *fname, char *flags)

Detailed Description

The Memory tape type was originally created to provide a work buffer for Matlab in memory space that GridLAB-D could access.

It works by allocating a large block of memory as a global variable, which can be accessed at any time by any module. The tapes specifically wrap this allocated block with tape functionality.

The global variables referenced by a Memory tape MUST exist before the tape attempts to “open” them during the first sync call, and the user must include the size limits in the tape properties to prevent memory overflow. There does not appear to be any method to data-drive the data to or from files. The contents of a Memory tape must be set or retrieved programmatically.

Memory types are arranged as an interleaved array of double timestamps and double values within a malloc’ed block. Properly arranging these values, and not overrunning the buffer, is the responsibility of the user.


Function Documentation

int open_shaper ( struct shaper *  my,
char *  fname,
char *  flags 
)

Todo:
finish write memory shaper -- it still uses files (no ticket)
Todo:
shape defaults should be read from the shape memory, or better yet, inferred from it (no ticket)

Definition at line 175 of file tape_memory.cpp.


GridLAB-D™ Version 4.1
An open-source smart grid simulator created by PNNL for the US Department of Energy Office of Electricity