coral
A C++ library for distributed co-simulation
Public Member Functions | List of all members
coral::fmi::FMU2 Class Reference

A class which represents an imported FMI 2.0 FMU. More...

#include "coral/fmi/fmu2.hpp"

Inheritance diagram for coral::fmi::FMU2:
coral::fmi::FMU std::enable_shared_from_this< FMU2 >

Public Member Functions

coral::fmi::FMIVersion FMIVersion () const override
 Which FMI standard version is used in this FMU.
 
const coral::model::SlaveTypeDescriptionDescription () const override
 A description of this FMU.
 
std::shared_ptr< coral::fmi::SlaveInstanceInstantiateSlave () override
 Creates a co-simulation slave instance of this FMU.
 
std::shared_ptr< coral::fmi::ImporterImporter () const override
 Returns the coral::fmi::Importer which was used to import this FMU.
 
std::shared_ptr< SlaveInstance2InstantiateSlave2 ()
 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)
 

Detailed Description

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.

Member Function Documentation

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.

Parameters
[in]variableThe ID of a variable. Valid variable IDs are obtained by inspecting the variable list in the coral::model::SlaveTypeDescription returned by Description().
Exceptions
std::out_of_rangeIf 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.


The documentation for this class was generated from the following file: