    

 ## On this page

  

 

 # i\_sim\_runner

 Last update: 16.07.2025 

<a id="l00001" name="l00001"></a> 1 

<a id="l00003" name="l00003"></a> 3 

<a id="l00004" name="l00004"></a> 4\#pragma once

<a id="l00005" name="l00005"></a> 5 

<a id="l00006" name="l00006"></a> 6\#include &lt;string&gt;

<a id="l00007" name="l00007"></a> 7 

<a id="l00012" name="l00012"></a> 12namespace [simulation\_framework](namespacesimulation__framework.xhtml)

<a id="l00013" name="l00013"></a> 13{

<a id="l00014" name="l00014"></a> 14namespace [core](namespacecore.xhtml)

<a id="l00015" name="l00015"></a> 15{

<a id="l00016" name="l00016"></a> 16 

<a id="l00018" name="l00018"></a>[ 18](structsimulation__framework_1_1core_1_1StateFeedback.xhtml)struct [StateFeedback](structsimulation__framework_1_1core_1_1StateFeedback.xhtml)

<a id="l00019" name="l00019"></a> 19{

<a id="l00021" name="l00021"></a>[ 21](structsimulation__framework_1_1core_1_1StateFeedback.xhtml#a8d8e5cd79fb548feec4dae9cc75bf024) bool [execute\_status](structsimulation__framework_1_1core_1_1StateFeedback.xhtml#a8d8e5cd79fb548feec4dae9cc75bf024);

<a id="l00022" name="l00022"></a> 22 

<a id="l00024" name="l00024"></a>[ 24](structsimulation__framework_1_1core_1_1StateFeedback.xhtml#ac35cce08425ee09c1dd47b6d72f6b4ff) std::string [error\_msg](structsimulation__framework_1_1core_1_1StateFeedback.xhtml#ac35cce08425ee09c1dd47b6d72f6b4ff);

<a id="l00025" name="l00025"></a> 25};



<a id="l00026" name="l00026"></a> 26 

<a id="l00028" name="l00028"></a> 28enum class SimState

<a id="l00029" name="l00029"></a> 29{

<a id="l00030" name="l00030"></a> 30 kInitialized, 

<a id="l00031" name="l00031"></a> 31 kRunning, 

<a id="l00032" name="l00032"></a> 32 kPaused, 

<a id="l00033" name="l00033"></a> 33 kFinished, 

<a id="l00034" name="l00034"></a> 34 kTerminated, 

<a id="l00035" name="l00035"></a> 35 kError 

<a id="l00036" name="l00036"></a> 36};

<a id="l00037" name="l00037"></a> 37 

<a id="l00041" name="l00041"></a>[ 41](classsimulation__framework_1_1core_1_1ISimRunner.xhtml)class [ISimRunner](classsimulation__framework_1_1core_1_1ISimRunner.xhtml)

<a id="l00042" name="l00042"></a> 42{

<a id="l00043" name="l00043"></a> 43 public:

<a id="l00045" name="l00045"></a>[ 45](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a28739232c9e3879e863cd5fa158ef709) virtual [~ISimRunner](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a28739232c9e3879e863cd5fa158ef709)() = default;

<a id="l00046" name="l00046"></a> 46 

<a id="l00049" name="l00049"></a>[ 49](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#ab7615f9b015b1c52e3af9e21ef2bf6ee) virtual [StateFeedback](structsimulation__framework_1_1core_1_1StateFeedback.xhtml) [Run](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#ab7615f9b015b1c52e3af9e21ef2bf6ee)() = 0;

<a id="l00050" name="l00050"></a> 50 

<a id="l00053" name="l00053"></a>[ 53](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a7cc05d7d61c4cb7af9eca9fb85bce8d7) virtual [StateFeedback](structsimulation__framework_1_1core_1_1StateFeedback.xhtml) [Pause](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a7cc05d7d61c4cb7af9eca9fb85bce8d7)() = 0;

<a id="l00054" name="l00054"></a> 54 

<a id="l00057" name="l00057"></a>[ 57](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a4b448f77a70ea37643cff04f6d1c7c1c) virtual [StateFeedback](structsimulation__framework_1_1core_1_1StateFeedback.xhtml) [Resume](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a4b448f77a70ea37643cff04f6d1c7c1c)() = 0;

<a id="l00058" name="l00058"></a> 58 

<a id="l00062" name="l00062"></a>[ 62](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a11b61afe9fa80c71aae36c16449ac831) virtual [StateFeedback](structsimulation__framework_1_1core_1_1StateFeedback.xhtml) [StepN](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a11b61afe9fa80c71aae36c16449ac831)(int [n](classsimulation__framework_1_1core_1_1Topic.xhtml)) = 0;

<a id="l00063" name="l00063"></a> 63 

<a id="l00066" name="l00066"></a>[ 66](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a659d260f4146f46ffe51bc17f93179ac) virtual [StateFeedback](structsimulation__framework_1_1core_1_1StateFeedback.xhtml) [Stop](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a659d260f4146f46ffe51bc17f93179ac)() = 0;

<a id="l00067" name="l00067"></a> 67 

<a id="l00070" name="l00070"></a>[ 70](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#aa5b44639fefef47817aafb6f99719802) virtual [StateFeedback](structsimulation__framework_1_1core_1_1StateFeedback.xhtml) [Terminate](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#aa5b44639fefef47817aafb6f99719802)() = 0;

<a id="l00071" name="l00071"></a> 71 

<a id="l00074" name="l00074"></a>[ 74](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a66d4287f6da13af21331fbfc1c5ff226) virtual SimState [GetSimulationState](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a66d4287f6da13af21331fbfc1c5ff226)() const = 0;

<a id="l00075" name="l00075"></a> 75 

<a id="l00078" name="l00078"></a>[ 78](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#ae60fbe830aef619e8cbd39a092f1f995) virtual [uint64\_t](classsimulation__framework_1_1core_1_1Topic.xhtml) [GetExecutedStepCount](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#ae60fbe830aef619e8cbd39a092f1f995)() const = 0;

<a id="l00079" name="l00079"></a> 79 

<a id="l00081" name="l00081"></a>[ 81](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#af5cc40c4bdd9360cd2e95e1c2f8e5626) virtual void [RunOverSimulation](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#af5cc40c4bdd9360cd2e95e1c2f8e5626)() = 0;

<a id="l00082" name="l00082"></a> 82};



<a id="l00083" name="l00083"></a> 83 

<a id="l00084" name="l00084"></a> 84} // namespace core

<a id="l00085" name="l00085"></a> 85} // namespace simulation\_framework

[simulation\_framework::core::ISimRunner](classsimulation__framework_1_1core_1_1ISimRunner.xhtml)

Interface for controlling and managing simulation execution.

**Definition** [i\_sim\_runner.h:42](i__sim__runner_8h_source.xhtml#l00041)



[simulation\_framework::core::ISimRunner::StepN](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a11b61afe9fa80c71aae36c16449ac831)

virtual StateFeedback StepN(int n)=0

Advances the simulation by a specified number of steps.



[simulation\_framework::core::ISimRunner::~ISimRunner](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a28739232c9e3879e863cd5fa158ef709)

virtual ~ISimRunner()=default

Virtual destructor for proper cleanup of derived classes.



[simulation\_framework::core::ISimRunner::Resume](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a4b448f77a70ea37643cff04f6d1c7c1c)

virtual StateFeedback Resume()=0

Resumes the simulation if it is paused.



[simulation\_framework::core::ISimRunner::Stop](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a659d260f4146f46ffe51bc17f93179ac)

virtual StateFeedback Stop()=0

Stops the simulation.



[simulation\_framework::core::ISimRunner::GetSimulationState](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a66d4287f6da13af21331fbfc1c5ff226)

virtual SimState GetSimulationState() const =0

Retrieves the current state of the simulation.



[simulation\_framework::core::ISimRunner::Pause](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#a7cc05d7d61c4cb7af9eca9fb85bce8d7)

virtual StateFeedback Pause()=0

Pauses the simulation.



[simulation\_framework::core::ISimRunner::Terminate](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#aa5b44639fefef47817aafb6f99719802)

virtual StateFeedback Terminate()=0

Terminates the simulation completely.



[simulation\_framework::core::ISimRunner::Run](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#ab7615f9b015b1c52e3af9e21ef2bf6ee)

virtual StateFeedback Run()=0

Starts the simulation.



[simulation\_framework::core::ISimRunner::GetExecutedStepCount](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#ae60fbe830aef619e8cbd39a092f1f995)

virtual uint64_t GetExecutedStepCount() const =0

Retrieves the number of steps executed so far.



[simulation\_framework::core::ISimRunner::RunOverSimulation](classsimulation__framework_1_1core_1_1ISimRunner.xhtml#af5cc40c4bdd9360cd2e95e1c2f8e5626)

virtual void RunOverSimulation()=0

Runs any remaining parts of the simulation to completion.



[simulation\_framework::core::Topic](classsimulation__framework_1_1core_1_1Topic.xhtml)

This is the concrete Topic class that can be used for creation of a communication channel with given ...

**Definition** [topic.h:38](topic_8h_source.xhtml#l00037)



[core](namespacecore.xhtml)

The namespace for all core functionalities under namespace simulation_framework.



[simulation\_framework](namespacesimulation__framework.xhtml)

The top namespace for simulation framework.



[simulation\_framework::core::StateFeedback](structsimulation__framework_1_1core_1_1StateFeedback.xhtml)

Represents feedback for the execution status of a control command.

**Definition** [i\_sim\_runner.h:19](i__sim__runner_8h_source.xhtml#l00018)



[simulation\_framework::core::StateFeedback::execute\_status](structsimulation__framework_1_1core_1_1StateFeedback.xhtml#a8d8e5cd79fb548feec4dae9cc75bf024)

bool execute_status

Indicates whether the control command was executed successfully.

**Definition** [i\_sim\_runner.h:21](i__sim__runner_8h_source.xhtml#l00021)



[simulation\_framework::core::StateFeedback::error\_msg](structsimulation__framework_1_1core_1_1StateFeedback.xhtml#ac35cce08425ee09c1dd47b6d72f6b4ff)

std::string error_msg

Error message describing the issue if execution failed.

**Definition** [i\_sim\_runner.h:24](i__sim__runner_8h_source.xhtml#l00024)