Fixposition SDK 0.0.0-heads/main-0-g7b59b93
Collection of c++ libraries and apps for use with Fixposition products
Loading...
Searching...
No Matches
fpsdk::apps::fpltool::FplToolOptions Class Reference

Program options. More...

#include <fpltool_opts.hpp>

Inheritance diagram for fpsdk::apps::fpltool::FplToolOptions:
Collaboration diagram for fpsdk::apps::fpltool::FplToolOptions:

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.
 

Detailed Description

Program options.

Definition at line 38 of file fpltool_opts.hpp.

Member Enumeration Documentation

◆ Command

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.

Constructor & Destructor Documentation

◆ FplToolOptions()

fpsdk::apps::fpltool::FplToolOptions::FplToolOptions ( )
inline

Definition at line 41 of file fpltool_opts.hpp.

Member Function Documentation

◆ PrintHelp()

void fpsdk::apps::fpltool::FplToolOptions::PrintHelp ( )
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.

◆ HandleOption()

bool fpsdk::apps::fpltool::FplToolOptions::HandleOption ( const Option & option,
const std::string & argument )
inlinefinalvirtual

Handle a command-line flag argument.

Parameters
[in]optionThe option
[in]argumentOptional argument
Returns
true if option was accepted, false otherwise

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().

◆ CheckOptions()

bool fpsdk::apps::fpltool::FplToolOptions::CheckOptions ( const std::vector< std::string > & args)
inlinefinalvirtual

Check options, and handle non-flag arguments.

Parameters
[in]argsThe non-flag arguments
Returns
true if options are good, false otherwise

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.

Member Data Documentation

◆ command_

Command fpsdk::apps::fpltool::FplToolOptions::command_ = Command::UNSPECIFIED

Command to execute.

Definition at line 58 of file fpltool_opts.hpp.

Referenced by CheckOptions().

◆ command_str_

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().

◆ inputs_

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().

◆ output_

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().

◆ overwrite_

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().

◆ extra_

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().

◆ progress_

int fpsdk::apps::fpltool::FplToolOptions::progress_ = 0

Do progress reports.

Definition at line 64 of file fpltool_opts.hpp.

Referenced by CheckOptions(), and HandleOption().

◆ compress_

int fpsdk::apps::fpltool::FplToolOptions::compress_ = 0

Compress output.

Definition at line 65 of file fpltool_opts.hpp.

Referenced by CheckOptions(), and HandleOption().

◆ skip_

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().

◆ duration_

uint32_t fpsdk::apps::fpltool::FplToolOptions::duration_ = 0

Duration [sec].

Definition at line 67 of file fpltool_opts.hpp.

Referenced by CheckOptions(), and HandleOption().


The documentation for this class was generated from the following file: