2 Copyright (C) 2012 Modelon AB
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the BSD style license.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 FMILIB_License.txt file for more details.
12 You should have received a copy of the FMILIB_License.txt file
13 along with this program. If not, contact Modelon AB <http://www.modelon.com>.
21 #include <fmilib_config.h>
24 @file jm_types.h Types used in the Utils module.
28 \defgroup jm_utils Utilities
32 /** \brief A constant string.*/
33 typedef const char* jm_string;
34 /** \brief A void pointer.*/
35 typedef void* jm_voidp;
37 /** \brief Mapping between a string and an integer ID */
38 typedef struct jm_name_ID_map_t {
43 /** \brief Return status codes */
46 jm_status_success = 0,
50 /** \brief Log levels supported via the logger functions in ::jm_callbacks */
52 jm_log_level_nothing = 0, /** \brief Must be first in this enum. May be usefull in application relying solely on jm_get_last_error() */
53 jm_log_level_fatal, /** \brief Unrecoverable errors */
54 jm_log_level_error, /** \brief Errors that may be not critical for some FMUs. */
55 jm_log_level_warning, /** \brief Non-critical issues */
56 jm_log_level_info, /** \brief Informative messages */
57 jm_log_level_verbose, /** \brief Verbose messages */
58 jm_log_level_debug, /** \brief Debug messages. Only enabled if library is configured with FMILIB_ENABLE_LOG_LEVEL_DEBUG */
59 jm_log_level_all /** \brief Must be last in this enum. */
62 /** \brief Convert log level into a string */
64 const char* jm_log_level_to_string(jm_log_level_enu_t level);