    

 ## On this page

  

 

 # 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 "core/lifecycle/i\_simulation\_instance/i\_simulation\_instance.h"

<a id="l00007" name="l00007"></a> 7\#include "core/service/sim\_runner/i\_sim\_runner.h"

<a id="l00008" name="l00008"></a> 8\#include &lt;memory&gt;

<a id="l00009" name="l00009"></a> 9 

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

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

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

<a id="l00017" name="l00017"></a> 17{

<a id="l00018" name="l00018"></a> 18 

<a id="l00019" name="l00019"></a> 19class SimRunnerImpl;

<a id="l00020" name="l00020"></a> 20 

<a id="l00026" name="l00026"></a>[ 26](classsimulation__framework_1_1core_1_1SimRunner.xhtml)class [SimRunner](classsimulation__framework_1_1core_1_1SimRunner.xhtml) [final](classsimulation__framework_1_1core_1_1Topic.xhtml) : public [ISimRunner](classsimulation__framework_1_1core_1_1ISimRunner.xhtml)

<a id="l00027" name="l00027"></a> 27{

<a id="l00028" name="l00028"></a> 28 public:

<a id="l00030" name="l00030"></a>[ 30](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a86df4168e20485587e74801f5400dda4) [~SimRunner](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a86df4168e20485587e74801f5400dda4)();

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

<a id="l00034" name="l00034"></a>[ 34](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a961cc52e44842a326e1fc638a6e6f404) explicit [SimRunner](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a961cc52e44842a326e1fc638a6e6f404)(std::unique_ptr&lt;lifecycle::ISimulationInstance&gt; [sim\_instance](classsimulation__framework_1_1core_1_1Topic.xhtml));

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

<a id="l00039" name="l00039"></a>[ 39](classsimulation__framework_1_1core_1_1SimRunner.xhtml#aa47196cb107ebc1c200ab5fd43fc22f9) [StateFeedback](structsimulation__framework_1_1core_1_1StateFeedback.xhtml) [Run](classsimulation__framework_1_1core_1_1SimRunner.xhtml#aa47196cb107ebc1c200ab5fd43fc22f9)() override;

<a id="l00040" name="l00040"></a> 40 

<a id="l00044" name="l00044"></a>[ 44](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a2008706db821aed76b79bee747a220ac) [StateFeedback](structsimulation__framework_1_1core_1_1StateFeedback.xhtml) [Pause](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a2008706db821aed76b79bee747a220ac)() override;

<a id="l00045" name="l00045"></a> 45 

<a id="l00049" name="l00049"></a>[ 49](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a0bc52ce914b51ce4fc709b0686d05475) [StateFeedback](structsimulation__framework_1_1core_1_1StateFeedback.xhtml) [Resume](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a0bc52ce914b51ce4fc709b0686d05475)() override;

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

<a id="l00054" name="l00054"></a>[ 54](classsimulation__framework_1_1core_1_1SimRunner.xhtml#aa2aecf086a4535c9a4d05b977deb29f3) [StateFeedback](structsimulation__framework_1_1core_1_1StateFeedback.xhtml) [StepN](classsimulation__framework_1_1core_1_1SimRunner.xhtml#aa2aecf086a4535c9a4d05b977deb29f3)(int [n](classsimulation__framework_1_1core_1_1Topic.xhtml)) override;

<a id="l00055" name="l00055"></a> 55 

<a id="l00059" name="l00059"></a>[ 59](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a122aef144fa4620085078b7ef1d58645) [StateFeedback](structsimulation__framework_1_1core_1_1StateFeedback.xhtml) [Stop](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a122aef144fa4620085078b7ef1d58645)() override;

<a id="l00060" name="l00060"></a> 60 

<a id="l00063" name="l00063"></a>[ 63](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a6b54a3a3676bc74deea17f50910c3e5b) [StateFeedback](structsimulation__framework_1_1core_1_1StateFeedback.xhtml) [Terminate](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a6b54a3a3676bc74deea17f50910c3e5b)() override;

<a id="l00064" name="l00064"></a> 64 

<a id="l00067" name="l00067"></a>[ 67](classsimulation__framework_1_1core_1_1SimRunner.xhtml#ab5f6d34b0bbd35000cfff95bcfeb901f) SimState [GetSimulationState](classsimulation__framework_1_1core_1_1SimRunner.xhtml#ab5f6d34b0bbd35000cfff95bcfeb901f)() const;

<a id="l00068" name="l00068"></a> 68 

<a id="l00072" name="l00072"></a>[ 72](classsimulation__framework_1_1core_1_1SimRunner.xhtml#ab7b56bf2aa50f1ca9b14b928268939eb) [uint64\_t](classsimulation__framework_1_1core_1_1Topic.xhtml) [GetExecutedStepCount](classsimulation__framework_1_1core_1_1SimRunner.xhtml#ab7b56bf2aa50f1ca9b14b928268939eb)() const;

<a id="l00073" name="l00073"></a> 73 

<a id="l00075" name="l00075"></a>[ 75](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a4ba901d04097297295b7b680ac151da9) void [RunOverSimulation](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a4ba901d04097297295b7b680ac151da9)() override;

<a id="l00076" name="l00076"></a> 76 

<a id="l00077" name="l00077"></a> 77 private:

<a id="l00079" name="l00079"></a> 79 std::unique_ptr&lt;SimRunnerImpl&gt; impl_;

<a id="l00080" name="l00080"></a> 80};



<a id="l00081" name="l00081"></a> 81 

<a id="l00082" name="l00082"></a> 82} // namespace core

<a id="l00083" name="l00083"></a> 83} // 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::SimRunner](classsimulation__framework_1_1core_1_1SimRunner.xhtml)

Simulation runner with external control logic.

**Definition** [sim\_runner.h:27](sim__runner_8h_source.xhtml#l00026)



[simulation\_framework::core::SimRunner::Resume](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a0bc52ce914b51ce4fc709b0686d05475)

StateFeedback Resume() override

Resumes the simulation.



[simulation\_framework::core::SimRunner::Stop](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a122aef144fa4620085078b7ef1d58645)

StateFeedback Stop() override

Stops the simulation immediately.



[simulation\_framework::core::SimRunner::Pause](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a2008706db821aed76b79bee747a220ac)

StateFeedback Pause() override

Pauses the simulation.



[simulation\_framework::core::SimRunner::RunOverSimulation](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a4ba901d04097297295b7b680ac151da9)

void RunOverSimulation() override

Runs the simulation until it ends without accepting further commands.



[simulation\_framework::core::SimRunner::Terminate](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a6b54a3a3676bc74deea17f50910c3e5b)

StateFeedback Terminate() override

Terminates the simulation.



[simulation\_framework::core::SimRunner::~SimRunner](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a86df4168e20485587e74801f5400dda4)

~SimRunner()

Destructor for SimRunner.



[simulation\_framework::core::SimRunner::SimRunner](classsimulation__framework_1_1core_1_1SimRunner.xhtml#a961cc52e44842a326e1fc638a6e6f404)

SimRunner(std::unique_ptr&lt; lifecycle::ISimulationInstance &gt; sim_instance)

Constructs a SimRunner with a simulation instance.



[simulation\_framework::core::SimRunner::StepN](classsimulation__framework_1_1core_1_1SimRunner.xhtml#aa2aecf086a4535c9a4d05b977deb29f3)

StateFeedback StepN(int n) override

Steps the simulation forward by a specified number of frames.



[simulation\_framework::core::SimRunner::Run](classsimulation__framework_1_1core_1_1SimRunner.xhtml#aa47196cb107ebc1c200ab5fd43fc22f9)

StateFeedback Run() override

Executes the simulation and changes the state to kRunning.



[simulation\_framework::core::SimRunner::GetSimulationState](classsimulation__framework_1_1core_1_1SimRunner.xhtml#ab5f6d34b0bbd35000cfff95bcfeb901f)

SimState GetSimulationState() const

Retrieves the current state of the simulation.



[simulation\_framework::core::SimRunner::GetExecutedStepCount](classsimulation__framework_1_1core_1_1SimRunner.xhtml#ab7b56bf2aa50f1ca9b14b928268939eb)

uint64_t GetExecutedStepCount() const

Retrieves the number of executed simulation steps.



[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)