NRP Core  1.4.1
python_engine_json_nrp_client.h
Go to the documentation of this file.
1 
2 /* * NRP Core - Backend infrastructure to synchronize simulations
3  *
4  * Copyright 2020-2023 NRP Team
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * This project has received funding from the European Union’s Horizon 2020
19  * Framework Programme for Research and Innovation under the Specific Grant
20  * Agreement No. 945539 (Human Brain Project SGA3).
21  */
22 
23 #ifndef PYTHON_ENGINE_JSON_NRP_CLIENT_H
24 #define PYTHON_ENGINE_JSON_NRP_CLIENT_H
25 
28 
29 
33 class PythonEngineJSONNRPClient: public PythonEngineJSONNRPClientBase<PythonEngineJSONNRPClient, PythonConfigConst::EngineSchema>
34 {
35 public:
36 
38  : PythonEngineJSONNRPClientBase(config, std::move(launcher))
39  {
40  NRP_LOGGER_TRACE("{} called", __FUNCTION__);
41 
42  setDefaultProperty<std::string>("EngineProcCmd", NRP_PYTHON_EXECUTABLE_PATH);
43  }
44 };
45 
46 using PythonEngineJSONLauncher = PythonEngineJSONNRPClient::EngineLauncher<PythonConfigConst::EngineType>;
47 
48 
50 
51 
52 #endif // PYTHON_ENGINE_JSON_NRP_CLIENT_H
PythonEngineJSONNRPClient
PythonJSONEngine client.
Definition: python_engine_json_nrp_client.h:33
PythonEngineJSONLauncher
PythonEngineJSONNRPClient::EngineLauncher< PythonConfigConst::EngineType > PythonEngineJSONLauncher
Definition: python_engine_json_nrp_client.h:46
PtrTemplates< ProcessLauncherInterface >::unique_ptr
std::unique_ptr< ProcessLauncherInterface > unique_ptr
Definition: ptr_templates.h:34
PythonEngineJSONNRPClient::PythonEngineJSONNRPClient
PythonEngineJSONNRPClient(nlohmann::json &config, ProcessLauncherInterface::unique_ptr &&launcher)
Definition: python_engine_json_nrp_client.h:37
PythonEngineJSONNRPClientBase
NRP - Python Communicator on the NRP side. Converts DataPackInterface classes from/to JSON objects.
Definition: python_engine_json_nrp_client_base.h:45
plugin.h
python_engine_json_nrp_client_base.h
CREATE_NRP_ENGINE_LAUNCHER
CREATE_NRP_ENGINE_LAUNCHER(PythonEngineJSONLauncher)
NRP_LOGGER_TRACE
#define NRP_LOGGER_TRACE(...)
trace log macro. It is voided by defining \PRODUCTION_RELEASE
Definition: nrp_logger.h:39
json
nlohmann::json json
Definition: engine_json_server.cpp:31