fmu_logic
Last update: 19.09.2025This is the concrete Topic class that can be used for creation of a communication channel with given ...
Definition topic.h:38
An implementation of the IFmuLogic interface using the FMI4cpp library.
Definition fmu_logic.h:41
void EnterInitialization() override
Call fmi2EnterInitializationMode
void SetInputs(const FmuInOutMap &inputs) override
Set the fmu inputs.
FmuState GetFmuState() const
Get the Fmu state.
void SetValue(const std::string &variable_name, const T &value)
Modify or set a parameter for a single variable in the FMU.
T GetOutput(const std::string &variable_name) const
Get the value of a single variable from the FMU.
void SetupExperiment(double start=0, double stop=0, double tolerance=0) override
Call fmi2SetupExperiment
fmi4cpp::status GetLastStatus() const
Get the status from the last fmi2 function call.
FmuInOutMap InitInOutMap(std::set< std::string > variable_names) override
Use the internal implementation to initialize the inputs or outputs with the correct underlying type.
const fmi::fmu * GetFmuPtr() const
Get the pointer to the FMU object.
const fmi::cs_fmu * GetCsFmuPtr() const
Get the pointer to the Co-simulation FMU object.
void ExitInitialization() override
Call fmi2ExitInitializationMode
FmuLogic(const std::string &fmu_path)
Constructor for FmuLogic.
double GetSimulationTime() const
Get the simulation time.
void Setup(double start=0, double stop=0, double tolerance=0) override
Call SetupExperiment, EnterInitialization, and ExitInitialization.
bool Step(double step_size, const FmuInOutMap &input) override
Set the fmu inputs and step the FMU model for given step size by calling fmi2DoStep
const fmi::cs_slave * GetFmuInstancePtr() const
Get the pointer to the Co-simulation FMU instance object.
FmuInOutMap GetOutputs() const override
Get all fmu outputs.
The interface for FMU Logic to be used by an FMU activity.
Definition i_fmu_logic.h:26
The namespace for all core functionalities under namespace simulation_framework.
Definition fmu_logic.h:12
The top namespace for simulation framework.