NRP Core  1.4.1
EngineGrpcServer Class Reference

class for Engine server with gRPC support More...

#include <engine_grpc_server.h>

Inheritance diagram for EngineGrpcServer:

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...
 

Detailed Description

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.

Member Typedef Documentation

◆ lock_t

◆ mutex_t

using EngineGrpcServer::mutex_t = std::timed_mutex

Constructor & Destructor Documentation

◆ EngineGrpcServer() [1/2]

EngineGrpcServer::EngineGrpcServer ( )
delete

No dummy servers, only those with name and url.

◆ EngineGrpcServer() [2/2]

EngineGrpcServer::EngineGrpcServer ( const std::string  serverAddress,
EngineProtoWrapper engineWrapper 
)
inline

Constructor.

Parameters
[in]serverAddressAddress of the gRPC server
[in]engineWrapperClass processing requests to the Engine

◆ ~EngineGrpcServer()

EngineGrpcServer::~EngineGrpcServer ( )
inline

Destructor.

Member Function Documentation

◆ initRunFlag()

virtual bool EngineGrpcServer::initRunFlag ( ) const
inlinevirtual

Indicates if the simulation was initialized and is running.

◆ isServerRunning()

bool EngineGrpcServer::isServerRunning ( ) const
inline

Indicates whether the gRPC server is currently running.

◆ serverAddress()

const std::string EngineGrpcServer::serverAddress ( ) const
inline

Returns address of the gRPC server.

◆ shutdownFlag()

virtual bool EngineGrpcServer::shutdownFlag ( ) const
inlinevirtual

Indicates if shutdown was requested by the client.

◆ shutdownServer()

void EngineGrpcServer::shutdownServer ( )
inline

Shutdowns the gRPC server.

◆ startServer()

void EngineGrpcServer::startServer ( )
inline

Starts the gRPC server in synchronous mode.

◆ startServerAsync()

void EngineGrpcServer::startServerAsync ( )
inline

Starts the gRPC server in asynchronous mode.


The documentation for this class was generated from the following file: