]> gerrit.simantics Code Review - simantics/fmil.git/blob - org.simantics.fmil.core/native/FMUSimulator/include/FMIL/Util/FMI/fmi_util.h
Mavenized FMIL projects.
[simantics/fmil.git] / org.simantics.fmil.core / native / FMUSimulator / include / FMIL / Util / FMI / fmi_util.h
1 /*
2     Copyright (C) 2012 Modelon AB
3
4     This program is free software: you can redistribute it and/or modify
5     it under the terms of the BSD style license.
6
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.
11
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>.
14 */
15
16 #ifndef FMI_UTIL_H
17 #define FMI_UTIL_H
18 #include <fmilib_config.h>
19 #include <JM/jm_callbacks.h>
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 /**
26         @file fmi_util.h 
27         \brief Some low-level utility functions suitable for all standards.
28
29         */
30 /** \addtogroup jm_utils
31   * @{
32 */
33 /** \brief Given directory name fmu_unzipped_path and construct the directory path for Dll/so\r
34         \param fmu_unzipped_path Directory name where FMU is unpacked.\r
35         \param callbacks Callbacks for memory allocation.\r
36         @return Pointer to a string with the directory name (last symbol is directory separator). Caller is responsible for freeing the memory.\r
37 */\r
38 FMILIB_EXPORT char* fmi_construct_dll_dir_name(jm_callbacks* callbacks, const char* fmu_unzipped_path);
39
40 /** \brief Given model_identifier construct the dll/so name by adding platform suffix\r
41         \param callbacks Callbacks for memory allocation.\r
42         \param dll_dir_name Directory path for Dll/so as returned by fmi_construct_dll_dir_name\r
43         \param model_identifier The FMU model identifier.\r
44         @return Pointer to a string with the file name. Caller is responsible for freeing the memory.\r
45 */\r
46 FMILIB_EXPORT char* fmi_construct_dll_file_name(jm_callbacks* callbacks, const char* dll_dir_name, const char* model_identifier);
47
48 /** @} */
49 #ifdef __cplusplus
50 }
51 #endif
52
53 /* FMI_UTIL_H */
54 #endif