simulation_framework::core::lifecycle::IActivity Class Reference
Last update: 16.07.2025Interface for simulation activities. More...
#include <i_activity.h>

Public Member Functions | |
| virtual | ~IActivity ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
| virtual void | Init ()=0 |
| Initializes the activity. | |
| virtual void | WaitForPubSubConnection ()=0 |
| Waits until Pub/Sub pairing is complete. | |
| virtual void | Step ()=0 |
| Executes one step of the activity. | |
| virtual void | Shutdown ()=0 |
| Shuts down the activity. | |
| virtual std::string | GetName () const =0 |
| Retrieves the name of the activity. | |
| virtual time::Timestamp | GetCurrentTimestamp () const =0 |
| Retrieves the current simulation timestamp. | |
| virtual std::chrono::milliseconds | GetCycleTime () const =0 |
| Retrieves the cycle time of the activity. | |
| virtual std::vector< File > | GetInputFiles () const =0 |
| Retrieves the list of input files required for the simulation. | |
| virtual std::string | GetSimulationOutputDirectory () const =0 |
| Retrieves the output directory for simulation results. | |
| virtual void | SetUpCommunication ()=0 |
| Sets up the Pub/Sub communication for the activity. | |
Detailed Description
Interface for simulation activities.
The IActivity interface defines the lifecycle of a simulation activity, including initialization, stepping logic, and shutdown processes. It also provides methods for handling communication, file input/output, and retrieving simulation metadata.
Definition at line 29 of file i_activity.h.
Member Function Documentation
◆ GetCurrentTimestamp()
|
pure virtual |
Retrieves the current simulation timestamp.
This provides the simulation's current time as a Timestamp object.
- Returns
- The current simulation timestamp.
Implemented in simulation_framework::core::lifecycle::BaseActivity.
◆ GetCycleTime()
|
pure virtual |
Retrieves the cycle time of the activity.
The cycle time indicates how often the activity executes.
- Returns
- The cycle time as a duration in milliseconds.
Implemented in simulation_framework::core::lifecycle::BaseActivity.
◆ GetInputFiles()
|
pure virtual |
Retrieves the list of input files required for the simulation.
This includes all input files necessary for the activity to run.
- Returns
- A vector of
Fileobjects representing the input files.
Implemented in simulation_framework::core::lifecycle::BaseActivity.
◆ GetName()
|
pure virtual |
Retrieves the name of the activity.
- Returns
- The name of the activity as a string.
Implemented in simulation_framework::core::lifecycle::BaseActivity.
◆ GetSimulationOutputDirectory()
|
pure virtual |
Retrieves the output directory for simulation results.
The directory where all simulation outputs will be stored.
- Returns
- The output directory as a string.
Implemented in simulation_framework::core::lifecycle::BaseActivity.
◆ Init()
Initializes the activity.
Implement any logic related to the initialization phase here.
Implemented in simulation_framework::core::lifecycle::BaseActivity, and simulation_framework::core::lifecycle::FmuBaseActivity.
◆ SetUpCommunication()
Sets up the Pub/Sub communication for the activity.
Registers the activity's communication channels into the bus.
Implemented in simulation_framework::core::lifecycle::BaseActivity.
◆ Shutdown()
Shuts down the activity.
Implement logic to conclude the activity and release any resources here.
Implemented in simulation_framework::core::lifecycle::BaseActivity.
◆ Step()
Executes one step of the activity.
Implement the main logic for each simulation step here.
Implemented in simulation_framework::core::lifecycle::BaseActivity.
◆ WaitForPubSubConnection()
|
pure virtual |
Waits until Pub/Sub pairing is complete.
Ensures the communication channels are correctly paired before proceeding.
- Returns
trueif pairing is successful, otherwisefalse.
The documentation for this class was generated from the following file: