cli_server Last update: 16.07.2025 1 5 6 #pragma once 7 8 #include "core/service/grpc/cli/i_cli_server.h" 9 #include "core/service/sim_runner/i_sim_runner.h" 10 #include <atomic> 11 #include <thread> 12 17 namespace simulation_framework 18 { 19 namespace core 20 { 21 23 27 class SimfwkCliServer : public ISimfwkCliServer 28 { 29 public: 32 SimfwkCliServer(const std::string& server_address); 33 35 ~SimfwkCliServer(); 36 38 void WaitForCommand(); 39 41 std::string GetServerAddress(); 42 47 void BindSimRunner(std::unique_ptr<simulation_framework::core::ISimRunner> sim_runner); 48 49 private: 50 std::string server_address_; 51 std::atomic_bool sim_runner_binded_{false}; 52 std::thread grpc_server_thread_; 53 }; 54 55 } // namespace core 56 } // namespace simulation_framework