core/object.c File Reference


Detailed Description

Id
object.c 1182 2008-12-22 22:08:36Z dchassin
Copyright (C) 2008 Battelle Memorial Institute

Definition in file object.c.

Go to the source code of this file.

Defines

#define QNAN   sqrt(-1)
 NaN quantity.

Functions

TIMESTAMP _object_sync (OBJECT *obj, TIMESTAMP ts, PASSCONFIG pass)
int object_build_object_array ()
 This will build (or rebuild) an array with all the instantiated GridLab-D objects placed at indices that correspond to their internal object ID.
int object_close_namespace ()
 Closes the current namespace.
OBJECTobject_create_array (CLASS *oclass, unsigned int n_objects)
 Create multiple objects.
OBJECTobject_create_foreign (OBJECT *obj)
 Create a foreign object.
OBJECTobject_create_single (CLASS *oclass)
 Create a single object.
NAMESPACEobject_current_namespace ()
 Get the current namespace.
int object_dump (char *outbuffer, int size, OBJECT *obj)
 Dump an object to a buffer.
OBJECTobject_find_by_id (OBJECTNUM id)
 Find an object by its id number.
OBJECTobject_find_name (OBJECTNAME name)
 Find an object from a name.
void * object_get_addr (OBJECT *obj, char *name)
 Get the address of a property value.
unsigned int object_get_count ()
 Get the number of objects defined.
OBJECTobject_get_first ()
 Get the first object in the model.
int object_get_namespace (OBJECT *obj, char *buffer, int size)
 Get full namespace of object's space.
OBJECTobject_get_next (OBJECT *obj)
 Get the next object in the model.
PROPERTY * object_get_property (OBJECT *obj, PROPERTYNAME name)
 Get a named property of an object.
OBJECTobject_get_reference (OBJECT *obj, char *name)
 Get a reference to another object.
char * object_get_unit (OBJECT *obj, char *name)
 Get the unit of an object, if any.
int object_get_value_by_addr (OBJECT *obj, void *addr, char *value, int size, PROPERTY *prop)
 Get a property value by reference to its physical address.
int object_get_value_by_name (OBJECT *obj, PROPERTYNAME name, char *value, int size)
 Get a value by reference to its property name.
int object_init (OBJECT *obj)
 Initialize an object.
int object_isa (OBJECT *obj, char *type)
 Tests the type of an object.
int object_locate_property (void *addr, OBJECT **pObj, PROPERTY **pProp)
 Locate the object and property corresponding the address of data.
char * object_name (OBJECT *obj)
 Get the name of an object.
void object_namespace (char *buffer, int size)
 Get the full namespace of current space.
int object_open_namespace (char *space)
 Opens a new namespace within the current name space.
OBJECTobject_remove_by_id (OBJECTNUM id)
 Removes a single object.
int object_saveall (FILE *fp)
 Save all the objects in the model to the stream fp in the .GLM format.
int object_saveall_xml (FILE *fp)
 Save all the objects in the model to the stream fp in the .XML format.
int object_saveall_xml_old (FILE *fp)
int object_select_namespace (char *space)
 Makes the namespace active.
int object_set_dependent (OBJECT *obj, OBJECT *dependent)
 Set the dependent of an object.
OBJECTNAME object_set_name (OBJECT *obj, OBJECTNAME name)
 Sets the name of an object.
int object_set_parent (OBJECT *obj, OBJECT *parent)
 Set the parent of an object.
int object_set_rank (OBJECT *obj, OBJECTRANK rank)
 Set the rank of an object but forcing it's parent to increase rank if necessary.
int object_set_value_by_addr (OBJECT *obj, void *addr, char *value, PROPERTY *prop)
 Set a property value by reference to its physical address.
int object_set_value_by_name (OBJECT *obj, PROPERTYNAME name, char *value)
 Set a property value by reference to its name.
TIMESTAMP object_sync (OBJECT *obj, TIMESTAMP ts, PASSCONFIG pass)
 Synchronize an object.
void remove_objects ()
 Convenience method use by the testing framework.


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