FMI Library: part of JModelica.org
Functions
fmi2_import_unit.h File Reference

Public interface to the FMI import C-library. Handling of variable units. More...

#include <fmilib_config.h>

Go to the source code of this file.

Typedefs

Structures encapsulating unit information
typedef struct fmi2_xml_unit_t fmi2_import_unit_t
 A variable unit defined with a unit defition. More...
 
typedef struct fmi2_xml_display_unit_t fmi2_import_display_unit_t
 A display unit. More...
 
typedef struct fmi2_xml_unit_definitions_t fmi2_import_unit_definitions_t
 The list of all the unit definitions in the model. More...
 

Functions

FMILIB_EXPORT unsigned int fmi2_import_get_unit_definitions_number (fmi2_import_unit_definitions_t *)
 Get the number of unit definitions. More...
 
FMILIB_EXPORT fmi2_import_unit_tfmi2_import_get_unit (fmi2_import_unit_definitions_t *, unsigned int index)
 Get a unit definition. More...
 
FMILIB_EXPORT const charfmi2_import_get_unit_name (fmi2_import_unit_t *)
 Get a unit name. More...
 
FMILIB_EXPORT unsigned int fmi2_import_get_unit_display_unit_number (fmi2_import_unit_t *)
 Get the number of display units associated with this unit. More...
 
FMILIB_EXPORT const int * fmi2_import_get_SI_unit_exponents (fmi2_import_unit_t *)
 Get fmi2_SI_base_units_Num SI base units exponents associated with the unit. More...
 
FMILIB_EXPORT double fmi2_import_get_SI_unit_factor (fmi2_import_unit_t *)
 Get factor to the corresponding SI base units. More...
 
FMILIB_EXPORT double fmi2_import_get_SI_unit_offset (fmi2_import_unit_t *)
 Get offset to the corresponding SI base units. More...
 
FMILIB_EXPORT double fmi2_import_convert_to_SI_base_unit (double, fmi2_import_unit_t *)
 Convert a value with respect to the unit to the value with respect to the SI base unit. More...
 
FMILIB_EXPORT double fmi2_import_convert_from_SI_base_unit (double, fmi2_import_unit_t *)
 Convert a value with respect to the SI base unit to the value with respect to the unit. More...
 
FMILIB_EXPORT fmi2_import_display_unit_tfmi2_import_get_unit_display_unit (fmi2_import_unit_t *, size_t index)
 Get a display unit object by index. More...
 
FMILIB_EXPORT fmi2_import_unit_tfmi2_import_get_base_unit (fmi2_import_display_unit_t *)
 Get unit defition for a display unit. More...
 
FMILIB_EXPORT const charfmi2_import_get_display_unit_name (fmi2_import_display_unit_t *)
 Get display unit name. More...
 
FMILIB_EXPORT fmi2_real_t fmi2_import_get_display_unit_factor (fmi2_import_display_unit_t *)
 Get the "factor" associated with the display unit. More...
 
FMILIB_EXPORT fmi2_real_t fmi2_import_get_display_unit_offset (fmi2_import_display_unit_t *)
 Get the "offset" associated with the display unit. More...
 
FMILIB_EXPORT fmi2_real_t fmi2_import_convert_to_display_unit (fmi2_real_t value, fmi2_import_display_unit_t *du, int isRelativeQuantity)
 Convert a value measured in "units" to a value measured with "display units". More...
 
FMILIB_EXPORT fmi2_real_t fmi2_import_convert_from_display_unit (fmi2_real_t value, fmi2_import_display_unit_t *du, int isRelativeQuantity)
 Convert a value measured in "display units" to a value measured with "units". More...
 

Detailed Description

Public interface to the FMI import C-library. Handling of variable units.

Definition in file fmi2_import_unit.h.