diff options
Diffstat (limited to 'host')
| -rw-r--r-- | host/CMakeLists.txt | 8 | ||||
| -rw-r--r-- | host/cmake/Modules/UHDPackage.cmake | 4 | ||||
| -rw-r--r-- | host/docs/gpsdo_b2x0.dox | 7 | ||||
| -rw-r--r-- | host/docs/sync.dox | 10 | ||||
| -rw-r--r-- | host/docs/usrp_b200.dox | 3 | ||||
| -rw-r--r-- | host/include/uhd/stream.hpp | 4 | ||||
| -rw-r--r-- | host/lib/usrp/b200/b200_io_impl.cpp | 2 | ||||
| -rw-r--r-- | host/lib/usrp/gps_ctrl.cpp | 3 | ||||
| -rw-r--r-- | host/lib/usrp/x300/x300_impl.cpp | 16 | ||||
| -rw-r--r-- | host/lib/usrp/x300/x300_impl.hpp | 17 | ||||
| -rw-r--r-- | host/lib/usrp/x300/x300_radio_ctrl_impl.cpp | 17 | ||||
| -rw-r--r-- | host/lib/usrp/x300/x300_radio_ctrl_impl.hpp | 8 | ||||
| -rw-r--r-- | host/lib/usrp/x300/x300_regs.hpp | 2 | ||||
| -rw-r--r-- | host/tests/convert_test.cpp | 8 | ||||
| -rw-r--r-- | host/utils/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | host/utils/uhd_usrp_probe.cpp | 12 | 
16 files changed, 94 insertions, 30 deletions
| diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 4d1654c21..36705731d 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -299,11 +299,17 @@ PYTHON_CHECK_MODULE(  )  PYTHON_CHECK_MODULE( -    "Mako templates 0.4 or greater" +    "Mako templates 0.4.2 or greater"      "mako" "mako.__version__ >= '0.4.2'"      HAVE_PYTHON_MODULE_MAKO  ) +PYTHON_CHECK_MODULE( +    "requests 2.0 or greater" +    "requests" "requests.__version__ >= '2.0'" +    HAVE_PYTHON_MODULE_REQUESTS +) +  ########################################################################  # Create Uninstall Target  ######################################################################## diff --git a/host/cmake/Modules/UHDPackage.cmake b/host/cmake/Modules/UHDPackage.cmake index 6c36407b9..8f0457a6b 100644 --- a/host/cmake/Modules/UHDPackage.cmake +++ b/host/cmake/Modules/UHDPackage.cmake @@ -167,7 +167,7 @@ SET(CPACK_COMPONENTS_ALL libraries headers utilities examples manual doxygen rea  ########################################################################  # Setup CPack Debian  ######################################################################## -SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-all-dev") +SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-all-dev, python-requests")  SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS "python, python-tk")  FOREACH(filename preinst postinst prerm postrm)      LIST(APPEND CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${CMAKE_BINARY_DIR}/debian/${filename}) @@ -185,7 +185,7 @@ CONFIGURE_FILE(  ########################################################################  # Setup CPack RPM  ######################################################################## -SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel") +SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel, python-requests")  FOREACH(filename post_install post_uninstall pre_install pre_uninstall)      STRING(TOUPPER ${filename} filename_upper) diff --git a/host/docs/gpsdo_b2x0.dox b/host/docs/gpsdo_b2x0.dox index a54665427..97d97135a 100644 --- a/host/docs/gpsdo_b2x0.dox +++ b/host/docs/gpsdo_b2x0.dox @@ -69,5 +69,12 @@ using the **gps_gprmc**, and **gps_gpgga** sensors. Location  information can be parsed out of the **gps_gpgga** sensor by using **gpsd**  or another NMEA parser. +\section gpsdob_power Using a power supply with the B2x0 and GPSDO + +The GPSDOs for the B2x0 draw extra power, and when running off of bus power +only, brownouts are possible (although not guaranteed to happen). +It is recommended to use a wall power connector when using a B2x0 in +conjunction with a GPSDO. +  */  // vim:ft=doxygen: diff --git a/host/docs/sync.dox b/host/docs/sync.dox index 8c609f407..15352c3a8 100644 --- a/host/docs/sync.dox +++ b/host/docs/sync.dox @@ -64,10 +64,10 @@ synchronize multiple pairs of devices.  \section sync_time Synchronizing the Device Time  The purpose of the PPS signal is to synchronously latch a time into the -device. You can use the uhd::multi_usrp::set_time_next_pps() function to either +device. You can use the uhd::usrp::multi_usrp::set_time_next_pps() function to either  initialize the sample time to 0 or an absolute time, such as GPS time or  UTC time. For the purposes of synchronizing devices, it doesn't matter -what time you initialize to when using uhd::multi_usrp::set_time_next_pps(). +what time you initialize to when using uhd::usrp::multi_usrp::set_time_next_pps().  \subsection sync_time_reg Method 1 - poll the USRP time registers @@ -80,6 +80,7 @@ determine that a PPS has occurred:      while (last_pps_time == usrp->get_time_last_pps()){          //sleep 100 milliseconds (give or take)      } +    // This command will be processed fairly soon after the last PPS edge:      usrp->set_time_next_pps(uhd::time_spec_t(0.0));  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -97,9 +98,14 @@ PPS edge, and the user can also parse this string to determine GPS time:      //call user's function to wait for NMEA message...      //call user's function to parse the NMEA message... +    gps_time = VALUE_IN_NMEA_MESSAGE; +    // At the next PPS edge, set the device time to the GPS time:      usrp->set_time_next_pps(uhd::time_spec_t(gps_time+1)); +    // Now the device time should be in sync with the GPS time.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Take a look at the `sync_to_gps` example for more detail. +  \subsection sync_time_mimocable Method 3 - MIMO cable  Note: This only applies to USRP2 and N200/N210. This method does *not* diff --git a/host/docs/usrp_b200.dox b/host/docs/usrp_b200.dox index c846e916f..2192ba63e 100644 --- a/host/docs/usrp_b200.dox +++ b/host/docs/usrp_b200.dox @@ -19,8 +19,9 @@      -   Timed sampling in FPGA  \section b200_power Power +  In most cases, USB 3.0 bus power will be sufficient to power the device. -If using USB 2.0 or an internal GPSDO, an external power supply or a cable designed +If using USB 2.0 or a GPSDO, an external power supply or a cable designed  to pull power from 2 USB ports (USB 3.0 dual A to micro-B or B) must be used.  \section b200_imgs Specifying a Non-standard Image diff --git a/host/include/uhd/stream.hpp b/host/include/uhd/stream.hpp index e8f9b7b7a..0dfc94c86 100644 --- a/host/include/uhd/stream.hpp +++ b/host/include/uhd/stream.hpp @@ -217,6 +217,10 @@ public:       * the call will return after a single packet has been processed.       * This may be useful to maintain packet boundaries in some cases.       * +     * Note on threading: recv() is *not* thread-safe, to avoid locking +     * overhead. The application calling recv() is responsible for making +     * sure that not more than one thread can call recv() at the same time. +     *       * \param buffs a vector of writable memory to fill with samples       * \param nsamps_per_buff the size of each buffer in number of samples       * \param metadata data to fill describing the buffer diff --git a/host/lib/usrp/b200/b200_io_impl.cpp b/host/lib/usrp/b200/b200_io_impl.cpp index 283091140..d1468332e 100644 --- a/host/lib/usrp/b200/b200_io_impl.cpp +++ b/host/lib/usrp/b200/b200_io_impl.cpp @@ -501,7 +501,7 @@ tx_streamer::sptr b200_impl::get_tx_stream(const uhd::stream_args_t &args_)      if (_tree->access<bool>("/mboards/0/auto_tick_rate").get()) {          set_auto_tick_rate(0, "", args.channels.size());      } -    check_streamer_args(args, this->get_tick_rate(), "RX"); +    check_streamer_args(args, this->get_tick_rate(), "TX");      boost::shared_ptr<sph::send_packet_streamer> my_streamer;      for (size_t stream_i = 0; stream_i < args.channels.size(); stream_i++) diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp index bfc243d79..2c78b1834 100644 --- a/host/lib/usrp/gps_ctrl.cpp +++ b/host/lib/usrp/gps_ctrl.cpp @@ -1,5 +1,5 @@  // -// Copyright 2010-2011,2014-2015 Ettus Research LLC +// Copyright 2010-2011,2014-2016 Ettus Research LLC  //  // This program is free software: you can redistribute it and/or modify  // it under the terms of the GNU General Public License as published by @@ -135,7 +135,6 @@ private:    void update_cache() {      if(not gps_detected() or (_gps_type != GPS_TYPE_INTERNAL_GPSDO)) { -        UHD_MSG(error) << "get_stat(): unsupported GPS or no GPS detected";          return;      } diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index 7f7fcad09..e4f6d6fb8 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -960,7 +960,12 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)          BOOST_FOREACH(const rfnoc::block_id_t &id, radio_ids) {              rfnoc::x300_radio_ctrl_impl::sptr radio(get_block_ctrl<rfnoc::x300_radio_ctrl_impl>(id));              mb.radios.push_back(radio); -            radio->setup_radio(mb.zpu_i2c, mb.clock, dev_addr.has_key("self_cal_adc_delay")); +            radio->setup_radio( +                    mb.zpu_i2c, +                    mb.clock, +                    dev_addr.has_key("ignore-cal-file"), +                    dev_addr.has_key("self_cal_adc_delay") +            );          }          //////////////////////////////////////////////////////////////////// @@ -1440,11 +1445,6 @@ bool x300_impl::is_pps_present(mboard_members_t& mb)   * eeprom   **********************************************************************/ -void x300_impl::set_db_eeprom(i2c_iface::sptr i2c, const size_t addr, const uhd::usrp::dboard_eeprom_t &db_eeprom) -{ -    db_eeprom.store(*i2c, addr); -} -  void x300_impl::set_mb_eeprom(i2c_iface::sptr i2c, const mboard_eeprom_t &mb_eeprom)  {      i2c_iface::sptr eeprom16 = i2c->eeprom16(); @@ -1664,6 +1664,7 @@ x300_impl::x300_mboard_t x300_impl::get_mb_type_from_pcie(const std::string& res                  case X310_2943R_40MHz_PCIE_SSID_ADC_18:                  case X310_2943R_120MHz_PCIE_SSID_ADC_18:                  case X310_2944R_40MHz_PCIE_SSID_ADC_18: +                case X310_2945R_PCIE_SSID_ADC_18:                  case X310_2950R_40MHz_PCIE_SSID_ADC_18:                  case X310_2950R_120MHz_PCIE_SSID_ADC_18:                  case X310_2952R_40MHz_PCIE_SSID_ADC_18: @@ -1671,6 +1672,7 @@ x300_impl::x300_mboard_t x300_impl::get_mb_type_from_pcie(const std::string& res                  case X310_2953R_40MHz_PCIE_SSID_ADC_18:                  case X310_2953R_120MHz_PCIE_SSID_ADC_18:                  case X310_2954R_40MHz_PCIE_SSID_ADC_18: +                case X310_2955R_PCIE_SSID_ADC_18:                      mb_type = USRP_X310_MB; break;                  default:                      mb_type = UNKNOWN;      break; @@ -1721,6 +1723,7 @@ x300_impl::x300_mboard_t x300_impl::get_mb_type_from_eeprom(const uhd::usrp::mbo              case X310_2943R_40MHz_PCIE_SSID_ADC_18:              case X310_2943R_120MHz_PCIE_SSID_ADC_18:              case X310_2944R_40MHz_PCIE_SSID_ADC_18: +            case X310_2945R_PCIE_SSID_ADC_18:              case X310_2950R_40MHz_PCIE_SSID_ADC_18:              case X310_2950R_120MHz_PCIE_SSID_ADC_18:              case X310_2952R_40MHz_PCIE_SSID_ADC_18: @@ -1728,6 +1731,7 @@ x300_impl::x300_mboard_t x300_impl::get_mb_type_from_eeprom(const uhd::usrp::mbo              case X310_2953R_40MHz_PCIE_SSID_ADC_18:              case X310_2953R_120MHz_PCIE_SSID_ADC_18:              case X310_2954R_40MHz_PCIE_SSID_ADC_18: +            case X310_2955R_PCIE_SSID_ADC_18:                  mb_type = USRP_X310_MB; break;              default:                  UHD_MSG(warning) << "X300 unknown product code in EEPROM: " << product_num << std::endl; diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp index d491e2bc0..ee42dcf3e 100644 --- a/host/lib/usrp/x300/x300_impl.hpp +++ b/host/lib/usrp/x300/x300_impl.hpp @@ -1,5 +1,5 @@  // -// Copyright 2013-2015 Ettus Research LLC +// Copyright 2013-2016 Ettus Research LLC  //  // This program is free software: you can redistribute it and/or modify  // it under the terms of the GNU General Public License as published by @@ -61,8 +61,8 @@ static const size_t X300_PCIE_MSG_NUM_FRAMES        = 64;  static const size_t X300_PCIE_MAX_CHANNELS          = 6;  static const size_t X300_PCIE_MAX_MUXED_XPORTS      = 32; -static const size_t X300_10GE_DATA_FRAME_MAX_SIZE   = 8000;     //bytes -static const size_t X300_1GE_DATA_FRAME_MAX_SIZE    = 1472;     //bytes +static const size_t X300_10GE_DATA_FRAME_MAX_SIZE   = 8000;     // CHDR packet size in bytes +static const size_t X300_1GE_DATA_FRAME_MAX_SIZE    = 1472;     // CHDR packet size in bytes  static const size_t X300_ETH_MSG_FRAME_SIZE         = uhd::transport::udp_simple::mtu;  //bytes  static const double X300_THREAD_BUFFER_TIMEOUT      = 0.1;   // Time in seconds @@ -72,8 +72,14 @@ static const size_t X300_ETH_DATA_NUM_FRAMES        = 32;  static const double X300_DEFAULT_SYSREF_RATE        = 10e6;  static const size_t X300_MAX_RATE_PCIE              = 800000000; // bytes/s -static const size_t X300_MAX_RATE_10GIGE            = 800000000; // bytes/s -static const size_t X300_MAX_RATE_1GIGE             = 100000000; // bytes/s +static const size_t X300_MAX_RATE_10GIGE            = (size_t)(  // bytes/s +        10e9 / 8 *                                               // wire speed multiplied by percentage of packets that is sample data +        ( float(X300_10GE_DATA_FRAME_MAX_SIZE - uhd::usrp::DEVICE3_TX_MAX_HDR_LEN) / +          float(X300_10GE_DATA_FRAME_MAX_SIZE + 8 /* UDP header */ + 20 /* Ethernet header length */ ))); +static const size_t X300_MAX_RATE_1GIGE            = (size_t)(  // bytes/s +        10e9 / 8 *                                               // wire speed multiplied by percentage of packets that is sample data +        ( float(X300_1GE_DATA_FRAME_MAX_SIZE - uhd::usrp::DEVICE3_TX_MAX_HDR_LEN) / +          float(X300_1GE_DATA_FRAME_MAX_SIZE + 8 /* UDP header */ + 20 /* Ethernet header length */ )));  #define X300_RADIO_DEST_PREFIX_TX 0 @@ -260,7 +266,6 @@ private:      bool wait_for_clk_locked(mboard_members_t& mb, boost::uint32_t which, double timeout);      bool is_pps_present(mboard_members_t& mb); -    void set_db_eeprom(uhd::i2c_iface::sptr i2c, const size_t, const uhd::usrp::dboard_eeprom_t &);      void set_mb_eeprom(uhd::i2c_iface::sptr i2c, const uhd::usrp::mboard_eeprom_t &);      void check_fw_compat(const uhd::fs_path &mb_path, uhd::wb_iface::sptr iface); diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp index e1b724db6..e11548703 100644 --- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp +++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp @@ -297,9 +297,14 @@ double x300_radio_ctrl_impl::get_output_samp_rate(size_t chan)  /****************************************************************************   * Radio control and setup   ***************************************************************************/ -void x300_radio_ctrl_impl::setup_radio(uhd::i2c_iface::sptr zpu_i2c, x300_clock_ctrl::sptr clock, bool verbose) +void x300_radio_ctrl_impl::setup_radio( +        uhd::i2c_iface::sptr zpu_i2c, +        x300_clock_ctrl::sptr clock, +        bool ignore_cal_file, +        bool verbose)  {      _self_cal_adc_capture_delay(verbose); +    _ignore_cal_file = ignore_cal_file;      ////////////////////////////////////////////////////////////////////      // create RF frontend interfacing @@ -322,8 +327,8 @@ void x300_radio_ctrl_impl::setup_radio(uhd::i2c_iface::sptr zpu_i2c, x300_clock_          //Add to tree          _tree->create<dboard_eeprom_t>(db_path / EEPROM_PATHS[i])              .set(_db_eeproms[addr]) -            .add_coerced_subscriber(boost::bind(&dboard_eeprom_t::store, -                _db_eeproms[addr], boost::ref(*zpu_i2c), (BASE_ADDR | addr))); +            .add_coerced_subscriber(boost::bind(&x300_radio_ctrl_impl::_set_db_eeprom, +                this, zpu_i2c, (BASE_ADDR | addr), _1));      }      //create a new dboard interface @@ -855,6 +860,12 @@ void x300_radio_ctrl_impl::_check_adc(const boost::uint32_t val)      }  } +void x300_radio_ctrl_impl::_set_db_eeprom(i2c_iface::sptr i2c, const size_t addr, const uhd::usrp::dboard_eeprom_t &db_eeprom) +{ +    db_eeprom.store(*i2c, addr); +    _db_eeproms[addr] = db_eeprom; +} +  /****************************************************************************   * Helpers   ***************************************************************************/ diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp index 770519eba..46540a0c7 100644 --- a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp +++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp @@ -73,7 +73,11 @@ public:      /*! Set up the radio. No API calls may be made before this one.       */      void setup_radio( -        uhd::i2c_iface::sptr zpu_i2c, x300_clock_ctrl::sptr clock, bool verbose); +        uhd::i2c_iface::sptr zpu_i2c, +        x300_clock_ctrl::sptr clock, +        bool ignore_cal_file, +        bool verbose +    );      void reset_codec(); @@ -152,6 +156,8 @@ private:      void _check_adc(const boost::uint32_t val); +    void _set_db_eeprom(uhd::i2c_iface::sptr i2c, const size_t, const uhd::usrp::dboard_eeprom_t &); +      void set_rx_fe_corrections(const uhd::fs_path &db_path, const uhd::fs_path &rx_fe_corr_path, const double lo_freq);      void set_tx_fe_corrections(const uhd::fs_path &db_path, const uhd::fs_path &tx_fe_corr_path, const double lo_freq); diff --git a/host/lib/usrp/x300/x300_regs.hpp b/host/lib/usrp/x300/x300_regs.hpp index c5ed1460b..80d275949 100644 --- a/host/lib/usrp/x300/x300_regs.hpp +++ b/host/lib/usrp/x300/x300_regs.hpp @@ -104,6 +104,7 @@ static const uint32_t X310_2942R_120MHz_PCIE_SSID_ADC_18 = 0x785C;  static const uint32_t X310_2943R_40MHz_PCIE_SSID_ADC_18  = 0x7855;  static const uint32_t X310_2943R_120MHz_PCIE_SSID_ADC_18 = 0x785D;  static const uint32_t X310_2944R_40MHz_PCIE_SSID_ADC_18  = 0x7856; +static const uint32_t X310_2945R_PCIE_SSID_ADC_18        = 0x78EF;  static const uint32_t X310_2950R_40MHz_PCIE_SSID_ADC_18  = 0x7857;  static const uint32_t X310_2950R_120MHz_PCIE_SSID_ADC_18 = 0x785E;  static const uint32_t X310_2952R_40MHz_PCIE_SSID_ADC_18  = 0x7858; @@ -111,6 +112,7 @@ static const uint32_t X310_2952R_120MHz_PCIE_SSID_ADC_18 = 0x785F;  static const uint32_t X310_2953R_40MHz_PCIE_SSID_ADC_18  = 0x7859;  static const uint32_t X310_2953R_120MHz_PCIE_SSID_ADC_18 = 0x7860;  static const uint32_t X310_2954R_40MHz_PCIE_SSID_ADC_18  = 0x785A; +static const uint32_t X310_2955R_PCIE_SSID_ADC_18        = 0x78F0;  static const uint32_t FPGA_X3xx_SIG_VALUE   = 0x58333030; diff --git a/host/tests/convert_test.cpp b/host/tests/convert_test.cpp index 8d359d2e2..84e7480a6 100644 --- a/host/tests/convert_test.cpp +++ b/host/tests/convert_test.cpp @@ -76,8 +76,8 @@ static void test_convert_types_sc16(      //fill the input samples      std::vector<sc16_t> input(nsamps), output(nsamps);      BOOST_FOREACH(sc16_t &in, input) in = sc16_t( -        short(((std::rand()/double(RAND_MAX/2)) - 1)*32767/extra_div), -        short(((std::rand()/double(RAND_MAX/2)) - 1)*32767/extra_div) +        short((float((std::rand())/(double(RAND_MAX)/2)) - 1)*32767/extra_div), +        short((float((std::rand())/(double(RAND_MAX)/2)) - 1)*32767/extra_div)      );      //run the loopback and test @@ -127,8 +127,8 @@ static void test_convert_types_for_floats(      //fill the input samples      std::vector<data_type> input(nsamps), output(nsamps);      BOOST_FOREACH(data_type &in, input) in = data_type( -        ((std::rand()/value_type(RAND_MAX/2)) - 1)*float(extra_scale), -        ((std::rand()/value_type(RAND_MAX/2)) - 1)*float(extra_scale) +        ((std::rand()/(value_type(RAND_MAX)/2)) - 1)*float(extra_scale), +        ((std::rand()/(value_type(RAND_MAX)/2)) - 1)*float(extra_scale)      );      //run the loopback and test diff --git a/host/utils/CMakeLists.txt b/host/utils/CMakeLists.txt index 6f72c97bc..eb5a29df9 100644 --- a/host/utils/CMakeLists.txt +++ b/host/utils/CMakeLists.txt @@ -149,6 +149,9 @@ IF(LINUX)          COMPONENT utilities      )  ENDIF(LINUX) +IF(NOT HAVE_PYTHON_MODULE_REQUESTS) +    MESSAGE(WARNING "Module requests not found -- uhd_images_downloader.py will not work without it.") +ENDIF(NOT HAVE_PYTHON_MODULE_REQUESTS)  IF(ENABLE_USRP2)      SET(burners diff --git a/host/utils/uhd_usrp_probe.cpp b/host/utils/uhd_usrp_probe.cpp index 49e00d53a..5fc407bfa 100644 --- a/host/utils/uhd_usrp_probe.cpp +++ b/host/utils/uhd_usrp_probe.cpp @@ -228,6 +228,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){          ("int", po::value<std::string>(), "query a integer value from the property tree")          ("sensor", po::value<std::string>(), "query a sensor value from the property tree")          ("range", po::value<std::string>(), "query a range (gain, bandwidth, frequency, ...)  from the property tree") +        ("vector", "when querying a string, interpret that as std::vector")          ("init-only", "skip all queries, only initialize device")      ; @@ -250,7 +251,16 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){      property_tree::sptr tree = dev->get_tree();      if (vm.count("string")){ -        std::cout << tree->access<std::string>(vm["string"].as<std::string>()).get() << std::endl; +        if (vm.count("vector")) { +            std::vector<std::string> str_vector = tree->access< std::vector<std::string> >(vm["string"].as<std::string>()).get(); +            std::cout << "("; +            BOOST_FOREACH(const std::string &str, str_vector) { +                std::cout << str << ","; +            } +            std::cout << ")" << std::endl; +        } else { +            std::cout << tree->access<std::string>(vm["string"].as<std::string>()).get() << std::endl; +        }          return EXIT_SUCCESS;      } | 
