Typedefs | Functions

Library Manifest Generation

Library manifest description functions and types. More...

Typedefs

typedef void *(* dsim_library_description_function_t )()
 Type signature for a library's dsim_library_manifest function.

Functions

void * dsim_create_library_manifest (const char *identifier, const char *library_name, const char *library_description)
 Create and initialize a library manifest object to describe the containing library.
void dsim_add_integrator (void *manifest, const char *integrator_type, const char *class_name, const char *integrator_name, const char *integrator_description)
 Add a description of an integrator contained within the library to a previously created manfiest object.
void dsim_add_model (void *manifest, const char *model_type, const char *class_name, const char *model_name, const char *model_description)
 Add a description of a model contained within the library to a previously created manifest object.

Detailed Description

Library manifest description functions and types.

All libraries containing models and integrators for use with DSim should contain a manifest description function with a signature conforming to dsim_library_description_function_t and named "dsim_library_manifest". This function will in turn use the functions in this module to create and fill out a manifest describing the library.


Function Documentation

void dsim_add_integrator ( void *  manifest,
const char *  integrator_type,
const char *  class_name,
const char *  integrator_name,
const char *  integrator_description 
)

Add a description of an integrator contained within the library to a previously created manfiest object.

Add a description of an integrator contained within the library to the manifest for that library.

Parameters:
manifestThe manifest description object for the library, created via dsim_create_library_manifest()
integrator_typeThe type of the integrator, which must be unique within the library. A function with the same name and C linkage should be present which matches the dsim_integrator_factory_t function signature.
class_nameThe name of the class that implements this integrator. Used to provide template-generation functionality.
integrator_nameA human readable name for this integrator.
integrator_descriptionA human readable description of the operation of this integrator.
void dsim_add_model ( void *  manifest,
const char *  model_type,
const char *  class_name,
const char *  model_name,
const char *  model_description 
)

Add a description of a model contained within the library to a previously created manifest object.

Add a description of a model contained within the library to the manifest for that library.

Parameters:
manifestThe manifest description object for the library, created via dsim_create_library_manifest()
model_typeThe type of the model, which must be unique within the library. A function with the same name and C linkage should be present which matches the dsim_model_factory_t function signature.
class_nameThe name of the class that implements this model. Used to provide template-generation functionality.
model_nameA human readable name for this model.
model_descriptionA human readable description of the operation of this model.
void* dsim_create_library_manifest ( const char *  identifier,
const char *  library_name,
const char *  library_description 
)

Create and initialize a library manifest object to describe the containing library.

All external libraries containing DSim models and objects should contain a manifest function. The function should have C linkage and should be named "dsim_library_manifest". It should also conform to the type signature given by dsim_library_description_function_t

That function should call dsim_create_library_manifest() to initialize a manifest object describing the containing library. It should then call dsim_add_integrator() and dsim_add_model() as many times as necessary to describe the models an integrators contained within the library, and should finally return the created manifest object.

Parameters:
identifierAn identifier for the described library, expected to be in reverse-dns notation (ie, com.psatellite.example). Used to uniquely identify this library.
library_nameA human-readable name to be displayed to users when the library is referred to.
library_descriptionA human-readable description of the library for the benefit of users.
Returns:
A created manifest description object, which should then be provided as the first parameter to calls to dsim_add_integrator() and dsim_add_model() before being returned from a dsim_library_manifest function.
 All Classes Files Functions Typedefs Enumerations Enumerator