FMI Library: part of JModelica.org
Functions
General information retrieval

Functions for retrieving general model information. Memory for the strings is allocated and deallocated in the module. All the functions take an FMU object as returned by fmi1_import_parse_xml() as a parameter. The information is retrieved from the XML file. More...

Functions

FMILIB_EXPORT const charfmi1_import_get_model_name (fmi1_import_t *fmu)
 Get model name. More...
 
FMILIB_EXPORT const charfmi1_import_get_model_identifier (fmi1_import_t *fmu)
 Get model identifier. More...
 
FMILIB_EXPORT const charfmi1_import_get_GUID (fmi1_import_t *fmu)
 Get FMU GUID. More...
 
FMILIB_EXPORT const charfmi1_import_get_description (fmi1_import_t *fmu)
 Get FMU description. More...
 
FMILIB_EXPORT const charfmi1_import_get_author (fmi1_import_t *fmu)
 Get FMU author. More...
 
FMILIB_EXPORT const charfmi1_import_get_model_version (fmi1_import_t *fmu)
 Get FMU version. More...
 
FMILIB_EXPORT const charfmi1_import_get_model_standard_version (fmi1_import_t *fmu)
 Get FMI standard version (always 1.0). More...
 
FMILIB_EXPORT const charfmi1_import_get_generation_tool (fmi1_import_t *fmu)
 Get FMU generation tool. More...
 
FMILIB_EXPORT const charfmi1_import_get_generation_date_and_time (fmi1_import_t *fmu)
 Get FMU generation date and time. More...
 
FMILIB_EXPORT fmi1_variable_naming_convension_enu_t fmi1_import_get_naming_convention (fmi1_import_t *fmu)
 Get variable naming convention used. More...
 
FMILIB_EXPORT unsigned int fmi1_import_get_number_of_continuous_states (fmi1_import_t *fmu)
 Get the number of contnuous states. More...
 
FMILIB_EXPORT unsigned int fmi1_import_get_number_of_event_indicators (fmi1_import_t *fmu)
 Get the number of event indicators. More...
 
FMILIB_EXPORT double fmi1_import_get_default_experiment_start (fmi1_import_t *fmu)
 Get the start time for default experiment as specified in the XML file. More...
 
FMILIB_EXPORT double fmi1_import_get_default_experiment_stop (fmi1_import_t *fmu)
 Get the stop time for default experiment as specified in the XML file. More...
 
FMILIB_EXPORT double fmi1_import_get_default_experiment_tolerance (fmi1_import_t *fmu)
 Get the tolerance default experiment as specified in the XML file. More...
 
FMILIB_EXPORT fmi1_fmu_kind_enu_t fmi1_import_get_fmu_kind (fmi1_import_t *fmu)
 Get the type of the FMU (model exchange or co-simulation) More...
 
FMILIB_EXPORT fmi1_import_capabilities_tfmi1_import_get_capabilities (fmi1_import_t *fmu)
 Get the structure with capability flags. More...
 
FMILIB_EXPORT fmi1_import_type_definitions_tfmi1_import_get_type_definitions (fmi1_import_t *)
 Get the list of all the type definitions in the model. More...
 
FMILIB_EXPORT fmi1_import_unit_definitions_tfmi1_import_get_unit_definitions (fmi1_import_t *fmu)
 Get a list of all the unit definitions in the model. More...
 
FMILIB_EXPORT fmi1_import_variable_list_tfmi1_import_get_direct_dependency (fmi1_import_t *fmu, fmi1_import_variable_t *)
 Get the direct dependency information. More...
 
FMILIB_EXPORT fmi1_import_variable_tfmi1_import_get_variable_alias_base (fmi1_import_t *fmu, fmi1_import_variable_t *)
 Get the variable with the same value reference that is not an alias. More...
 
FMILIB_EXPORT fmi1_import_variable_list_tfmi1_import_get_variable_aliases (fmi1_import_t *fmu, fmi1_import_variable_t *)
 
FMILIB_EXPORT fmi1_import_variable_list_tfmi1_import_get_variable_list (fmi1_import_t *fmu)
 Get the list of all the variables in the model. More...
 
FMILIB_EXPORT fmi1_import_variable_list_tfmi1_import_get_variable_list_alphabetical_order (fmi1_import_t *fmu)
 Get the list of all the variables in the model in alphabetical order. More...
 
FMILIB_EXPORT fmi1_import_variable_list_tfmi1_import_create_var_list (fmi1_import_t *fmu, fmi1_import_variable_t *v)
 Create a variable list with a single variable. More...
 

Detailed Description

Functions for retrieving general model information. Memory for the strings is allocated and deallocated in the module. All the functions take an FMU object as returned by fmi1_import_parse_xml() as a parameter. The information is retrieved from the XML file.

Function Documentation

FMILIB_EXPORT const char* fmi1_import_get_model_name ( fmi1_import_t fmu)

Get model name.

Parameters
fmuAn fmu object as returned by fmi1_import_parse_xml().
FMILIB_EXPORT const char* fmi1_import_get_model_identifier ( fmi1_import_t fmu)

Get model identifier.

Parameters
fmuAn fmu object as returned by fmi1_import_parse_xml().
FMILIB_EXPORT const char* fmi1_import_get_GUID ( fmi1_import_t fmu)

