NRP Core  1.4.1
gazebo_engine_json_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_JSON_NRP_CLIENT_H
23 #define GAZEBO_ENGINE_JSON_NRP_CLIENT_H
24 
28 
30 
31 #include <unistd.h>
32 
33 
38 : public EngineJSONNRPClient<GazeboEngineJSONNRPClient, GazeboJSONConfigConst::EngineSchema>
39 {
40  public:
42  virtual ~GazeboEngineJSONNRPClient() override = default;
43 
44  virtual void initialize() override;
45 
46  virtual void reset() override;
47 
48  virtual void shutdown() override;
49 
50  virtual const std::vector<std::string> engineProcStartParams() const override;
51 };
52 
53 using GazeboEngineJSONLauncher = GazeboEngineJSONNRPClient::EngineLauncher<GazeboJSONConfigConst::EngineType>;
54 
56 
57 #endif // GAZEBO_ENGINE_JSON_NRP_CLIENT_H
GazeboEngineJSONNRPClient::engineProcStartParams
virtual const std::vector< std::string > engineProcStartParams() const override
Get all Engine Process Startup parameters.
Definition: gazebo_engine_json_nrp_client.cpp:94
CREATE_NRP_ENGINE_LAUNCHER
CREATE_NRP_ENGINE_LAUNCHER(GazeboEngineJSONLauncher)
PtrTemplates< ProcessLauncherInterface >::unique_ptr
std::unique_ptr< ProcessLauncherInterface > unique_ptr
Definition: ptr_templates.h:34
engine_json_nrp_client.h
EngineJSONNRPClient
NRP - Gazebo Communicator on the NRP side. Converts DataPackInterface classes from/to JSON objects.
Definition: engine_json_nrp_client.h:45
plugin.h
engine_client_interface.h
gazebo_json_config.h
GazeboEngineJSONNRPClient::shutdown
virtual void shutdown() override
Shutdown engine.
Definition: gazebo_engine_json_nrp_client.cpp:80
GazeboEngineJSONNRPClient::GazeboEngineJSONNRPClient
GazeboEngineJSONNRPClient(nlohmann::json &config, ProcessLauncherInterface::unique_ptr &&launcher)
Definition: gazebo_engine_json_nrp_client.cpp:35
GazeboEngineJSONNRPClient
NRP - Gazebo Communicator on the NRP side. Converts DataPackInterface classes from/to JSON objects.
Definition: gazebo_engine_json_nrp_client.h:37
GazeboEngineJSONLauncher
GazeboEngineJSONNRPClient::EngineLauncher< GazeboJSONConfigConst::EngineType > GazeboEngineJSONLauncher
Definition: gazebo_engine_json_nrp_client.h:53
GazeboEngineJSONNRPClient::~GazeboEngineJSONNRPClient
virtual ~GazeboEngineJSONNRPClient() override=default
GazeboEngineJSONNRPClient::initialize
virtual void initialize() override
Initialize engine.
Definition: gazebo_engine_json_nrp_client.cpp:41
GazeboEngineJSONNRPClient::reset
virtual void reset() override
Reset engine.
Definition: gazebo_engine_json_nrp_client.cpp:60
json
nlohmann::json json
Definition: engine_json_server.cpp:31