FMI Library: part of JModelica.org
Functions
fmi1_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 fmi1_xml_unit_t fmi1_import_unit_t
 A variable unit defined with a unit defition. More...
 
typedef struct fmi1_xml_display_unit_t fmi1_import_display_unit_t
 A display unit. More...
 
typedef struct fmi1_xml_unit_definitions_t fmi1_import_unit_definitions_t
 The list of all the unit definitions in the model. More...
 

Functions

FMILIB_EXPORT unsigned int fmi1_import_get_unit_definitions_number (fmi1_import_unit_definitions_t *)
 Get the number of unit definitions. More...
 
FMILIB_EXPORT fmi1_import_unit_tfmi1_import_get_unit (fmi1_import_unit_definitions_t *, unsigned int index)
 Get a unit definition. More...
 
FMILIB_EXPORT const charfmi1_import_get_unit_name (fmi1_import_unit_t *)
 Get a unit name. More...
 
FMILIB_EXPORT unsigned int fmi1_import_get_unit_display_unit_number (fmi1_import_unit_t *)
 Get the number of display units associated with this unit. More...
 
FMILIB_EXPORT fmi1_import_display_unit_tfmi1_import_get_unit_display_unit (fmi1_import_unit_t *, size_t index)
 Get a display unit object by index. More...
 
FMILIB_EXPORT fmi1_import_unit_tfmi1_import_get_base_unit (fmi1_import_display_unit_t *)
 Get unit defition for a display unit. More...
 
FMILIB_EXPORT const charfmi1_import_get_display_unit_name (fmi1_import_display_unit_t *)
 Get display unit name. More...
 
FMILIB_EXPORT fmi1_real_t fmi1_import_get_display_unit_gain (fmi1_import_display_unit_t *)
 Get the "gain" associated with the display unit. More...
 
FMILIB_EXPORT fmi1_real_t fmi1_import_get_display_unit_offset (fmi1_import_display_unit_t *)
 Get the "offset" associated with the display unit. More...
 
FMILIB_EXPORT fmi1_real_t fmi1_import_convert_to_display_unit (fmi1_real_t value, fmi1_import_display_unit_t *du, int isRelativeQuantity)
 Convert a value measured in "units" to a value measured with "display units". More...
 
FMILIB_EXPORT fmi1_real_t fmi1_import_convert_from_display_unit (fmi1_real_t value, fmi1_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 fmi1_import_unit.h.