Go to the documentation of this file.
22 #ifndef SIMULATION_PARAMS_H
23 #define SIMULATION_PARAMS_H
32 #include <cxxopts.hpp>
33 #include <nlohmann/json.hpp>
59 static constexpr std::string_view
ParamPluginsDesc =
"Engine plugins to load. If omitted, all engines compiled with nrp-core are loaded";
64 static constexpr std::string_view
ParamExpDirDesc =
"The explicit location of the experiment folder";
77 static constexpr std::string_view
ParamLogOutputDesc =
"Option for logging stdout and stderr in the experiment: engines, all, silent";
81 static constexpr std::string_view
ParamLogFilenameDesc =
"If 'logoutput' option is 'engines' or 'all', name of the log file";
85 static constexpr std::string_view
ParamLogDirDesc =
"Directory for the file logs";
90 static constexpr std::string_view
ParamLogConfigDesc =
"Print the simulation config in use to DEBUG log";
95 static constexpr std::string_view
ParamModeDesc =
"Operational mode, standalone or server";
100 static constexpr std::string_view
ParamSimParamDesc =
"Simulation config parameter, specified as param=value, overriding configuration file parameters";
108 static constexpr std::string_view
ParamSlaveDesc =
"If present NRPCoreSim runs in slave mode. For internal use.";
147 static void setCLISimParams(
const std::string& fullKey,
const std::string& value,
nlohmann::json &simulationConfig);
static constexpr std::string_view ParamExpDir
Definition: simulation_parameters.h:62
static constexpr std::string_view ParamFileLogLevelLong
Definition: simulation_parameters.h:72
static constexpr std::string_view ParamLogDirDesc
Definition: simulation_parameters.h:85
static constexpr std::string_view ParamSimCfgFileLong
Definition: simulation_parameters.h:53
static constexpr std::string_view ParamPluginsDesc
Definition: simulation_parameters.h:59
static void parseAndSetCLISimParams(const ParamSimParamT &parseResults, nlohmann::json &simulationConfig)
Parse cmd line simulation parameters.
Definition: simulation_parameters.cpp:148
static constexpr std::string_view ParamSimParam
Definition: simulation_parameters.h:98
static constexpr std::string_view ParamLogConfig
Definition: simulation_parameters.h:88
std::string ParamLogOutputT
Definition: simulation_parameters.h:78
static constexpr std::string_view ParamSimCfgFileDesc
Definition: simulation_parameters.h:54
static constexpr std::string_view ParamServerAddressLong
Definition: simulation_parameters.h:103
static NRPLogger::level_t parseLogLevel(const std::string &logLevel)
parsing input parameter string log level into enum type
Definition: simulation_parameters.cpp:130
static constexpr std::string_view ParamPluginsLong
Definition: simulation_parameters.h:58
Namespace args
Definition: python_json_engine.py:196
static constexpr std::string_view ParamLogDirLong
Definition: simulation_parameters.h:84
static constexpr std::string_view ParamLogFilenameLong
Definition: simulation_parameters.h:80
std::string ParamLogDirT
Definition: simulation_parameters.h:86
static constexpr std::string_view ParamMode
Definition: simulation_parameters.h:93
static constexpr std::string_view ParamServerAddressDesc
Definition: simulation_parameters.h:104
bool ParamSlaveT
Definition: simulation_parameters.h:109
static constexpr std::string_view ParamSlaveLong
Definition: simulation_parameters.h:107
static constexpr std::string_view ParamSimCfgFile
Definition: simulation_parameters.h:52
static constexpr std::string_view ParamConsoleLogLevelDesc
Definition: simulation_parameters.h:69
static constexpr std::string_view ParamHelp
Definition: simulation_parameters.h:47
std::shared_ptr< nlohmann::json > jsonSharedPtr
Definition: json_schema_utils.h:35
static constexpr std::string_view ParamLogFilenameDesc
Definition: simulation_parameters.h:81
NRP Simulation Startup Parameters.
Definition: simulation_parameters.h:41
static constexpr std::string_view ParamLogOutputLong
Definition: simulation_parameters.h:76
static constexpr std::string_view ParamModeLong
Definition: simulation_parameters.h:94
std::vector< std::string > ParamSimParamT
Definition: simulation_parameters.h:101
static constexpr std::string_view ParamExpDirLong
Definition: simulation_parameters.h:63
static constexpr std::string_view ParamExpDirDesc
Definition: simulation_parameters.h:64
static constexpr std::string_view NRPProgramName
Definition: simulation_parameters.h:43
static jsonSharedPtr setWorkingDirectoryAndGetConfigFile(const cxxopts::ParseResult &args)
Get the simulation configuration from start parameters as a JSON object.
Definition: simulation_parameters.cpp:66
static cxxopts::Options createStartParamParser()
Create a parser for start parameters.
Definition: simulation_parameters.cpp:27
std::string ParamFilenameT
Definition: simulation_parameters.h:82
static constexpr std::string_view ParamSlaveDesc
Definition: simulation_parameters.h:108
static constexpr std::string_view ParamLogConfigLong
Definition: simulation_parameters.h:89
std::string ParamModeT
Definition: simulation_parameters.h:96
static constexpr std::string_view ParamPlugins
Definition: simulation_parameters.h:57
static constexpr std::string_view ParamSimParamDesc
Definition: simulation_parameters.h:100
std::string ParamFileLogLevelT
Definition: simulation_parameters.h:74
std::vector< std::string > ParamPluginsT
Definition: simulation_parameters.h:60
std::string ParamSimCfgFileT
Definition: simulation_parameters.h:55
static constexpr std::string_view ParamHelpDesc
Definition: simulation_parameters.h:49
static constexpr std::string_view ParamLogOutputDesc
Definition: simulation_parameters.h:77
std::string ParamConsoleLogLevelT
Definition: simulation_parameters.h:70
spdlog::level::level_enum level_t
The wrapper type for log levels.
Definition: nrp_logger.h:52
static constexpr std::string_view ParamFileLogLevelDesc
Definition: simulation_parameters.h:73
std::string ParamExpDirT
Definition: simulation_parameters.h:65
std::string ParamServerAddressT
Definition: simulation_parameters.h:105
static constexpr std::string_view ParamLogConfigDesc
Definition: simulation_parameters.h:90
bool ParamHelpT
Definition: simulation_parameters.h:50
static constexpr std::string_view ParamModeDesc
Definition: simulation_parameters.h:95
static constexpr std::string_view ParamConsoleLogLevelLong
Definition: simulation_parameters.h:68
bool ParamLogConfigT
Definition: simulation_parameters.h:91
static constexpr std::string_view ProgramDescription
Definition: simulation_parameters.h:44
static constexpr std::string_view ParamSimParamLong
Definition: simulation_parameters.h:99
nlohmann::json json
Definition: engine_json_server.cpp:31
static constexpr std::string_view ParamHelpLong
Definition: simulation_parameters.h:48