FMI Library: part of JModelica.org
Modules | Data Structures | Typedefs | Enumerations | Functions
Utilities

Modules

 A basic stack
 
 Functions and types supporting FMI 1.0 processing.
 
 Functions and types supporting FMI 2.0 processing.
 
 Definition of callbacks struct and supporting functions
 
 Named objects
 
 Handling platform specific defines and functions
 
 A set of strings
 
 A vector of items (dynamic array)
 

Data Structures

struct  jm_name_ID_map_t
 Mapping between a string and an integer ID. More...
 

Typedefs

typedef const charjm_string
 A constant string. More...
 
typedef void * jm_voidp
 A void pointer. More...
 
typedef struct jm_name_ID_map_t jm_name_ID_map_t
 Mapping between a string and an integer ID. More...
 

Enumerations

enum  fmi_version_enu_t { fmi_version_unknown_enu = 0, fmi_version_1_enu, fmi_version_2_0_enu, fmi_version_unsupported_enu }
 Suported versions of FMI standard. More...
 
enum  jm_status_enu_t { jm_status_error = -1, jm_status_success = 0, jm_status_warning = 1 }
 Return status codes. More...
 
enum  jm_log_level_enu_t {
  jm_log_level_nothing = 0, jm_log_level_fatal, jm_log_level_error, jm_log_level_warning,
  jm_log_level_info, jm_log_level_verbose, jm_log_level_debug, jm_log_level_all
}
 Log levels supported via the logger functions in jm_callbacks. More...
 

Functions

FMILIB_EXPORT charfmi_construct_dll_dir_name (jm_callbacks *callbacks, const char *fmu_unzipped_path)
 Given directory name fmu_unzipped_path and construct the directory path for Dll/so. More...
 
FMILIB_EXPORT charfmi_construct_dll_file_name (jm_callbacks *callbacks, const char *dll_dir_name, const char *model_identifier)
 Given model_identifier construct the dll/so name by adding platform suffix. More...
 
FMILIB_EXPORT const charfmi_version_to_string (fmi_version_enu_t v)
 
FMILIB_EXPORT const charjm_log_level_to_string (jm_log_level_enu_t level)
 Convert log level into a string. More...
 

Detailed Description

Typedef Documentation

typedef const char* jm_string

A constant string.

Definition at line 33 of file jm_types.h.

typedef void* jm_voidp

A void pointer.

Definition at line 35 of file jm_types.h.

Mapping between a string and an integer ID.

Enumeration Type Documentation

Suported versions of FMI standard.

Enumerator
fmi_version_unknown_enu 
fmi_version_1_enu 
fmi_version_2_0_enu 
fmi_version_unsupported_enu 

Definition at line 34 of file fmi_version.h.

Return status codes.

Enumerator
jm_status_error 
jm_status_success 
jm_status_warning 

Definition at line 44 of file jm_types.h.

Log levels supported via the logger functions in jm_callbacks.

Enumerator
jm_log_level_nothing 
jm_log_level_fatal 

Must be first in this enum. May be usefull in application relying solely on jm_get_last_error()

jm_log_level_error 

Unrecoverable errors.

jm_log_level_warning 

Errors that may be not critical for some FMUs.

jm_log_level_info 

Non-critical issues.

jm_log_level_verbose 

Informative messages.

jm_log_level_debug 

Verbose messages.

jm_log_level_all 

Debug messages. Only enabled if library is configured with FMILIB_ENABLE_LOG_LEVEL_DEBUG.

Must be last in this enum.

Definition at line 51 of file jm_types.h.

Function Documentation

FMILIB_EXPORT char* fmi_construct_dll_dir_name ( jm_callbacks callbacks,
const char fmu_unzipped_path 
)

Given directory name fmu_unzipped_path and construct the directory path for Dll/so.

Parameters
fmu_unzipped_pathDirectory name where FMU is unpacked.
callbacksCallbacks for memory allocation.
Returns
Pointer to a string with the directory name (last symbol is directory separator). Caller is responsible for freeing the memory.
FMILIB_EXPORT char* fmi_construct_dll_file_name ( jm_callbacks callbacks,
const char dll_dir_name,
const char model_identifier 
)

Given model_identifier construct the dll/so name by adding platform suffix.

Parameters
callbacksCallbacks for memory allocation.
dll_dir_nameDirectory path for Dll/so as returned by fmi_construct_dll_dir_name
model_identifierThe FMU model identifier.
Returns
Pointer to a string with the file name. Caller is responsible for freeing the memory.
FMILIB_EXPORT const char* fmi_version_to_string ( fmi_version_enu_t  v)

Convert version enum into string

FMILIB_EXPORT const char* jm_log_level_to_string ( jm_log_level_enu_t  level)

Convert log level into a string.