FMI Library: part of JModelica.org
|
Go to the source code of this file.
Data Structures | |
struct | jm_callbacks |
The callbacks struct is sent to all the modules in the library. More... | |
Macros | |
#define | JM_MAX_ERROR_MESSAGE_SIZE 2000 |
Maximum message size that can be stored in the jm_callbacks struct. More... | |
Typedefs | |
typedef struct jm_callbacks | jm_callbacks |
typedef void(* | jm_logger_f) (jm_callbacks *c, jm_string module, jm_log_level_enu_t log_level, jm_string message) |
Logger callback type. More... | |
Memory management callbacks | |
jm_malloc_f, jm_realloc_f, jm_calloc_f, jm_free_f function types correspond to the standard C memory management functions | |
typedef jm_voidp(* | jm_malloc_f) (size_t size) |
Allocation function type. More... | |
typedef jm_voidp(* | jm_realloc_f) (void *ptr, size_t size) |
Re-allocation function type. More... | |
typedef jm_voidp(* | jm_calloc_f) (size_t numitems, size_t itemsize) |
Zero-initialized allocation function type. More... | |
typedef void(* | jm_free_f) (jm_voidp p) |
Free memory function type. More... | |
Functions | |
static jm_string | jm_get_last_error (jm_callbacks *cb) |
Get the last log message produced by the library. More... | |
static void | jm_clear_last_error (jm_callbacks *cb) |
Clear the last generated log message. More... | |
FMILIB_EXPORT void | jm_set_default_callbacks (jm_callbacks *c) |
Set the structure to be returned by jm_get_default_callbacks(). More... | |
FMILIB_EXPORT jm_callbacks * | jm_get_default_callbacks (void) |
Get default callbacks. The function never returns NULL. More... | |
FMILIB_EXPORT void | jm_default_logger (jm_callbacks *c, jm_string module, jm_log_level_enu_t log_level, jm_string message) |
The default logger implementation prints messages to stderr. More... | |
FMILIB_EXPORT void | jm_log (jm_callbacks *cb, const char *module, jm_log_level_enu_t log_level, const char *fmt,...) |
Send a message to the logger function. More... | |
FMILIB_EXPORT void | jm_log_v (jm_callbacks *cb, const char *module, jm_log_level_enu_t log_level, const char *fmt, va_list ap) |
Send a message to the logger function. More... | |
FMILIB_EXPORT void | jm_log_fatal_v (jm_callbacks *cb, const char *module, const char *fmt, va_list ap) |
Send a fatal error message to the logger function. See jm_log() for details. More... | |
FMILIB_EXPORT void | jm_log_fatal (jm_callbacks *cb, const char *module, const char *fmt,...) |
Send a fatal error message to the logger function. See jm_log() for details. More... | |
FMILIB_EXPORT void | jm_log_error_v (jm_callbacks *cb, const char *module, const char *fmt, va_list ap) |
Send a error message to the logger function. See jm_log() for details. More... | |
FMILIB_EXPORT void | jm_log_error (jm_callbacks *cb, const char *module, const char *fmt,...) |
Send a error message to the logger function. See jm_log() for details. More... | |
FMILIB_EXPORT void | jm_log_warning_v (jm_callbacks *cb, const char *module, const char *fmt, va_list ap) |
Send a warning message to the logger function. See jm_log() for details. More... | |
FMILIB_EXPORT void | jm_log_warning (jm_callbacks *cb, const char *module, const char *fmt,...) |
Send a warning message to the logger function. See jm_log() for details. More... | |
FMILIB_EXPORT void | jm_log_info_v (jm_callbacks *cb, const char *module, const char *fmt, va_list ap) |
Send an info message to the logger function. See jm_log() for details. More... | |
FMILIB_EXPORT void | jm_log_info (jm_callbacks *cb, const char *module, const char *fmt,...) |
Send an info message to the logger function. See jm_log() for details. More... | |
FMILIB_EXPORT void | jm_log_verbose_v (jm_callbacks *cb, const char *module, const char *fmt, va_list ap) |
Send a verbose message to the logger function. See jm_log() for details. More... | |
FMILIB_EXPORT void | jm_log_verbose (jm_callbacks *cb, const char *module, const char *fmt,...) |
Send a verbose message to the logger function. See jm_log() for details. More... | |
static void | jm_log_debug_v (jm_callbacks *cb, const char *module, const char *fmt, va_list ap) |
Send a debug message to the logger function. See jm_log() for details. More... | |
static void | jm_log_debug (jm_callbacks *cb, const char *module, const char *fmt,...) |
Send a debug message to the logger function. See jm_log() for details. More... | |
Definition of jm_callbacks and supporting functions
Definition in file jm_callbacks.h.