Fixposition SDK 0.0.0-heads/main-0-g7b59b93
Collection of c++ libraries and apps for use with Fixposition products
|
Program options. More...
#include <fpltool_opts.hpp>
Public Types | |
enum class | Command { UNSPECIFIED , DUMP , META , ROSBAG , TRIM , RECORD } |
Commands, modes of operation. More... | |
Public Member Functions | |
void | PrintHelp () final |
Print the help screen and exit(0) | |
bool | HandleOption (const Option &option, const std::string &argument) final |
Handle a command-line flag argument. | |
bool | CheckOptions (const std::vector< std::string > &args) final |
Check options, and handle non-flag arguments. | |
Public Member Functions inherited from fpsdk::common::app::ProgramOptions | |
ProgramOptions (const std::string &app_name, const std::vector< Option > &options) | |
Constructor. | |
virtual | ~ProgramOptions () |
Destructor. | |
bool | LoadFromArgv (int argc, char **argv) |
Load arguments from argv[]. | |
Public Attributes | |
Command | command_ = Command::UNSPECIFIED |
Command to execute. | |
std::string | command_str_ |
String of command_, for debugging. | |
std::vector< std::string > | inputs_ |
List of input (files), or other positional arguments. | |
std::string | output_ |
Output (file or directory, depending on command) | |
bool | overwrite_ = false |
Overwrite existing output files. | |
int | extra_ = 0 |
Enable extra output, such as hexdumps. | |
int | progress_ = 0 |
Do progress reports. | |
int | compress_ = 0 |
Compress output. | |
uint32_t | skip_ = 0 |
Skip start [sec]. | |
uint32_t | duration_ = 0 |
Duration [sec]. | |
Public Attributes inherited from fpsdk::common::app::ProgramOptions | |
std::string | app_name_ |
App name. | |
logging::LoggingLevel | logging_ = logging::LoggingLevel::INFO |
Logging verbosity level. | |
std::vector< std::string > | argv_ |
argv[] of program | |
Additional Inherited Members | |
Static Public Attributes inherited from fpsdk::common::app::ProgramOptions | |
static constexpr const char * | COMMON_FLAGS_HELP |
Help screen for common options. | |
Program options.
Definition at line 38 of file fpltool_opts.hpp.
|
strong |
Commands, modes of operation.
Enumerator | |
---|---|
UNSPECIFIED | Bad command. |
DUMP | Dump a log (for debugging) |
META | Get logfile meta data. |
ROSBAG | Create ROS bag from log. |
TRIM | Trim .fpl file. |
RECORD | Record a log. |
Definition at line 47 of file fpltool_opts.hpp.
|
inline |
Definition at line 41 of file fpltool_opts.hpp.
|
inlinefinalvirtual |
Print the help screen and exit(0)
Implements fpsdk::common::app::ProgramOptions.
Definition at line 70 of file fpltool_opts.hpp.
References fpsdk::common::app::ProgramOptions::COMMON_FLAGS_HELP.
|
inlinefinalvirtual |
Handle a command-line flag argument.
[in] | option | The option |
[in] | argument | Optional argument |
Implements fpsdk::common::app::ProgramOptions.
Definition at line 140 of file fpltool_opts.hpp.
References compress_, duration_, extra_, output_, overwrite_, progress_, skip_, and fpsdk::common::string::StrToValue().
|
inlinefinalvirtual |
Check options, and handle non-flag arguments.
[in] | args | The non-flag arguments |
Reimplemented from fpsdk::common::app::ProgramOptions.
Definition at line 181 of file fpltool_opts.hpp.
References command_, command_str_, compress_, DEBUG, DUMP, duration_, extra_, inputs_, META, output_, overwrite_, progress_, RECORD, ROSBAG, skip_, TRIM, and WARNING.
Command fpsdk::apps::fpltool::FplToolOptions::command_ = Command::UNSPECIFIED |
std::string fpsdk::apps::fpltool::FplToolOptions::command_str_ |
String of command_, for debugging.
Definition at line 59 of file fpltool_opts.hpp.
Referenced by CheckOptions().
std::vector<std::string> fpsdk::apps::fpltool::FplToolOptions::inputs_ |
List of input (files), or other positional arguments.
Definition at line 60 of file fpltool_opts.hpp.
Referenced by CheckOptions().
std::string fpsdk::apps::fpltool::FplToolOptions::output_ |
Output (file or directory, depending on command)
Definition at line 61 of file fpltool_opts.hpp.
Referenced by CheckOptions(), and HandleOption().
bool fpsdk::apps::fpltool::FplToolOptions::overwrite_ = false |
Overwrite existing output files.
Definition at line 62 of file fpltool_opts.hpp.
Referenced by CheckOptions(), and HandleOption().
int fpsdk::apps::fpltool::FplToolOptions::extra_ = 0 |
Enable extra output, such as hexdumps.
Definition at line 63 of file fpltool_opts.hpp.
Referenced by CheckOptions(), and HandleOption().
int fpsdk::apps::fpltool::FplToolOptions::progress_ = 0 |
Do progress reports.
Definition at line 64 of file fpltool_opts.hpp.
Referenced by CheckOptions(), and HandleOption().
int fpsdk::apps::fpltool::FplToolOptions::compress_ = 0 |
Compress output.
Definition at line 65 of file fpltool_opts.hpp.
Referenced by CheckOptions(), and HandleOption().
uint32_t fpsdk::apps::fpltool::FplToolOptions::skip_ = 0 |
Skip start [sec].
Definition at line 66 of file fpltool_opts.hpp.
Referenced by CheckOptions(), and HandleOption().
uint32_t fpsdk::apps::fpltool::FplToolOptions::duration_ = 0 |
Duration [sec].
Definition at line 67 of file fpltool_opts.hpp.
Referenced by CheckOptions(), and HandleOption().