.. index:: pair: class; EngineGrpcServer .. _doxid-class_engine_grpc_server: class EngineGrpcServer ====================== .. toctree:: :hidden: Overview ~~~~~~~~ class for Engine server with gRPC support :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class EngineGrpcServer: public Service { public: // typedefs typedef std::timed_mutex :target:`mutex_t`; typedef std::unique_lock<:ref:`EngineGrpcServer::mutex_t`> :target:`lock_t`; // construction :ref:`EngineGrpcServer`(); :ref:`EngineGrpcServer`( const std::string serverAddress, :ref:`EngineProtoWrapper`* engineWrapper ); // methods void :ref:`startServer`(); void :ref:`startServerAsync`(); void :ref:`shutdownServer`(); virtual bool :ref:`initRunFlag`() const; virtual bool :ref:`shutdownFlag`() const; bool :ref:`isServerRunning`() const; const std::string :ref:`serverAddress`() const; }; .. _details-class_engine_grpc_server: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ class for Engine server with gRPC support The class provides an Engine server with gRPC as middleware. All RPC services are implemented. :ref:`EngineProtoWrapper ` is used to perform the actual simulation initialization, shutdown, reset, data exchange and run step operations. Construction ------------ .. index:: pair: function; EngineGrpcServer .. _doxid-class_engine_grpc_server_1ae07803d3e81edf3ad2670317d96ee8a0: .. ref-code-block:: cpp :class: doxyrest-title-code-block EngineGrpcServer() No dummy servers, only those with name and url. .. index:: pair: function; EngineGrpcServer .. _doxid-class_engine_grpc_server_1a68b87988c6ef94b69e54946bf52b4c75: .. ref-code-block:: cpp :class: doxyrest-title-code-block EngineGrpcServer( const std::string serverAddress, :ref:`EngineProtoWrapper`* engineWrapper ) Constructor. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - serverAddress - Address of the gRPC server * - engineWrapper - Class processing requests to the Engine Methods ------- .. index:: pair: function; startServer .. _doxid-class_engine_grpc_server_1a578b6d98acd6e1b102a131a6b09ce1bd: .. ref-code-block:: cpp :class: doxyrest-title-code-block void startServer() Starts the gRPC server in synchronous mode. .. index:: pair: function; startServerAsync .. _doxid-class_engine_grpc_server_1a873debfc6573e9b5d343bf9fff970d0b: .. ref-code-block:: cpp :class: doxyrest-title-code-block void startServerAsync() Starts the gRPC server in asynchronous mode. .. index:: pair: function; shutdownServer .. _doxid-class_engine_grpc_server_1ae5bef34e951ed424c5ad52d10babfcc0: .. ref-code-block:: cpp :class: doxyrest-title-code-block void shutdownServer() Shutdowns the gRPC server. .. index:: pair: function; initRunFlag .. _doxid-class_engine_grpc_server_1a0dd7c07e81b58f9767faf08181c95cee: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual bool initRunFlag() const Indicates if the simulation was initialized and is running. .. index:: pair: function; shutdownFlag .. _doxid-class_engine_grpc_server_1adbc15aa89c2c978f5e7297a0f60ec706: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual bool shutdownFlag() const Indicates if shutdown was requested by the client. .. index:: pair: function; isServerRunning .. _doxid-class_engine_grpc_server_1a3016dbda087eaaef054472de914093e1: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool isServerRunning() const Indicates whether the gRPC server is currently running. .. index:: pair: function; serverAddress .. _doxid-class_engine_grpc_server_1acd608554e1b2f520c75b7d77652e1c58: .. ref-code-block:: cpp :class: doxyrest-title-code-block const std::string serverAddress() const Returns address of the gRPC server.