NRP Core  1.4.1
gazebo_engine_grpc_nrp_client.h
Go to the documentation of this file.
1 /* * NRP Core - Backend infrastructure to synchronize simulations
2  *
3  * Copyright 2020-2023 NRP Team
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * This project has received funding from the European Union’s Horizon 2020
18  * Framework Programme for Research and Innovation under the Specific Grant
19  * Agreement No. 945539 (Human Brain Project SGA3).
20  */
21 
22 #ifndef GAZEBO_ENGINE_GRPC_NRP_CLIENT_H
23 #define GAZEBO_ENGINE_GRPC_NRP_CLIENT_H
24 
28 #include "nrp_protobuf/gazebo.pb.h"
29 
31 
32 #include <unistd.h>
33 
34 
39 : public EngineGrpcClient<GazeboEngineGrpcNRPClient, GazeboGrpcConfigConst::EngineSchema>
40 {
41  public:
43  virtual ~GazeboEngineGrpcNRPClient() override = default;
44 
45  virtual void initialize() override;
46 
47  virtual void reset() override;
48 
49  virtual void shutdown() override;
50 
51  virtual const std::vector<std::string> engineProcStartParams() const override;
52 };
53 
54 using GazeboEngineGrpcLauncher = GazeboEngineGrpcNRPClient::EngineLauncher<GazeboGrpcConfigConst::EngineType>;
55 
57 
58 #endif // GAZEBO_ENGINE_GRPC_NRP_CLIENT_H
GazeboEngineGrpcNRPClient::~GazeboEngineGrpcNRPClient
virtual ~GazeboEngineGrpcNRPClient() override=default
GazeboEngineGrpcLauncher
GazeboEngineGrpcNRPClient::EngineLauncher< GazeboGrpcConfigConst::EngineType > GazeboEngineGrpcLauncher
Definition: gazebo_engine_grpc_nrp_client.h:54
EngineGrpcClient
Definition: engine_grpc_client.h:45
PtrTemplates< ProcessLauncherInterface >::unique_ptr
std::unique_ptr< ProcessLauncherInterface > unique_ptr
Definition: ptr_templates.h:34
GazeboEngineGrpcNRPClient::GazeboEngineGrpcNRPClient
GazeboEngineGrpcNRPClient(nlohmann::json &config, ProcessLauncherInterface::unique_ptr &&launcher)
Definition: gazebo_engine_grpc_nrp_client.cpp:35
plugin.h
engine_client_interface.h
engine_grpc_client.h
GazeboEngineGrpcNRPClient::reset
virtual void reset() override
Reset engine.
Definition: gazebo_engine_grpc_nrp_client.cpp:60
GazeboEngineGrpcNRPClient
NRP - Gazebo Communicator on the NRP side. Converts DataPackInterface classes from/to JSON objects.
Definition: gazebo_engine_grpc_nrp_client.h:38
CREATE_NRP_ENGINE_LAUNCHER
CREATE_NRP_ENGINE_LAUNCHER(GazeboEngineGrpcLauncher)
gazebo_grpc_config.h
GazeboEngineGrpcNRPClient::initialize
virtual void initialize() override
Initialize engine.
Definition: gazebo_engine_grpc_nrp_client.cpp:43
GazeboEngineGrpcNRPClient::engineProcStartParams
virtual const std::vector< std::string > engineProcStartParams() const override
Get all Engine Process Startup parameters.
Definition: gazebo_engine_grpc_nrp_client.cpp:89
GazeboEngineGrpcNRPClient::shutdown
virtual void shutdown() override
Shutdown engine.
Definition: gazebo_engine_grpc_nrp_client.cpp:75
json
nlohmann::json json
Definition: engine_json_server.cpp:31