Skip to content

Commit

Permalink
iox-eclipse-iceoryx#846 Introduce RoudiCommandLineArguments struct
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Eltzschig <christian.eltzschig@apex.ai>
  • Loading branch information
elfenpiff committed Nov 17, 2022
1 parent dafb6fa commit 91e4ed1
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions iceoryx_posh/include/iceoryx_posh/roudi/roudi_cmd_line_parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
#ifndef IOX_POSH_ROUDI_ROUDI_CMD_LINE_PARSER_HPP
#define IOX_POSH_ROUDI_ROUDI_CMD_LINE_PARSER_HPP

#include "iceoryx_dust/cli/command_line_argument_definition.hpp"
#include "iceoryx_hoofs/cxx/expected.hpp"
#include "iceoryx_hoofs/cxx/function.hpp"
#include "iceoryx_hoofs/cxx/optional.hpp"
#include "iceoryx_hoofs/internal/units/duration.hpp"
#include "iceoryx_posh/iceoryx_posh_types.hpp"
Expand All @@ -35,6 +37,36 @@ enum class CmdLineParserResult
INFO_OUTPUT_ONLY
};

struct RoudiCommandLineArguments
{
IOX_CLI_DEFINITION(RoudiCommandLineArguments);

IOX_CLI_SWITCH(version, 'v', "version", "Displays the programs version");
IOX_CLI_OPTIONAL(
uint32_t,
killDelay,
roudi::PROCESS_DEFAULT_KILL_DELAY.toSeconds(),
'k',
"kill-delay",
"Sets the delay when RouDi sends SIG_KILL, if apps haven't responded after trying SIGTERM first, in seconds.");
IOX_CLI_OPTIONAL(cxx::string<10>,
compatibility,
"off",
'x',
"compatibility",
"Sets the compatibility check level between runtime and RouDi. Valid values are: off, major, "
"minor, patch, commitId, buildData.");
IOX_CLI_OPTIONAL(
bool, monitoringMode, false, 'm', "monitoring-mode", "Enables/disables process alive monitoring mode.");
IOX_CLI_OPTIONAL(uint16_t, uniqueRoudiId, 0, 'u', "unique-roudi-id", "Set the unique RouDi id.");
IOX_CLI_OPTIONAL(cxx::string<10>,
logLevel,
"debug",
'l',
"log-level",
"Set log level. Valid values are: off, trace, debug, info, warning, error, fatal");
};

class CmdLineParser
{
public:
Expand Down

0 comments on commit 91e4ed1

Please sign in to comment.