NRP Core  1.4.1
engine_json_config.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 ENGINE_JSON_CONFIG_H
23 #define ENGINE_JSON_CONFIG_H
24 
25 #include <string_view>
26 
28 {
32  static constexpr short MaxAddrBindTries = 1024;
33 
37  static constexpr std::string_view EngineServerAddrArg = "serverurl";
38 
42  static constexpr std::string_view EngineRegistrationServerAddrArg = "regservurl";
43 
47  static constexpr std::string_view EngineNameArg = "engine";
48 
52  static constexpr std::string_view EngineServerGetDataPacksRoute = "/get_datapacks";
53 
57  static constexpr std::string_view EngineServerSetDataPacksRoute = "/set_datapacks";
58 
62  static constexpr std::string_view EngineServerRunLoopStepRoute = "/run_loop";
63 
67  static constexpr std::string_view EngineServerInitializeRoute = "/initialize";
68 
72  static constexpr std::string_view EngineServerResetRoute = "/reset";
73 
77  static constexpr std::string_view EngineServerShutdownRoute = "/shutdown";
78 
82  static constexpr std::string_view EngineTimeStepName = "time_step";
83 
87  static constexpr std::string_view EngineTimeName = "time";
88 
92  static constexpr std::string_view EngineServerContentType = "application/json";
93 };
94 
95 #endif // ENGINE_JSON_CONFIG_H
EngineJSONConfigConst::EngineServerContentType
static constexpr std::string_view EngineServerContentType
Content Type passed between server and client.
Definition: engine_json_config.h:92
EngineJSONConfigConst::EngineTimeName
static constexpr std::string_view EngineTimeName
JSON name under which the runLoopStep engine time is sent.
Definition: engine_json_config.h:87
EngineJSONConfigConst::EngineServerResetRoute
static constexpr std::string_view EngineServerResetRoute
REST Server Route for engine reset.
Definition: engine_json_config.h:72
EngineJSONConfigConst::EngineServerInitializeRoute
static constexpr std::string_view EngineServerInitializeRoute
REST Server Route for engine initialization.
Definition: engine_json_config.h:67
EngineJSONConfigConst::EngineServerSetDataPacksRoute
static constexpr std::string_view EngineServerSetDataPacksRoute
REST Server Route to which to send datapack changes.
Definition: engine_json_config.h:57
EngineJSONConfigConst::EngineRegistrationServerAddrArg
static constexpr std::string_view EngineRegistrationServerAddrArg
Parameter name that is used to pass along the server address.
Definition: engine_json_config.h:42
EngineJSONConfigConst::EngineTimeStepName
static constexpr std::string_view EngineTimeStepName
JSON name under which the runLoopStep timeStep is saved.
Definition: engine_json_config.h:82
EngineJSONConfigConst
Definition: engine_json_config.h:27
EngineJSONConfigConst::EngineServerAddrArg
static constexpr std::string_view EngineServerAddrArg
Parameter name that is used to pass along the server address.
Definition: engine_json_config.h:37
EngineJSONConfigConst::EngineServerRunLoopStepRoute
static constexpr std::string_view EngineServerRunLoopStepRoute
REST Server Route to execute a single loop.
Definition: engine_json_config.h:62
EngineJSONConfigConst::EngineServerShutdownRoute
static constexpr std::string_view EngineServerShutdownRoute
REST Server Route for engine shutdown.
Definition: engine_json_config.h:77
EngineJSONConfigConst::EngineServerGetDataPacksRoute
static constexpr std::string_view EngineServerGetDataPacksRoute
REST Server Route from which to get datapack information.
Definition: engine_json_config.h:52
EngineJSONConfigConst::EngineNameArg
static constexpr std::string_view EngineNameArg
Parameter name that is used to pass along the engine name.
Definition: engine_json_config.h:47
EngineJSONConfigConst::MaxAddrBindTries
static constexpr short MaxAddrBindTries
Maximum amount of tries for EngineJSONserver to bind to different ports.
Definition: engine_json_config.h:32