    

 ## On this page

  

 

 # cli\_server

 Last update: 16.07.2025 

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

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

<a name="l00006"></a> 6 \#pragma once

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

<a name="l00008"></a> 8 \#include "core/service/grpc/cli/i\_cli\_server.h"

<a name="l00009"></a> 9 \#include "core/service/sim\_runner/i\_sim\_runner.h"

<a name="l00010"></a> 10 \#include &lt;atomic&gt;

<a name="l00011"></a> 11 \#include &lt;thread&gt;

<a name="l00012"></a> 12 

<a name="l00017"></a> 17 namespace [simulation\_framework](namespacesimulation__framework.xhtml)

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

<a name="l00019"></a> 19 namespace [core](namespacecore.xhtml)

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

<a name="l00021"></a> 21 

<a name="l00023"></a> 23 

<a name="l00027"></a>[ 27](classsimulation__framework_1_1core_1_1SimfwkCliServer.xhtml) class [SimfwkCliServer](classsimulation__framework_1_1core_1_1SimfwkCliServer.xhtml) : public [ISimfwkCliServer](classsimulation__framework_1_1core_1_1ISimfwkCliServer.xhtml)

<a name="l00028"></a> 28 {

<a name="l00029"></a> 29 public:

<a name="l00032"></a> 32 [SimfwkCliServer](classsimulation__framework_1_1core_1_1SimfwkCliServer.xhtml#a7d45c7dc24e6751063c9894339912009)(const std::string&amp; server_address);

<a name="l00033"></a> 33 

<a name="l00035"></a> 35 [~SimfwkCliServer](classsimulation__framework_1_1core_1_1SimfwkCliServer.xhtml#a8cd61043746cbaa3ac45453188b51d99)();

<a name="l00036"></a> 36 

<a name="l00038"></a> 38 void [WaitForCommand](classsimulation__framework_1_1core_1_1SimfwkCliServer.xhtml#ab9d3d3b02f9601efb7c4c979ffccce06)();

<a name="l00039"></a> 39 

<a name="l00041"></a> 41 std::string [GetServerAddress](classsimulation__framework_1_1core_1_1SimfwkCliServer.xhtml#a8f16cb74b31d87361ee4da1b5c7ab9da)();

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

<a name="l00047"></a> 47 void [BindSimRunner](classsimulation__framework_1_1core_1_1SimfwkCliServer.xhtml#a2298836e929027f610ee47cc6596616d)(std::unique_ptr&lt;simulation_framework::core::ISimRunner&gt; sim_runner);

<a name="l00048"></a> 48 

<a name="l00049"></a> 49 private:

<a name="l00050"></a> 50 std::string server_address_;

<a name="l00051"></a> 51 std::atomic_bool sim_runner_binded_{false};

<a name="l00052"></a> 52 std::thread grpc_server_thread_;

<a name="l00053"></a> 53 };

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

<a name="l00055"></a> 55 } // namespace core

<a name="l00056"></a> 56 } // namespace simulation\_framework