fmu_base_activity
Last update: 16.07.2025This is the concrete Topic class that can be used for creation of a communication channel with given ...
Definition topic.h:38
This is the basic implementation of IActivity interface. Inheriting classes, i.e. a concrete simulati...
Definition base_activity.h:78
An activity that subscribes to messages to input to an FMU and publishes the FMU output.
Definition fmu_base_activity.h:31
virtual void ExecuteStep() override
Sets FMU inputs from subscribed topics, steps the FMU, and gets FMU outputs ready for published topic...
FmuConfig fmu_config_
A struct containing information about topics and corresponding FMU variables.
Definition fmu_base_activity.h:79
std::optional< double > step_size_
The step size to increment the FMU's independent variable.
Definition fmu_base_activity.h:85
virtual void Init() override
Initialize FMU parameters.
std::unique_ptr< IFmuLogic > fmu_logic_
A pointer to the logic that manages simulating the FMU.
Definition fmu_base_activity.h:82
rtidds::FmuMessage EncodeMessage(const FmuInOutMap &outputs)
Put the outputs from the IFmuLogic implementation into an FmuMessage to be published.
FmuTopicToVarMap input_topics_to_var_map_
A mapping of input topics to FMU variables.
Definition fmu_base_activity.h:88
FmuTopicToVarMap output_topics_to_var_map_
A mapping of output topics to FMU variables.
Definition fmu_base_activity.h:91
virtual void AddPublisherAndSubscriber() override
Adds publishers and subscribers of rtidds::FmuMessage based on information from FmuConfig.
FmuInOutMap DecodeBytesMessage(const rtidds::GenericBytesMessage &message)
Put the received GenericBytes values in a format understood by the IFmuLogic implementation.
FmuInOutMap DecodeMessage(const rtidds::FmuMessage &message)
Put the received FmuMessage values in a format understood by the IFmuLogic implementation.
rtidds::GenericBytesMessage EncodeBytesMessage(const FmuInOutMap &outputs)
Put the outputs from the IFmuLogic implementation into an GenericBytes to be published.
FmuBaseActivity(const std::string &name, std::shared_ptr< CommunicationManager > communication_manager, std::unique_ptr< scheduling::ISchedulerClient > scheduler_client, FmuConfig fmu_config, std::unique_ptr< IFmuLogic > fmu_logic, const std::optional< double > step_size=std::nullopt)
Construct an FMU activity to join the simulation.
The namespace for all core functionalities under namespace simulation_framework.
The top namespace for simulation framework.
A helper struct to pass necessary information to create FmuBaseActivity.
Definition fmu_config.h:33