16 po::options_description options(
"Options");
20 (
"input,i", po::value(&
fInput)->value_name(
"<input>")->required(),
22 (
"input2,j", po::value(&
fInput2)->value_name(
"<input2>"),
23 "second input archive, used for comparison (optional)")
24 (
"port,p", po::value(&
fPort)->value_name(
"<port>")->default_value(8080),
26 (
"sensor", po::value(&
fSensor)->value_name(
"<sensor>"),
27 "sensor to filter on")
29 "produce help message")
34 po::command_line_parser parser {argc, argv};
35 parser.options(options);
37 auto result = parser.run();
38 po::store(result, vm);
40 catch (
const std::exception& e) {
41 std::cerr <<
"Error: " << e.what() << std::endl;
42 std::cerr <<
"Use '-h' to display all valid options." << std::endl;
43 std::exit(EXIT_FAILURE);
46 if (vm.count(
"help") > 0) {
47 std::cout << options << std::endl;
48 std::exit(EXIT_SUCCESS);
56 catch (
const po::required_option& e) {
57 std::cerr <<
"Error: " << e.what() << std::endl;
58 std::cerr <<
"Use '-h' to display all valid options." << std::endl;
59 std::exit(EXIT_FAILURE);