3 #include <boost/program_options.hpp> 4 #include <crazyflie_cpp/Crazyflie.h> 6 int main(
int argc,
char **argv)
10 std::string defaultUri(
"radio://0/80/2M/E7E7E7E7E7");
12 namespace po = boost::program_options;
14 po::options_description desc(
"Allowed options");
16 (
"help",
"produce help message")
17 (
"uri", po::value<std::string>(&uri)->default_value(defaultUri),
"unique ressource identifier")
23 po::store(po::parse_command_line(argc, argv, desc), vm);
26 if (vm.count(
"help")) {
27 std::cout << desc <<
"\n";
33 std::cerr << e.what() << std::endl << std::endl;
34 std::cerr << desc << std::endl;
46 std::cout << (int)entry.id <<
": " << std::endl;
47 std::cout <<
" type: ";
50 std::cout <<
"EEPROM";
53 std::cout <<
"1-Wire";
62 std::cout <<
"Unknown type!";
65 std::cout << std::endl;
66 std::cout <<
" size: " << entry.size << std::endl;
67 std::cout <<
" addr: " << entry.addr << std::endl;
73 catch(std::exception& e)
75 std::cerr << e.what() << std::endl;
std::vector< MemoryTocEntry >::const_iterator memoriesBegin() const
std::vector< MemoryTocEntry >::const_iterator memoriesEnd() const
int main(int argc, char **argv)