FMI Library: part of JModelica.org
|
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... | |
typedef struct fmi1_xml_unit_t fmi1_import_unit_t |
A variable unit defined with a unit defition.
Definition at line 41 of file fmi1_import_unit.h.
typedef struct fmi1_xml_display_unit_t fmi1_import_display_unit_t |
A display unit.
Definition at line 43 of file fmi1_import_unit.h.
typedef struct fmi1_xml_unit_definitions_t fmi1_import_unit_definitions_t |
The list of all the unit definitions in the model.
Definition at line 45 of file fmi1_import_unit.h.
FMILIB_EXPORT unsigned int fmi1_import_get_unit_definitions_number | ( | fmi1_import_unit_definitions_t * | ) |
Get the number of unit definitions.
FMILIB_EXPORT fmi1_import_unit_t* fmi1_import_get_unit | ( | fmi1_import_unit_definitions_t * | , |
unsigned int | index | ||
) |
Get a unit definition.
FMILIB_EXPORT const char* fmi1_import_get_unit_name | ( | fmi1_import_unit_t * | ) |
Get a unit name.
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.
FMILIB_EXPORT fmi1_import_display_unit_t* fmi1_import_get_unit_display_unit | ( | fmi1_import_unit_t * | , |
size_t | index | ||
) |
Get a display unit object by index.
index | The index of display unit to be returned. Must be less than the number returned by fmi1_import_get_unit_display_unit_number() |
FMILIB_EXPORT fmi1_import_unit_t* fmi1_import_get_base_unit | ( | fmi1_import_display_unit_t * | ) |
Get unit defition for a display unit.
FMILIB_EXPORT const char* fmi1_import_get_display_unit_name | ( | fmi1_import_display_unit_t * | ) |
Get display unit name.
FMILIB_EXPORT fmi1_real_t fmi1_import_get_display_unit_gain | ( | fmi1_import_display_unit_t * | ) |
Get the "gain" associated with the display unit.
FMILIB_EXPORT fmi1_real_t fmi1_import_get_display_unit_offset | ( | fmi1_import_display_unit_t * | ) |
Get the "offset" associated with the display unit.
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".
value | The value to be converted. |
du | The display unit object |
isRelativeQuantity | specifies if "offset" should be incorporated into conversion |
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".
value | The value to be converted. |
du | The display unit object |
isRelativeQuantity | specifies if "offset" should be incorporated into conversion |