Get FMU GUID.

Parameters
fmuAn fmu object as returned by fmi1_import_parse_xml().
FMILIB_EXPORT const char* fmi1_import_get_description ( fmi1_import_t fmu)

Get FMU description.

Parameters
fmuAn fmu object as returned by fmi1_import_parse_xml().
FMILIB_EXPORT const char* fmi1_import_get_author ( fmi1_import_t fmu)

Get FMU author.

Parameters
fmuAn fmu object as returned by fmi1_import_parse_xml().
FMILIB_EXPORT const char* fmi1_import_get_model_version ( fmi1_import_t fmu)

Get FMU version.

Parameters
fmuAn fmu object as returned by fmi1_import_parse_xml().
FMILIB_EXPORT const char* fmi1_import_get_model_standard_version ( fmi1_import_t fmu)

Get FMI standard version (always 1.0).

Parameters
fmuAn fmu object as returned by fmi1_import_parse_xml().
FMILIB_EXPORT const char* fmi1_import_get_generation_tool ( fmi1_import_t fmu)

Get FMU generation tool.

Parameters
fmuAn fmu object as returned by fmi1_import_parse_xml().
FMILIB_EXPORT const char* fmi1_import_get_generation_date_and_time ( fmi1_import_t fmu)

Get FMU generation date and time.

Parameters
fmuAn fmu object as returned by fmi1_import_parse_xml().
FMILIB_EXPORT fmi1_variable_naming_convension_enu_t fmi1_import_get_naming_convention ( fmi1_import_t fmu)

Get variable naming convention used.

Parameters
fmuAn fmu object as returned by fmi1_import_parse_xml().
FMILIB_EXPORT unsigned int fmi1_import_get_number_of_continuous_states ( fmi1_import_t fmu)

Get the number of contnuous states.

FMILIB_EXPORT unsigned int fmi1_import_get_number_of_event_indicators ( fmi1_import_t fmu)

Get the number of event indicators.

FMILIB_EXPORT double fmi1_import_get_default_experiment_start ( fmi1_import_t fmu)

Get the start time for default experiment as specified in the XML file.

FMILIB_EXPORT double fmi1_import_get_default_experiment_stop ( fmi1_import_t fmu)

Get the stop time for default experiment as specified in the XML file.

FMILIB_EXPORT double fmi1_import_get_default_experiment_tolerance ( fmi1_import_t fmu)

Get the tolerance default experiment as specified in the XML file.

FMILIB_EXPORT fmi1_fmu_kind_enu_t fmi1_import_get_fmu_kind ( fmi1_import_t fmu)

Get the type of the FMU (model exchange or co-simulation)

FMILIB_EXPORT fmi1_import_capabilities_t* fmi1_import_get_capabilities ( fmi1_import_t fmu)

Get the structure with capability flags.

Returns
A pointer to the fmi1_import_capabilities_t allocated within the library. Note that for model exchange FMUs the values of all the flags are always default.
FMILIB_EXPORT fmi1_import_type_definitions_t* fmi1_import_get_type_definitions ( fmi1_import_t )

Get the list of all the type definitions in the model.

FMILIB_EXPORT fmi1_import_unit_definitions_t* fmi1_import_get_unit_definitions ( fmi1_import_t fmu)

Get a list of all the unit definitions in the model.

FMILIB_EXPORT fmi1_import_variable_list_t* fmi1_import_get_direct_dependency ( fmi1_import_t fmu,
fmi1_import_variable_t  
)

Get the direct dependency information.

Returns
A variable list is returned for variables with causality Output. Null pointer for others.
FMILIB_EXPORT fmi1_import_variable_t* fmi1_import_get_variable_alias_base ( fmi1_import_t fmu,
fmi1_import_variable_t  
)

Get the variable with the same value reference that is not an alias.

FMILIB_EXPORT fmi1_import_variable_list_t* fmi1_import_get_variable_aliases ( fmi1_import_t fmu,
fmi1_import_variable_t  
)

Get the list of all the variables aliased to the given one (including the base one).

Note that the list is ordered: base variable, aliases, negated aliases.

FMILIB_EXPORT fmi1_import_variable_list_t* fmi1_import_get_variable_list ( fmi1_import_t fmu)

Get the list of all the variables in the model.

Parameters
fmuAn FMU object as returned by fmi1_import_parse_xml().
Returns
a variable list with all the variables in the model.

Note that variable lists are allocated dynamically and must be freed when not needed any longer.

FMILIB_EXPORT fmi1_import_variable_list_t* fmi1_import_get_variable_list_alphabetical_order ( fmi1_import_t fmu)

Get the list of all the variables in the model in alphabetical order.

Parameters
fmuAn FMU object as returned by fmi1_import_parse_xml().
Returns
a variable list with all the variables in the model sorted in alphabetical order.

Note that variable lists are allocated dynamically and must be freed when not needed any longer.

FMILIB_EXPORT fmi1_import_variable_list_t* fmi1_import_create_var_list ( fmi1_import_t fmu,
fmi1_import_variable_t v 
)

Create a variable list with a single variable.

Parameters
fmuAn FMU object that this variable list will reference.
vA variable.