10 #ifndef CORAL_FMI_FMU2_HPP 11 #define CORAL_FMI_FMU2_HPP 17 #include <boost/filesystem/path.hpp> 19 #include <coral/config.h> 27 typedef unsigned int fmi2_value_reference_t;
52 const boost::filesystem::path&);
55 const boost::filesystem::path& fmuDir);
60 FMU2& operator=(
const FMU2&) =
delete;
81 const boost::filesystem::path&
Directory()
const;
101 boost::filesystem::path m_dir;
103 fmi2_import_t* m_handle;
140 bool adaptiveStepSize,
141 double relativeTolerance)
override;
143 void StartSimulation()
override;
144 void EndSimulation()
override;
169 fmi2_import_t* m_handle;
171 bool m_setupComplete =
false;
172 bool m_simStarted =
false;
179 #endif // header guard
FMU import functionality.
std::shared_ptr< SlaveInstance2 > InstantiateSlave2()
Creates a new co-simulation slave instance.
std::shared_ptr< coral::fmi::SlaveInstance > InstantiateSlave() override
Creates a co-simulation slave instance of this FMU.
Defines a version-independent FMU interface.
const boost::filesystem::path & Directory() const
Returns the path to the directory in which this FMU was unpacked.
An interface for classes that represent imported FMUs.
Definition: fmu.hpp:50
An FMI co-simulation slave instance.
Definition: fmu.hpp:70
const coral::model::SlaveTypeDescription & Description() const override
A description of this FMU.
coral::fmi::FMIVersion FMIVersion() const override
Which FMI standard version is used in this FMU.
A class which represents an imported FMI 2.0 FMU.
Definition: fmu2.hpp:47
A description of a slave type.
Definition: model.hpp:148
Definition: variable_io.hpp:28
FMIVersion
Constants that refer to FMI version numbers.
Definition: fmu.hpp:27
std::shared_ptr< coral::fmi::Importer > Importer() const override
Returns the coral::fmi::Importer which was used to import this FMU.
fmi2_value_reference_t FMIValueReference(coral::model::VariableID variable) const
Returns the FMI value reference for the variable with the given ID.
double TimeDuration
The type used to specify (simulation) time durations.
Definition: model.hpp:56
An FMI 2.0 co-simulation slave instance.
Definition: fmu2.hpp:116
fmi2_import_t * FmilibHandle() const
Returns the underlying C API handle (for FMI Library)
Main module header for coral::model.
double TimePoint
The type used to specify (simulation) time points.
Definition: model.hpp:42
std::shared_ptr< FMU > Import(const boost::filesystem::path &fmuPath)
Imports and loads an FMU.