simulation_framework::core::lifecycle::IActivityFactory Class Reference
Last update: 19.09.2025Interface for creating simulation activities. More...
#include <i_activity_factory.h>

Public Member Functions | |
| virtual | ~IActivityFactory ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
| virtual std::unique_ptr< IActivity > | 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. | |
| virtual std::unique_ptr< IActivity > | CreateFmuActivity (const std::string &activity_name, const FmuConfig &fmu_config, const scheduling::SchedulerClientType type=scheduling::SchedulerClientType::kDUMMY)=0 |
| Creates an FMU-based activity instance. | |
| virtual time::milliseconds | GetSimulationBaseCycleTime () const =0 |
| Retrieves the simulation's base cycle time. | |
| virtual void | SetSimulationBaseCycleTime (const time::milliseconds &time)=0 |
| Sets the simulation's base cycle time. | |
Detailed Description
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.
Definition at line 30 of file i_activity_factory.h.
Member Function Documentation
◆ Create()
|
pure virtual |
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
IActivityinstance.
Implemented in simulation_framework::autonomy::ActivityFactory.
◆ CreateFmuActivity()
|
pure virtual |
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
IActivityinstance.
Implemented in simulation_framework::autonomy::ActivityFactory.
◆ GetSimulationBaseCycleTime()
|
pure virtual |
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.
Implemented in simulation_framework::autonomy::ActivityFactory.
◆ SetSimulationBaseCycleTime()
|
pure virtual |
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.
Implemented in simulation_framework::autonomy::ActivityFactory.
The documentation for this class was generated from the following file: