8 #include <boost/program_options.hpp> 18 namespace po = boost::program_options;
19 po::options_description desc(
"Options");
23 (
"help,h",
"Display help messages")
24 (
"file,f", po::value<std::string>(&m_File),
25 "The path to the file that contains instructions for the mock gatord")
26 (
"namespace,n", po::value<std::string>(&m_UdsNamespace)->default_value(
"gatord_namespace"),
27 "The Unix domain socket namespace this server will bind to.\n" 28 "This will always be prepended with \\0 to use the abstract namespace")
29 (
"echo,e", po::bool_switch(&m_Echo)->default_value(
false),
30 "Echo packets sent and received to stdout. Disabled by default.\n");
32 catch (
const std::exception& e)
34 std::cerr <<
"Fatal internal error: [" << e.what() <<
"]" << std::endl;
41 po::store(po::parse_command_line(argc, argv, desc), vm);
45 std::cout <<
"Simulate a Gatord server to interact with ArmNN external profiling." << std::endl;
46 std::cout << std::endl;
47 std::cout << desc << std::endl;
51 if (!vm.count(
"file"))
53 std::cout << std::endl <<
"*** Expected --file or -f parameter." << std::endl;
54 std::cout << std::endl;
55 std::cout << desc << std::endl;
62 std::cerr << e.what() << std::endl << std::endl;
63 std::cerr << desc << std::endl;
bool ProcessCommandLine(int argc, char *argv[])
Copyright (c) 2020 ARM Limited.