class for Engine server with gRPC support More...
#include <engine_grpc_server.h>
Public Types | |
using | mutex_t = std::timed_mutex |
using | lock_t = std::unique_lock< EngineGrpcServer::mutex_t > |
Public Member Functions | |
EngineGrpcServer ()=delete | |
No dummy servers, only those with name and url. More... | |
EngineGrpcServer (const std::string serverAddress, EngineProtoWrapper *engineWrapper) | |
Constructor. More... | |
~EngineGrpcServer () | |
Destructor. More... | |
void | startServer () |
Starts the gRPC server in synchronous mode. More... | |
void | startServerAsync () |
Starts the gRPC server in asynchronous mode. More... | |
void | shutdownServer () |
Shutdowns the gRPC server. More... | |
virtual bool | initRunFlag () const |
Indicates if the simulation was initialized and is running. More... | |
virtual bool | shutdownFlag () const |
Indicates if shutdown was requested by the client. More... | |
bool | isServerRunning () const |
Indicates whether the gRPC server is currently running. More... | |
const std::string | serverAddress () const |
Returns address of the gRPC server. More... | |
class for Engine server with gRPC support
The class provides an Engine server with gRPC as middleware. All RPC services are implemented. EngineProtoWrapper is used to perform the actual simulation initialization, shutdown, reset, data exchange and run step operations.
using EngineGrpcServer::lock_t = std::unique_lock<EngineGrpcServer::mutex_t> |
using EngineGrpcServer::mutex_t = std::timed_mutex |
|
delete |
No dummy servers, only those with name and url.
|
inline |
Constructor.
[in] | serverAddress | Address of the gRPC server |
[in] | engineWrapper | Class processing requests to the Engine |
|
inline |
Destructor.
|
inlinevirtual |
Indicates if the simulation was initialized and is running.
|
inline |
Indicates whether the gRPC server is currently running.
|
inline |
Returns address of the gRPC server.
|
inlinevirtual |
Indicates if shutdown was requested by the client.
|
inline |
Shutdowns the gRPC server.
|
inline |
Starts the gRPC server in synchronous mode.
|
inline |
Starts the gRPC server in asynchronous mode.