coral
A C++ library for distributed co-simulation
fmu.hpp
Go to the documentation of this file.
1 
10 #ifndef CORAL_FMI_FMU_HPP
11 #define CORAL_FMI_FMU_HPP
12 
13 #include <coral/model.hpp>
14 #include <coral/slave/instance.hpp>
15 
16 
17 namespace coral
18 {
19 namespace fmi
20 {
21 
22 
27 enum class FMIVersion
28 {
30  unknown = 0,
31 
33  v1_0 = 10000,
34 
36  v2_0 = 20000,
37 };
38 
39 
40 class Importer;
41 class SlaveInstance;
42 
50 class FMU
51 {
52 public:
54  virtual coral::fmi::FMIVersion FMIVersion() const = 0;
55 
57  virtual const coral::model::SlaveTypeDescription& Description() const = 0;
58 
60  virtual std::shared_ptr<SlaveInstance> InstantiateSlave() = 0;
61 
64 
65  virtual ~FMU() { }
66 };
67 
68 
71 {
72 public:
74  virtual std::shared_ptr<coral::fmi::FMU> FMU() const = 0;
75 
76  virtual ~SlaveInstance() { }
77 };
78 
79 
80 }} // namespace
81 #endif // header guard
An interface for classes that represent imported FMUs.
Definition: fmu.hpp:50
An FMI co-simulation slave instance.
Definition: fmu.hpp:70
Imports and caches FMUs.
Definition: importer.hpp:56
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
Defines the coral::slave::Instance interface.
Unknown (or possibly unsupported)
Main module header for coral::model.
An interface for classes that represent slave instances.
Definition: instance.hpp:42