diff options
author | Brent Stapleton <brent.stapleton@ettus.com> | 2019-01-10 15:19:48 -0800 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-01-16 11:40:23 -0800 |
commit | 601e0ed87bd97a54f5243fffa7ccd60e31e42425 (patch) | |
tree | 596988e677e7929d5c24259d3b0870f93f107ded /host | |
parent | 8bd7498ed9fea9c46fa34705986968416d818029 (diff) | |
download | uhd-601e0ed87bd97a54f5243fffa7ccd60e31e42425.tar.gz uhd-601e0ed87bd97a54f5243fffa7ccd60e31e42425.tar.bz2 uhd-601e0ed87bd97a54f5243fffa7ccd60e31e42425.zip |
examples: utils: skip formatting program options
Turning off clang formatting around the program option declarations.
clang-format makes them looks bad an unreadable because it thinks the
options are function calls or something.
Diffstat (limited to 'host')
42 files changed, 84 insertions, 0 deletions
diff --git a/host/examples/benchmark_rate.cpp b/host/examples/benchmark_rate.cpp index 676b2139b..5e997f59a 100644 --- a/host/examples/benchmark_rate.cpp +++ b/host/examples/benchmark_rate.cpp @@ -299,6 +299,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "single uhd device address args") @@ -327,6 +328,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("seq-threshold", po::value<size_t>(&seq_threshold), "Number of dropped packets (D) which will declare the benchmark a failure.") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/benchmark_streamer.cpp b/host/examples/benchmark_streamer.cpp index 3f9a9f7d4..609e50788 100644 --- a/host/examples/benchmark_streamer.cpp +++ b/host/examples/benchmark_streamer.cpp @@ -621,6 +621,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) { // Setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "single uhd device address args") @@ -645,6 +646,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) { ("duc_ids", po::value<std::string>(&duc_ids)->default_value(""), "optional: list of block IDs for the DUCs") ("split_stream_ids", po::value<std::string>(&split_stream_ids)->default_value(""), "optional: list of block IDs for rx data splitters") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/gpio.cpp b/host/examples/gpio.cpp index d89bf7d1c..537da80ca 100644 --- a/host/examples/gpio.cpp +++ b/host/examples/gpio.cpp @@ -153,6 +153,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "multi uhd device address args") @@ -168,6 +169,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) ("ddr", po::value<std::string>(&ddr_str)->default_value(GPIO_DEFAULT_DDR), "GPIO DDR reg value") ("out", po::value<std::string>(&out_str)->default_value(GPIO_DEFAULT_OUT), "GPIO OUT reg value") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/latency_test.cpp b/host/examples/latency_test.cpp index fd6c98589..9a173b8a4 100644 --- a/host/examples/latency_test.cpp +++ b/host/examples/latency_test.cpp @@ -27,6 +27,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "single uhd device address args") @@ -36,6 +37,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("rate", po::value<double>(&rate)->default_value(100e6/4), "sample rate for receive and transmit (sps)") ("verbose", "specify to enable inner-loop verbose") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/network_relay.cpp b/host/examples/network_relay.cpp index 8f7e180da..3f4a1d711 100644 --- a/host/examples/network_relay.cpp +++ b/host/examples/network_relay.cpp @@ -177,11 +177,13 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("addr", po::value<std::string>(&addr), "the resolvable address of the usrp (must be specified)") ("bind", po::value<std::string>(&bind)->default_value("0.0.0.0"), "bind the server to this network address (default: any)") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/replay_samples_from_file.cpp b/host/examples/replay_samples_from_file.cpp index a8b5d40e9..07691df2b 100644 --- a/host/examples/replay_samples_from_file.cpp +++ b/host/examples/replay_samples_from_file.cpp @@ -63,6 +63,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) size_t radio_id, radio_chan, replay_id, replay_chan, nsamps; po::options_description desc("Allowed Options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "multi uhd device address args") @@ -80,6 +81,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) ("bw", po::value<double>(&bw), "analog front-end filter bandwidth in Hz") ("ref", po::value<std::string>(&ref)->default_value("internal"), "reference source (internal, external, mimo)") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/rfnoc_nullsource_ce_rx.cpp b/host/examples/rfnoc_nullsource_ce_rx.cpp index 6289deabe..f6aa6e1a4 100644 --- a/host/examples/rfnoc_nullsource_ce_rx.cpp +++ b/host/examples/rfnoc_nullsource_ce_rx.cpp @@ -222,6 +222,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value("type=x300"), "multi uhd device address args") @@ -242,6 +243,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) ("blockid", po::value<std::string>(&blockid)->default_value("FIFO"), "The block ID for the processing block.") ("blockid2", po::value<std::string>(&blockid2)->default_value(""), "Optional: The block ID for the 2nd processing block.") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/rfnoc_radio_loopback.cpp b/host/examples/rfnoc_radio_loopback.cpp index 8e0ca9443..f773cfe90 100644 --- a/host/examples/rfnoc_radio_loopback.cpp +++ b/host/examples/rfnoc_radio_loopback.cpp @@ -40,6 +40,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "UHD device address args") @@ -66,6 +67,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) ("bw", po::value<double>(&bw), "Analog frontend filter bandwidth in Hz (Rx and Tx)") ("ref", po::value<std::string>(&ref)->default_value("internal"), "reference source (internal, external, mimo)") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/rfnoc_rx_to_file.cpp b/host/examples/rfnoc_rx_to_file.cpp index 0fe517a66..8993d52b7 100644 --- a/host/examples/rfnoc_rx_to_file.cpp +++ b/host/examples/rfnoc_rx_to_file.cpp @@ -242,6 +242,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("file", po::value<std::string>(&file)->default_value("usrp_samples.dat"), "name of the file to write binary samples to") @@ -274,6 +275,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("block-id", po::value<std::string>(&block_id)->default_value(""), "If block ID is specified, this block is inserted between radio and host.") ("block-args", po::value<std::string>(&block_args)->default_value(""), "These args are passed straight to the block.") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/rx_ascii_art_dft.cpp b/host/examples/rx_ascii_art_dft.cpp index f37f4694e..8e4179fe3 100644 --- a/host/examples/rx_ascii_art_dft.cpp +++ b/host/examples/rx_ascii_art_dft.cpp @@ -33,6 +33,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "multi uhd device address args") @@ -53,6 +54,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("show-controls", po::value<bool>(&show_controls)->default_value(true), "show the keyboard controls") ("int-n", "tune USRP with integer-N tuning") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/rx_multi_samples.cpp b/host/examples/rx_multi_samples.cpp index 7e6e7240a..8c50c5b69 100644 --- a/host/examples/rx_multi_samples.cpp +++ b/host/examples/rx_multi_samples.cpp @@ -29,6 +29,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "single uhd device address args") @@ -40,6 +41,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("dilv", "specify to disable inner-loop verbose") ("channels", po::value<std::string>(&channel_list)->default_value("0"), "which channel(s) to use (specify \"0\", \"1\", \"0,1\", etc)") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/rx_samples_to_file.cpp b/host/examples/rx_samples_to_file.cpp index cd3f00d5c..c459fa257 100644 --- a/host/examples/rx_samples_to_file.cpp +++ b/host/examples/rx_samples_to_file.cpp @@ -234,6 +234,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "multi uhd device address args") @@ -263,6 +264,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("skip-lo", "skip checking LO lock status") ("int-n", "tune USRP with integer-N tuning") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/rx_samples_to_udp.cpp b/host/examples/rx_samples_to_udp.cpp index dfbaab54f..5268de020 100644 --- a/host/examples/rx_samples_to_udp.cpp +++ b/host/examples/rx_samples_to_udp.cpp @@ -31,6 +31,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "multi uhd device address args") @@ -46,6 +47,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("ref", po::value<std::string>(&ref)->default_value("internal"), "reference source (internal, external, mimo)") ("int-n", "tune USRP with integer-N tuning") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/rx_timed_samples.cpp b/host/examples/rx_timed_samples.cpp index 97c59fff0..cfe710409 100644 --- a/host/examples/rx_timed_samples.cpp +++ b/host/examples/rx_timed_samples.cpp @@ -29,6 +29,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "single uhd device address args") @@ -39,6 +40,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("dilv", "specify to disable inner-loop verbose") ("channels", po::value<std::string>(&channel_list)->default_value("0"), "which channel(s) to use (specify \"0\", \"1\", \"0,1\", etc)") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/sync_to_gps.cpp b/host/examples/sync_to_gps.cpp index bb0f77f61..3449aef55 100644 --- a/host/examples/sync_to_gps.cpp +++ b/host/examples/sync_to_gps.cpp @@ -33,10 +33,12 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) //Set up program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "USRP device arguments") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/test_clock_synch.cpp b/host/examples/test_clock_synch.cpp index a0b67a95b..cb34e625c 100644 --- a/host/examples/test_clock_synch.cpp +++ b/host/examples/test_clock_synch.cpp @@ -38,6 +38,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //Set up program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "Display this help message") ("clock-args", po::value<std::string>(&clock_args), "Clock device arguments") @@ -45,6 +46,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("max-interval", po::value<uint32_t>(&max_interval)->default_value(10000), "Maximum interval between comparisons (in ms)") ("num-tests", po::value<uint32_t>(&num_tests)->default_value(10), "Number of times to compare device times") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/test_dboard_coercion.cpp b/host/examples/test_dboard_coercion.cpp index a761f662d..1bbe6a81b 100644 --- a/host/examples/test_dboard_coercion.cpp +++ b/host/examples/test_dboard_coercion.cpp @@ -317,6 +317,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //Set up the program options po::options_description desc("Allowed Options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "Specify the UHD device") @@ -330,6 +331,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("no-rx-gain", "Do not test RX gain") ("verbose", "Output every frequency and gain check instead of just final summary") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/test_messages.cpp b/host/examples/test_messages.cpp index 0f7c289d2..2ff10049d 100644 --- a/host/examples/test_messages.cpp +++ b/host/examples/test_messages.cpp @@ -275,12 +275,14 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "multi uhd device address args") ("ntests", po::value<size_t>(&ntests)->default_value(50), "number of tests to run") ("test-chain", "Run broken chain tests") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/test_pps_input.cpp b/host/examples/test_pps_input.cpp index b3c58da3b..5d11b9dcd 100644 --- a/host/examples/test_pps_input.cpp +++ b/host/examples/test_pps_input.cpp @@ -26,11 +26,13 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "single uhd device address args") ("source", po::value<std::string>(&time_source)->default_value(""), "the time source (gpsdo, external) or blank for default") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/test_timed_commands.cpp b/host/examples/test_timed_commands.cpp index a678df496..f53f3c282 100644 --- a/host/examples/test_timed_commands.cpp +++ b/host/examples/test_timed_commands.cpp @@ -23,10 +23,12 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "single uhd device address args") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/twinrx_freq_hopping.cpp b/host/examples/twinrx_freq_hopping.cpp index e6819adde..f4ce3e528 100644 --- a/host/examples/twinrx_freq_hopping.cpp +++ b/host/examples/twinrx_freq_hopping.cpp @@ -109,6 +109,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ // Set up the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "Print this help message") ("args", po::value<std::string>(&args)->default_value(""), "UHD device args") @@ -123,6 +124,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("fft-path", po::value<std::string>(&fft_path), "Output an FFT to this file (optional)") ("repeat", "repeat sweep until Ctrl-C is pressed") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/tx_bursts.cpp b/host/examples/tx_bursts.cpp index 3ee601c98..3f179b47c 100644 --- a/host/examples/tx_bursts.cpp +++ b/host/examples/tx_bursts.cpp @@ -36,6 +36,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "multi uhd device address args") @@ -51,6 +52,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("channels", po::value<std::string>(&channel_list)->default_value("0"), "which channel(s) to use (specify \"0\", \"1\", \"0,1\", etc") ("int-n", "tune USRP with integer-n tuning") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/tx_samples_from_file.cpp b/host/examples/tx_samples_from_file.cpp index 23c55cf25..40974b4a2 100644 --- a/host/examples/tx_samples_from_file.cpp +++ b/host/examples/tx_samples_from_file.cpp @@ -60,6 +60,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "multi uhd device address args") @@ -83,6 +84,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("repeat", "repeatedly transmit file") ("int-n", "tune USRP with integer-n tuning") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/tx_timed_samples.cpp b/host/examples/tx_timed_samples.cpp index 9df075a82..b57578939 100644 --- a/host/examples/tx_timed_samples.cpp +++ b/host/examples/tx_timed_samples.cpp @@ -29,6 +29,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "single uhd device address args") @@ -39,6 +40,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("ampl", po::value<float>(&l)->default_value(float(0.3)), "amplitude of each sample") ("dilv", "specify to disable inner-loop verbose") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/tx_waveforms.cpp b/host/examples/tx_waveforms.cpp index 1c17e47aa..1698c019d 100644 --- a/host/examples/tx_waveforms.cpp +++ b/host/examples/tx_waveforms.cpp @@ -45,6 +45,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "single uhd device address args") @@ -67,6 +68,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("channels", po::value<std::string>(&channel_list)->default_value("0"), "which channels to use (specify \"0\", \"1\", \"0,1\", etc)") ("int-n", "tune USRP with integer-N tuning") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/txrx_loopback_to_file.cpp b/host/examples/txrx_loopback_to_file.cpp index 03c765fca..cae69e043 100644 --- a/host/examples/txrx_loopback_to_file.cpp +++ b/host/examples/txrx_loopback_to_file.cpp @@ -202,6 +202,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup the program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("tx-args", po::value<std::string>(&tx_args)->default_value(""), "uhd transmit device address args") @@ -233,6 +234,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("tx-int-n", "tune USRP TX with integer-N tuning") ("rx-int-n", "tune USRP RX with integer-N tuning") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/examples/usrp_list_sensors.cpp b/host/examples/usrp_list_sensors.cpp index 6ad2ff999..0ffe33e5a 100644 --- a/host/examples/usrp_list_sensors.cpp +++ b/host/examples/usrp_list_sensors.cpp @@ -91,10 +91,12 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ // Set up program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "Display this help message") ("args", po::value<std::string>(&usrp_args), "USRP device arguments") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/utils/converter_benchmark.cpp b/host/utils/converter_benchmark.cpp index aa3985fd1..cb8cce519 100644 --- a/host/utils/converter_benchmark.cpp +++ b/host/utils/converter_benchmark.cpp @@ -291,6 +291,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) /// Command line arguments po::options_description desc("Converter benchmark options:"); + // clang-format off desc.add_options() ("help", "help message") ("in", po::value<std::string>(&in_format), "Input format (e.g. 'sc16')") @@ -305,6 +306,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) ("seed-mode", po::value<std::string>(&seed_mode)->default_value("random"), "How to initialize the data: random, incremental") ("hex", "When using debug mode, dump memory in hex") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/utils/fx2_init_eeprom.cpp b/host/utils/fx2_init_eeprom.cpp index 9edefcda0..448652faf 100644 --- a/host/utils/fx2_init_eeprom.cpp +++ b/host/utils/fx2_init_eeprom.cpp @@ -33,6 +33,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ std::string type; std::string image; po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("image", po::value<std::string>(), "BIN image file; if not specified, use built-in image") @@ -40,6 +41,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("pid", po::value<std::string>(), "PID of device to program") ("type", po::value<std::string>(&type), "device type (usrp1 or b100, required if using built-in image)") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); diff --git a/host/utils/latency/responder.cpp b/host/utils/latency/responder.cpp index ebe67f732..6216f15e6 100644 --- a/host/utils/latency/responder.cpp +++ b/host/utils/latency/responder.cpp @@ -17,6 +17,7 @@ po::options_description get_program_options_description() { po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("title", po::value<std::string>(&prog.test_title)->default_value(""), "title to show during test") @@ -66,6 +67,7 @@ get_program_options_description() ("priority", po::value<double>(&prog.rt_priority)->default_value(1.0), "scheduler priority") ("no-realtime", "don't enable real-time") ; + // clang-format on return desc; } diff --git a/host/utils/octoclock_burn_eeprom.cpp b/host/utils/octoclock_burn_eeprom.cpp index a4a8adf03..f98f526f6 100644 --- a/host/utils/octoclock_burn_eeprom.cpp +++ b/host/utils/octoclock_burn_eeprom.cpp @@ -25,12 +25,14 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ std::string args, input_str, key, val; po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "device address args [default = \"\"]") ("values", po::value<std::string>(&input_str), "keys+values to read/write, separate multiple by \",\"") ("read-all", "Read all motherboard EEPROM values without writing") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); diff --git a/host/utils/query_gpsdo_sensors.cpp b/host/utils/query_gpsdo_sensors.cpp index f37d9cc4a..6a3ecca13 100644 --- a/host/utils/query_gpsdo_sensors.cpp +++ b/host/utils/query_gpsdo_sensors.cpp @@ -73,11 +73,13 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //Set up program options po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "Device address arguments specifying a single USRP") ("clock", "query a clock device's sensors") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); diff --git a/host/utils/uhd_cal_rx_iq_balance.cpp b/host/utils/uhd_cal_rx_iq_balance.cpp index 81a04b6f9..d8c6a63da 100644 --- a/host/utils/uhd_cal_rx_iq_balance.cpp +++ b/host/utils/uhd_cal_rx_iq_balance.cpp @@ -91,6 +91,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) double precision; po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("verbose", "enable some verbose") @@ -104,6 +105,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) ("nsamps", po::value<size_t>(&nsamps), "Samples per data capture") ("precision", po::value<double>(&precision)->default_value(default_precision), "Correction precision (default=0.0001)") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); diff --git a/host/utils/uhd_cal_tx_dc_offset.cpp b/host/utils/uhd_cal_tx_dc_offset.cpp index 6c35f017f..6519cd9ec 100644 --- a/host/utils/uhd_cal_tx_dc_offset.cpp +++ b/host/utils/uhd_cal_tx_dc_offset.cpp @@ -98,6 +98,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) double precision; po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("verbose", "enable some verbose") @@ -112,6 +113,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) ("nsamps", po::value<size_t>(&nsamps), "Samples per data capture") ("precision", po::value<double>(&precision)->default_value(default_precision), "Correction precision (default=0.0001)") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); diff --git a/host/utils/uhd_cal_tx_iq_balance.cpp b/host/utils/uhd_cal_tx_iq_balance.cpp index d5079431b..4da5a1f96 100644 --- a/host/utils/uhd_cal_tx_iq_balance.cpp +++ b/host/utils/uhd_cal_tx_iq_balance.cpp @@ -95,6 +95,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) double precision; po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("verbose", "enable some verbose") @@ -109,6 +110,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]) ("nsamps", po::value<size_t>(&nsamps), "Samples per data capture") ("precision", po::value<double>(&precision)->default_value(default_precision), "Correction precision (default=0.0001)") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); diff --git a/host/utils/uhd_config_info.cpp b/host/utils/uhd_config_info.cpp index 2b7fb5d6c..2c29af214 100644 --- a/host/utils/uhd_config_info.cpp +++ b/host/utils/uhd_config_info.cpp @@ -17,6 +17,7 @@ namespace po = boost::program_options; int UHD_SAFE_MAIN(int argc, char* argv[]) { // Program Options po::options_description desc("Allowed Options"); + // clang-format off desc.add_options() ("build-date", "Print build date") ("c-compiler", "Print C compiler") @@ -34,6 +35,7 @@ int UHD_SAFE_MAIN(int argc, char* argv[]) { ("version", "Print this UHD build's version") ("help", "Print help message") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); diff --git a/host/utils/uhd_find_devices.cpp b/host/utils/uhd_find_devices.cpp index ab2ba5ab3..504fafcf7 100644 --- a/host/utils/uhd_find_devices.cpp +++ b/host/utils/uhd_find_devices.cpp @@ -29,10 +29,12 @@ namespace po = boost::program_options; int UHD_SAFE_MAIN(int argc, char *argv[]){ po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>()->default_value(""), "device address args") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); diff --git a/host/utils/uhd_image_loader.cpp b/host/utils/uhd_image_loader.cpp index 2ba38a6ec..507a4ac87 100644 --- a/host/utils/uhd_image_loader.cpp +++ b/host/utils/uhd_image_loader.cpp @@ -47,6 +47,7 @@ void sigint_handler(int){ int UHD_SAFE_MAIN(int argc, char *argv[]){ po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>()->default_value(""), "Device args, optional loader args") @@ -57,6 +58,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("no-fpga", "Don't Burn FPGA") ("download", "Download an image to a bit/bin file") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); diff --git a/host/utils/uhd_usrp_probe.cpp b/host/utils/uhd_usrp_probe.cpp index a838049e2..3522b4148 100644 --- a/host/utils/uhd_usrp_probe.cpp +++ b/host/utils/uhd_usrp_probe.cpp @@ -230,6 +230,7 @@ void print_tree(const uhd::fs_path &path, uhd::property_tree::sptr tree){ int UHD_SAFE_MAIN(int argc, char *argv[]){ po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("version", "print the version string and exit") @@ -243,6 +244,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("vector", "when querying a string, interpret that as std::vector") ("init-only", "skip all queries, only initialize device") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); diff --git a/host/utils/usrp_burn_db_eeprom.cpp b/host/utils/usrp_burn_db_eeprom.cpp index f3d6d3346..391c35950 100644 --- a/host/utils/usrp_burn_db_eeprom.cpp +++ b/host/utils/usrp_burn_db_eeprom.cpp @@ -27,6 +27,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ std::string args, slot, unit; po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "device address args [default = \"\"]") @@ -36,6 +37,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("ser", po::value<std::string>(), "serial to burn, omit for readback") ("rev", po::value<std::string>(), "revision to burn, omit for readback") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); diff --git a/host/utils/usrp_burn_mb_eeprom.cpp b/host/utils/usrp_burn_mb_eeprom.cpp index 5e1212d38..e2596d5c4 100644 --- a/host/utils/usrp_burn_mb_eeprom.cpp +++ b/host/utils/usrp_burn_mb_eeprom.cpp @@ -22,12 +22,14 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ std::string args, input_str; po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("args", po::value<std::string>(&args)->default_value(""), "device address args [default = \"\"]") ("values", po::value<std::string>(&input_str), "keys+values to read/write, separate multiple by \",\"") ("read-all", "Read all motherboard EEPROM values without writing") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); diff --git a/host/utils/usrp_e3x0_network_mode.cpp b/host/utils/usrp_e3x0_network_mode.cpp index 937f4db3d..ac4f47e4d 100644 --- a/host/utils/usrp_e3x0_network_mode.cpp +++ b/host/utils/usrp_e3x0_network_mode.cpp @@ -34,10 +34,12 @@ static void check_network_ok(void) int main(int argc, char *argv[]) { po::options_description desc("Allowed options"); + // clang-format off desc.add_options() ("help", "help message") ("fpga", po::value<std::string>(), "fpga image to load") ; + // clang-format on po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); |