coral
A C++ library for distributed co-simulation
|
A class which represents an imported FMI 2.0 FMU. More...
#include "coral/fmi/fmu2.hpp"
Public Member Functions | |
coral::fmi::FMIVersion | FMIVersion () const override |
Which FMI standard version is used in this FMU. | |
const coral::model::SlaveTypeDescription & | Description () const override |
A description of this FMU. | |
std::shared_ptr< coral::fmi::SlaveInstance > | InstantiateSlave () override |
Creates a co-simulation slave instance of this FMU. | |
std::shared_ptr< coral::fmi::Importer > | Importer () const override |
Returns the coral::fmi::Importer which was used to import this FMU. | |
std::shared_ptr< SlaveInstance2 > | InstantiateSlave2 () |
Creates a new co-simulation slave instance. More... | |
const boost::filesystem::path & | Directory () const |
Returns the path to the directory in which this FMU was unpacked. | |
fmi2_value_reference_t | FMIValueReference (coral::model::VariableID variable) const |
Returns the FMI value reference for the variable with the given ID. More... | |
fmi2_import_t * | FmilibHandle () const |
Returns the underlying C API handle (for FMI Library) | |
A class which represents an imported FMI 2.0 FMU.
This class is an implementation of coral::fmi::FMU specialised for FMUs that implement FMI v2.0.
fmi2_value_reference_t coral::fmi::FMU2::FMIValueReference | ( | coral::model::VariableID | variable | ) | const |
Returns the FMI value reference for the variable with the given ID.
[in] | variable | The ID of a variable. Valid variable IDs are obtained by inspecting the variable list in the coral::model::SlaveTypeDescription returned by Description(). |
std::out_of_range | If there is no variable with the given ID. |
std::shared_ptr<SlaveInstance2> coral::fmi::FMU2::InstantiateSlave2 | ( | ) |
Creates a new co-simulation slave instance.
This is equivalent to InstantiateSlave(), except that the returned object is statically typed as an FMI 2.0 slave.