Class simulation_framework::core::lifecycle::IActivityFactory
Last update: 22.04.2026
Definition: core/lifecycle/i_activity_factory/i_activity_factory.h (line 32)
Interface for creating simulation activities.
The IActivityFactory interface provides methods for creating activity instances based on specified types and configurations. It also allows for managing the base cycle time of simulations.
See also: IActivity, FmuConfig
Inherited by:
Members
Public functions
Function ~IActivityFactory
virtual simulation_framework::core::lifecycle::IActivityFactory::~IActivityFactory()=default
Virtual destructor for proper cleanup of derived classes.
Return type:
Function Create
virtual std::unique_ptr< IActivity > simulation_framework::core::lifecycle::IActivityFactory::Create(const std::string &activity_name, const scheduling::SchedulerClientType type=scheduling::SchedulerClientType::kDUMMY)=0
Creates an activity instance based on the provided name and type.
This method is used to create a standard activity with the specified name and scheduler client type.
Parameters:
- activity_name: The name of the activity to create.
- type: The type of the activity client, defaulting to
SchedulerClientType::kDUMMY.
Returns:
A unique pointer to the created IActivity instance.
Parameters:
- const std::string & activity_name
- const scheduling::SchedulerClientType type = scheduling::SchedulerClientType::kDUMMY
Return type: std::unique_ptr< IActivity >
Reimplemented by:
Function CreateFmuActivity
virtual std::unique_ptr< IActivity > simulation_framework::core::lifecycle::IActivityFactory::CreateFmuActivity(const std::string &activity_name, const FmuConfig &fmu_config, const scheduling::SchedulerClientType type=scheduling::SchedulerClientType::kDUMMY)=0
Creates an FMU-based activity instance.
This method creates an activity based on the provided FMU (Functional Mock-up Unit) configuration.
Parameters:
- activity_name: The name of the FMU activity to create.
- fmu_config: The FMU configuration details.
- type: The type of the activity client, defaulting to
SchedulerClientType::kDUMMY.
Returns:
A unique pointer to the created FMU-based IActivity instance.
Parameters:
- const std::string & activity_name
- const FmuConfig & fmu_config
- const scheduling::SchedulerClientType type = scheduling::SchedulerClientType::kDUMMY
Return type: std::unique_ptr< IActivity >
Reimplemented by:
Function GetSimulationBaseCycleTime
virtual time::milliseconds simulation_framework::core::lifecycle::IActivityFactory::GetSimulationBaseCycleTime() const =0
Retrieves the simulation's base cycle time.
The base cycle time determines the frequency of activity execution in the simulation.
Returns:
The base cycle time as a duration in milliseconds.
Return type: time::milliseconds
Reimplemented by:
Function SetSimulationBaseCycleTime
virtual void simulation_framework::core::lifecycle::IActivityFactory::SetSimulationBaseCycleTime(const time::milliseconds &time)=0
Sets the simulation's base cycle time.
Adjusts the frequency of activity execution by updating the base cycle time.
Parameters:
- time: The new base cycle time as a duration in milliseconds.
Parameters:
- const time::milliseconds & time
Return type: void
Reimplemented by: