NRP - Gazebo Communicator on the NRP side. Converts DataPackInterface classes from/to JSON objects. More...
#include <gazebo_engine_grpc_nrp_client.h>
Public Member Functions | |
GazeboEngineGrpcNRPClient (nlohmann::json &config, ProcessLauncherInterface::unique_ptr &&launcher) | |
virtual | ~GazeboEngineGrpcNRPClient () override=default |
virtual void | initialize () override |
Initialize engine. More... | |
virtual void | reset () override |
Reset engine. More... | |
virtual void | shutdown () override |
Shutdown engine. More... | |
virtual const std::vector< std::string > | engineProcStartParams () const override |
Get all Engine Process Startup parameters. More... | |
![]() | |
EngineGrpcClient (nlohmann::json &config, ProcessLauncherInterface::unique_ptr &&launcher) | |
virtual pid_t | launchEngine () override |
Launch the engine. More... | |
void | connectToServer () |
void | sendInitializeCommand (const nlohmann::json &data) |
void | sendResetCommand () |
void | sendShutdownCommand (const nlohmann::json &data) |
SimulationTime | runLoopStepCallback (const SimulationTime timeStep) override |
Executes a single loop step. More... | |
virtual datapacks_vector_t | getDataPacksFromEngine (const datapack_identifiers_set_t &requestedDataPackIds) override |
Gets requested datapacks from engine. More... | |
virtual void | sendDataPacksToEngine (const datapacks_set_t &dataPacks) override |
Sends datapacks to engine. More... | |
virtual const std::vector< std::string > | engineProcStartParams () const override |
Get all Engine Process Startup parameters. More... | |
std::string | tryBind (const std::string &address) |
void | validateServerAddress () |
Validates if server address is already in use. More... | |
const std::string | serverAddress () const |
Returns the address used by the gRPC server. More... | |
![]() | |
EngineClient (nlohmann::json &engineConfig, ProcessLauncherInterface::unique_ptr &&launcher) | |
Constructor. More... | |
~EngineClient () override=default | |
const std::string | engineName () const override final |
Get Engine Name. More... | |
SimulationTime | getEngineTimestep () const override final |
Get engine timestep. More... | |
const nlohmann::json & | engineConfig () const override final |
Get Engine Configuration. More... | |
nlohmann::json & | engineConfig () override final |
Get Engine Configuration. More... | |
const std::string | engineSchema () const override final |
Get json schema for this engine type. More... | |
SimulationTime | getEngineTime () const override |
Returns current engine (simulation) time. More... | |
void | runLoopStepAsync (SimulationTime timeStep) override |
Concrete implementation of EngineClientInterface::runLoopStepAsync() More... | |
void | runLoopStepAsyncGet (SimulationTime timeOut) override |
Concrete implementation of EngineClientInterface::runLoopStepAsyncGet() More... | |
![]() | |
EngineClientInterface (ProcessLauncherInterface::unique_ptr &&launcher) | |
virtual | ~EngineClientInterface () |
virtual const std::string | engineName () const =0 |
Get Engine Name. More... | |
virtual const nlohmann::json & | engineConfig () const =0 |
Get engine config data. More... | |
virtual SimulationTime | getEngineTimestep () const =0 |
Get engine timestep. More... | |
virtual SimulationTime | getEngineTime () const =0 |
Get current engine time. More... | |
virtual const std::string | engineSchema () const =0 |
Get json schema for this specific engine type. More... | |
Additional Inherited Members | |
![]() | |
using | engine_t = GazeboEngineGrpcNRPClient |
![]() | |
using | shared_ptr = std::shared_ptr< EngineClientInterface > |
using | const_shared_ptr = std::shared_ptr< const EngineClientInterface > |
using | unique_ptr = std::unique_ptr< EngineClientInterface > |
using | const_unique_ptr = std::unique_ptr< const EngineClientInterface > |
![]() | |
void | resetEngineTime () override |
![]() | |
void | setDefaultProperty (std::string key, T value) |
Attempts to set a default value for a property in the engine configuration. If the property has been already set either in the engine configuration file or from the engine schema, its value is not overwritten. More... | |
![]() | |
ProcessLauncherInterface::unique_ptr | _process |
Process Launcher. Will be used to stop process at end. More... | |
NRP - Gazebo Communicator on the NRP side. Converts DataPackInterface classes from/to JSON objects.
GazeboEngineGrpcNRPClient::GazeboEngineGrpcNRPClient | ( | nlohmann::json & | config, |
ProcessLauncherInterface::unique_ptr && | launcher | ||
) |
|
overridevirtualdefault |
|
overridevirtual |
Get all Engine Process Startup parameters.
Implements EngineClientInterface.
|
overridevirtual |
Initialize engine.
Throws | on error |
Implements EngineClientInterface.
|
overridevirtual |
Reset engine.
Throws | on error |
Implements EngineClientInterface.
|
overridevirtual |
Shutdown engine.
Throws | on error |
Implements EngineClientInterface.