17 #ifndef AGXFMI2_IMPORT_MODULE_H
18 #define AGXFMI2_IMPORT_MODULE_H
20 #include <agx/config/AGX_USE_FMI.h>
32 #include <JM/jm_callbacks.h>
33 #include <FMI/fmi_import_context.h>
34 #include <FMI2/fmi2_functions.h>
35 #include <FMI2/fmi2_import.h>
36 #include <FMI2/fmi2_types.h>
65 LOG_LEVEL_NOTHING = jm_log_level_nothing,
66 LOG_LEVEL_FATAL = jm_log_level_fatal,
67 LOG_LEVEL_ERROR = jm_log_level_error,
68 LOG_LEVEL_WARNING = jm_log_level_warning,
69 LOG_LEVEL_INFO = jm_log_level_info,
70 LOG_LEVEL_VERBOSE = jm_log_level_verbose,
71 LOG_LEVEL_DEBUG = jm_log_level_debug,
72 LOG_LEVEL_ALL = jm_log_level_all
75 const VariableRefVector& getVariables()
const;
77 agxFMI2::Import::Variable *getVariable(
const agx::Name& name);
79 void instantiate(
bool visible);
80 void init(fmi2_real_t tStart, fmi2_real_t tEnd, fmi2_boolean_t stopTimeDefined =
true);
83 bool isInstantiated()
const;
87 Export::Module *getAgxExportModule();
94 fmi2_status_t getDirectionalDerivative(
const fmi2_value_reference_t vKnown_ref[] ,
size_t nKnown,
const fmi2_value_reference_t vUnknown_ref[],
size_t nUnknown,
const fmi2_real_t dvKnown[], fmi2_real_t dvUnknown[]);
98 fmi2_import_t *getFmuImpl()
const;
102 Module(Master *master,
const agx::String& zipPath, LogLevel logLevel = LOG_LEVEL_INFO);
103 static void jmLogger_dispatch(jm_callbacks* c, jm_string module, jm_log_level_enu_t log_level, jm_string message);
104 void jmLogger(jm_string module, jm_log_level_enu_t log_level, jm_string message);
112 bool m_ownUnpackedData;
115 jm_callbacks m_jmCallbacks;
116 fmi_import_context_t *m_context;
117 fmi2_import_t *m_fmu;
118 fmi2_callback_functions_t m_fmi2callbackFunctions;
119 VariableRefVector m_variables;
122 Export::Module *m_agxExportModule;