From 3fb067567b0c799b3c707938491eb8489d85fefa Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 10 Apr 2012 18:54:11 -0700 Subject: uhd: bumped version num to 3.4.1 for release --- host/cmake/Modules/UHDVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host') diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake index b9ddddae3..734ef97e6 100644 --- a/host/cmake/Modules/UHDVersion.cmake +++ b/host/cmake/Modules/UHDVersion.cmake @@ -27,7 +27,7 @@ FIND_PACKAGE(Git QUIET) ######################################################################## SET(UHD_VERSION_MAJOR 003) SET(UHD_VERSION_MINOR 004) -SET(UHD_VERSION_PATCH 000) +SET(UHD_VERSION_PATCH 001) ######################################################################## # Version information discovery through git log -- cgit v1.2.3 From 34627f1c7780d8c8578964c6594fef7a6640e727 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 12 Apr 2012 09:46:38 -0700 Subject: utils: card/net burner string decode --- host/utils/usrp2_card_burner.py | 2 +- host/utils/usrp_n2xx_net_burner.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'host') diff --git a/host/utils/usrp2_card_burner.py b/host/utils/usrp2_card_burner.py index 34c40d5a0..02d5c4b18 100755 --- a/host/utils/usrp2_card_burner.py +++ b/host/utils/usrp2_card_burner.py @@ -50,7 +50,7 @@ def command(*args): stderr=subprocess.STDOUT, ) ret = p.wait() - verbose = p.stdout.read().decode() + verbose = p.stdout.read().decode('utf-8', errors='ignore') if ret != 0: raise Exception(verbose) return verbose diff --git a/host/utils/usrp_n2xx_net_burner.py b/host/utils/usrp_n2xx_net_burner.py index 31c94405b..ae6219524 100755 --- a/host/utils/usrp_n2xx_net_burner.py +++ b/host/utils/usrp_n2xx_net_burner.py @@ -134,7 +134,7 @@ def command(*args): stderr=subprocess.STDOUT, ) ret = p.wait() - verbose = p.stdout.read().decode() + verbose = p.stdout.read().decode('utf-8', errors='ignore') if ret != 0: raise Exception(verbose) return verbose -- cgit v1.2.3 From 44b68ee80adbfc70869a5fc20ec93c4843f039e0 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Thu, 12 Apr 2012 10:37:54 -0700 Subject: cmake: UHDVersion.cmake gets rid of git commit number if 'release' is specified in UHD_RELEASE_MODE --- host/cmake/Modules/UHDVersion.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'host') diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake index 734ef97e6..13d952353 100644 --- a/host/cmake/Modules/UHDVersion.cmake +++ b/host/cmake/Modules/UHDVersion.cmake @@ -68,4 +68,8 @@ IF(UHD_RELEASE_MODE) ENDIF() ######################################################################## -SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}-${UHD_GIT_COUNT}-${UHD_GIT_HASH}") +IF(UHD_RELEASE_MODE STREQUAL "release") + SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}-${UHD_GIT_HASH}") +ELSE() + SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}-${UHD_GIT_COUNT}-${UHD_GIT_HASH}") +ENDIF() -- cgit v1.2.3 From 749633397f11e47cde21a547d09c11af6199bfcf Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 13 Apr 2012 11:50:39 -0700 Subject: examples: added multi-channel and host format options to benchmark --- host/examples/benchmark_rate.cpp | 57 +++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 16 deletions(-) (limited to 'host') diff --git a/host/examples/benchmark_rate.cpp b/host/examples/benchmark_rate.cpp index 8f00e25de..8a000f6c3 100644 --- a/host/examples/benchmark_rate.cpp +++ b/host/examples/benchmark_rate.cpp @@ -1,5 +1,5 @@ // -// Copyright 2011 Ettus Research LLC +// Copyright 2011-2012 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 @@ -16,6 +16,7 @@ // #include +#include #include #include #include @@ -40,11 +41,13 @@ unsigned long long num_seq_errors = 0; /*********************************************************************** * Benchmark RX Rate **********************************************************************/ -void benchmark_rx_rate(uhd::usrp::multi_usrp::sptr usrp, const std::string &rx_otw){ +void benchmark_rx_rate(uhd::usrp::multi_usrp::sptr usrp, const std::string &rx_cpu, const std::string &rx_otw){ uhd::set_thread_priority_safe(); //create a receive streamer - uhd::stream_args_t stream_args("fc32", rx_otw); //complex floats + uhd::stream_args_t stream_args(rx_cpu, rx_otw); + for (size_t ch = 0; ch < usrp->get_num_mboards(); ch++) //linear channel mapping + stream_args.channels.push_back(ch); uhd::rx_streamer::sptr rx_stream = usrp->get_rx_stream(stream_args); //print pre-test summary @@ -55,16 +58,20 @@ void benchmark_rx_rate(uhd::usrp::multi_usrp::sptr usrp, const std::string &rx_o //setup variables and allocate buffer uhd::rx_metadata_t md; const size_t max_samps_per_packet = rx_stream->get_max_num_samps(); - std::vector > buff(max_samps_per_packet); + std::vector buff(max_samps_per_packet*uhd::convert::get_bytes_per_item(rx_cpu)); + std::vector buffs; + for (size_t ch = 0; ch < stream_args.channels.size(); ch++) + buffs.push_back(&buff.front()); //same buffer for each channel bool had_an_overflow = false; uhd::time_spec_t last_time; const double rate = usrp->get_rx_rate(); - usrp->issue_stream_cmd(uhd::stream_cmd_t::STREAM_MODE_START_CONTINUOUS); + uhd::stream_cmd_t cmd(uhd::stream_cmd_t::STREAM_MODE_START_CONTINUOUS); + cmd.time_spec = usrp->get_time_now() + uhd::time_spec_t(0.05); + cmd.stream_now = (buffs.size() == 1); + usrp->issue_stream_cmd(cmd); while (not boost::this_thread::interruption_requested()){ - num_rx_samps += rx_stream->recv( - &buff.front(), buff.size(), md - ); + num_rx_samps += rx_stream->recv(buffs, max_samps_per_packet, md); //handle the error codes switch(md.error_code){ @@ -94,11 +101,13 @@ void benchmark_rx_rate(uhd::usrp::multi_usrp::sptr usrp, const std::string &rx_o /*********************************************************************** * Benchmark TX Rate **********************************************************************/ -void benchmark_tx_rate(uhd::usrp::multi_usrp::sptr usrp, const std::string &tx_otw){ +void benchmark_tx_rate(uhd::usrp::multi_usrp::sptr usrp, const std::string &tx_cpu, const std::string &tx_otw){ uhd::set_thread_priority_safe(); //create a transmit streamer - uhd::stream_args_t stream_args("fc32", tx_otw); //complex floats + uhd::stream_args_t stream_args(tx_cpu, tx_otw); + for (size_t ch = 0; ch < usrp->get_num_mboards(); ch++) //linear channel mapping + stream_args.channels.push_back(ch); uhd::tx_streamer::sptr tx_stream = usrp->get_tx_stream(stream_args); //print pre-test summary @@ -108,17 +117,22 @@ void benchmark_tx_rate(uhd::usrp::multi_usrp::sptr usrp, const std::string &tx_o //setup variables and allocate buffer uhd::tx_metadata_t md; - md.has_time_spec = false; + md.time_spec = usrp->get_time_now() + uhd::time_spec_t(0.05); const size_t max_samps_per_packet = tx_stream->get_max_num_samps(); - std::vector > buff(max_samps_per_packet); + std::vector buff(max_samps_per_packet*uhd::convert::get_bytes_per_item(tx_cpu)); + std::vector buffs; + for (size_t ch = 0; ch < stream_args.channels.size(); ch++) + buffs.push_back(&buff.front()); //same buffer for each channel + md.has_time_spec = (buffs.size() != 1); while (not boost::this_thread::interruption_requested()){ - num_tx_samps += tx_stream->send(&buff.front(), buff.size(), md); + num_tx_samps += tx_stream->send(buffs, max_samps_per_packet, md); + md.has_time_spec = false; } //send a mini EOB packet md.end_of_burst = true; - tx_stream->send("", 0, md); + tx_stream->send(buffs, 0, md); } void benchmark_tx_rate_async_helper(uhd::usrp::multi_usrp::sptr usrp){ @@ -163,6 +177,8 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ double duration; double rx_rate, tx_rate; std::string rx_otw, tx_otw; + std::string rx_cpu, tx_cpu; + std::string mode; //setup the program options po::options_description desc("Allowed options"); @@ -174,6 +190,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("tx_rate", po::value(&tx_rate), "specify to perform a TX rate test (sps)") ("rx_otw", po::value(&rx_otw)->default_value("sc16"), "specify the over-the-wire sample mode for RX") ("tx_otw", po::value(&tx_otw)->default_value("sc16"), "specify the over-the-wire sample mode for TX") + ("rx_cpu", po::value(&rx_cpu)->default_value("fc32"), "specify the host/cpu sample mode for RX") + ("tx_cpu", po::value(&tx_cpu)->default_value("fc32"), "specify the host/cpu sample mode for TX") + ("mode", po::value(&mode)->default_value("none"), "multi-channel sync mode option: none, mimo") ; po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); @@ -201,18 +220,24 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ uhd::usrp::multi_usrp::sptr usrp = uhd::usrp::multi_usrp::make(args); std::cout << boost::format("Using Device: %s") % usrp->get_pp_string() << std::endl; + if (mode == "mimo"){ + usrp->set_clock_source("mimo", 0); + usrp->set_time_source("mimo", 0); + boost::this_thread::sleep(boost::posix_time::seconds(1)); + } + boost::thread_group thread_group; //spawn the receive test thread if (vm.count("rx_rate")){ usrp->set_rx_rate(rx_rate); - thread_group.create_thread(boost::bind(&benchmark_rx_rate, usrp, rx_otw)); + thread_group.create_thread(boost::bind(&benchmark_rx_rate, usrp, rx_cpu, rx_otw)); } //spawn the transmit test thread if (vm.count("tx_rate")){ usrp->set_tx_rate(tx_rate); - thread_group.create_thread(boost::bind(&benchmark_tx_rate, usrp, tx_otw)); + thread_group.create_thread(boost::bind(&benchmark_tx_rate, usrp, tx_cpu, tx_otw)); thread_group.create_thread(boost::bind(&benchmark_tx_rate_async_helper, usrp)); } -- cgit v1.2.3 From b221b3e34d4c0eaaeb3ab66778e5b82dfd0f5230 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 16 Apr 2012 16:44:58 -0700 Subject: convert: give SIMD conversions prio over table given performance benchmarks involving the converter, when the driver is also doing other things sc8 conversions will still involve tables since no SIMD implementations exist yet --- host/lib/convert/convert_common.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host') diff --git a/host/lib/convert/convert_common.hpp b/host/lib/convert/convert_common.hpp index 55bc2e99d..29ea94870 100644 --- a/host/lib/convert/convert_common.hpp +++ b/host/lib/convert/convert_common.hpp @@ -57,8 +57,8 @@ static const int PRIORITY_SIMD = 1; //neon conversions could be implemented bett static const int PRIORITY_TABLE = 2; //tables require large cache, so they are slower on arm #else static const int PRIORITY_LIBORC = 1; -static const int PRIORITY_SIMD = 2; -static const int PRIORITY_TABLE = 3; +static const int PRIORITY_SIMD = 3; +static const int PRIORITY_TABLE = 2; #endif /*********************************************************************** -- cgit v1.2.3 From 1c61865d1a1c4bd385e790abe3eaa5acb174a5e9 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Tue, 17 Apr 2012 12:19:05 -0700 Subject: multi_usrp: returns db_eeprom instead of gdb_eeprom in both TX/RX cases --- host/lib/usrp/multi_usrp.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'host') diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 39f9cb490..70a8481db 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -242,11 +242,7 @@ public: dict usrp_info; mboard_eeprom_t mb_eeprom = _tree->access(mb_root(mcp.mboard) / "eeprom").get(); - dboard_eeprom_t gdb_eeprom = _tree->access(tx_rf_fe_root(mcp.chan).branch_path().branch_path() / "gdb_eeprom").get(); - dboard_eeprom_t db_eeprom; - - if(gdb_eeprom.id != dboard_id_t::none()) db_eeprom = gdb_eeprom; - else db_eeprom = _tree->access(tx_rf_fe_root(mcp.chan).branch_path().branch_path() / "tx_eeprom").get(); + dboard_eeprom_t db_eeprom = _tree->access(tx_rf_fe_root(mcp.chan).branch_path().branch_path() / "tx_eeprom").get(); usrp_info["mboard_id"] = _tree->access(mb_root(mcp.mboard) / "name").get(); usrp_info["mboard_name"] = mb_eeprom["name"]; -- cgit v1.2.3 From a345c19cc2d4e9556b46b48d75b8ccc35b95ba45 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 17 Apr 2012 13:39:09 -0700 Subject: recv: only inspect tsf on timestamp error check --- host/lib/transport/super_recv_packet_handler.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host') diff --git a/host/lib/transport/super_recv_packet_handler.hpp b/host/lib/transport/super_recv_packet_handler.hpp index 74fbe82fb..205c7a3a3 100644 --- a/host/lib/transport/super_recv_packet_handler.hpp +++ b/host/lib/transport/super_recv_packet_handler.hpp @@ -306,7 +306,7 @@ private: #endif //3) check for out of order timestamps - if (info.ifpi.has_tsi and info.ifpi.has_tsf and prev_buffer_info[index].time > info.time){ + if (info.ifpi.has_tsf and prev_buffer_info[index].time > info.time){ return PACKET_TIMESTAMP_ERROR; } -- cgit v1.2.3 From 4a1ec80d496e7754cf5a8c0f96322b2871094a31 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 17 Apr 2012 14:07:58 -0700 Subject: usb: do not release recv buffer in wrapper The actual recv buffer will be automatically released when dereferenced. By releasing this buffer early we allowed for a race condition: Subsequent wrapper buffers that shared the same actual buffer could get their memory filled by new recvd packets from the USB layer. --- host/lib/transport/usb_zero_copy_wrapper.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'host') diff --git a/host/lib/transport/usb_zero_copy_wrapper.cpp b/host/lib/transport/usb_zero_copy_wrapper.cpp index 690e5aaa2..3571ed856 100644 --- a/host/lib/transport/usb_zero_copy_wrapper.cpp +++ b/host/lib/transport/usb_zero_copy_wrapper.cpp @@ -35,10 +35,9 @@ public: _queue(queue){/*NOP*/} void release(void){ - if (_mrb.get() == NULL) return; - _mrb->release(); + if (not _mrb) return; + _mrb.reset(); //decrement ref count, other MRB's may hold a ref _queue.push_with_haste(this); - _mrb.reset(); } UHD_INLINE sptr get_new(managed_recv_buffer::sptr mrb, const void *mem, size_t len){ -- cgit v1.2.3 From 5ebbf8a887c33c5afbae3f135e48bab0574396bc Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 18 Apr 2012 15:08:45 -0700 Subject: n2x0: card burner fixes for python3.0 and IPv6 has_key is not in python3.0, use key in dict put try catch around interface enumeration, might be an ipv6 issue --- host/utils/usrp_n2xx_net_burner.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'host') diff --git a/host/utils/usrp_n2xx_net_burner.py b/host/utils/usrp_n2xx_net_burner.py index ae6219524..6d1c02712 100755 --- a/host/utils/usrp_n2xx_net_burner.py +++ b/host/utils/usrp_n2xx_net_burner.py @@ -196,8 +196,10 @@ def win_get_interfaces(): adNode = a.ipAddressList while True: #convert ipAddr and ipMask into hex addrs that can be turned into a bcast addr - ipAddr = adNode.ipAddress.decode() - ipMask = adNode.ipMask.decode() + try: + ipAddr = adNode.ipAddress.decode() + ipMask = adNode.ipMask.decode() + except AttributeError: pass if ipAddr and ipMask: hexAddr = struct.unpack(" Date: Wed, 18 Apr 2012 10:20:38 -0700 Subject: master: Fixing comments that say SPI is LSB. --- host/include/uhd/usrp/dboard_iface.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host') diff --git a/host/include/uhd/usrp/dboard_iface.hpp b/host/include/uhd/usrp/dboard_iface.hpp index ca5de5c2f..6a6a68321 100644 --- a/host/include/uhd/usrp/dboard_iface.hpp +++ b/host/include/uhd/usrp/dboard_iface.hpp @@ -213,7 +213,7 @@ public: * * \param unit which unit, rx or tx * \param config configuration settings - * \param data the bits to write LSB first + * \param data the bits to write MSB first * \param num_bits the number of bits in data */ virtual void write_spi( @@ -228,7 +228,7 @@ public: * * \param unit which unit, rx or tx * \param config configuration settings - * \param data the bits to write LSB first + * \param data the bits to write MSB first * \param num_bits the number of bits in data * \return the data that was read */ -- cgit v1.2.3 From ece88b4ca3a6fd523c985416808b60acf6065044 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 19 Apr 2012 18:08:51 -0700 Subject: send: sph holdover from transport work --- host/lib/transport/super_send_packet_handler.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'host') diff --git a/host/lib/transport/super_send_packet_handler.hpp b/host/lib/transport/super_send_packet_handler.hpp index 46c98afea..8a4fce11e 100644 --- a/host/lib/transport/super_send_packet_handler.hpp +++ b/host/lib/transport/super_send_packet_handler.hpp @@ -242,6 +242,7 @@ private: //commit the samples to the zero-copy interface size_t num_bytes_total = (_header_offset_words32+if_packet_info.num_packet_words32)*sizeof(boost::uint32_t); buff->commit(num_bytes_total); + buff.reset(); //effectively a release } _next_packet_seq++; //increment sequence after commits -- cgit v1.2.3 From a6ec6e254425f245db3d9543ddca43fe27d77a77 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Fri, 20 Apr 2012 14:14:27 -0700 Subject: mboard id's are now more concise (codenames are separated, for example), and dboard subdev names are more descriptive (RFX RX is now RFX1200 RX, etc) --- host/lib/usrp/b100/b100_impl.cpp | 3 ++- host/lib/usrp/dboard/db_basic_and_lf.cpp | 30 +++++++++++++++++++++--------- host/lib/usrp/dboard/db_dbsrx.cpp | 2 +- host/lib/usrp/dboard/db_dbsrx2.cpp | 4 ++-- host/lib/usrp/dboard/db_rfx.cpp | 20 +++++++++++++++++--- host/lib/usrp/dboard/db_sbx_common.cpp | 12 +++++++++--- host/lib/usrp/dboard/db_tvrx.cpp | 4 ++-- host/lib/usrp/dboard/db_tvrx2.cpp | 4 ++-- host/lib/usrp/dboard/db_wbx_simple.cpp | 9 ++++++--- host/lib/usrp/dboard/db_wbx_version2.cpp | 6 +++--- host/lib/usrp/dboard/db_wbx_version3.cpp | 6 +++--- host/lib/usrp/dboard/db_wbx_version4.cpp | 6 +++--- host/lib/usrp/dboard/db_xcvr2450.cpp | 6 +++--- host/lib/usrp/e100/e100_impl.cpp | 3 ++- host/lib/usrp/usrp1/usrp1_impl.cpp | 4 ++-- host/lib/usrp/usrp2/usrp2_iface.cpp | 16 ++++++++-------- 16 files changed, 86 insertions(+), 49 deletions(-) (limited to 'host') diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp index 991e6efd3..38bd89fea 100644 --- a/host/lib/usrp/b100/b100_impl.cpp +++ b/host/lib/usrp/b100/b100_impl.cpp @@ -260,7 +260,8 @@ b100_impl::b100_impl(const device_addr_t &device_addr){ //////////////////////////////////////////////////////////////////// _tree->create("/name").set("B-Series Device"); const fs_path mb_path = "/mboards/0"; - _tree->create(mb_path / "name").set("B100 (B-Hundo)"); + _tree->create(mb_path / "name").set("B100"); + _tree->create(mb_path / "codename").set("B-Hundo"); _tree->create(mb_path / "load_eeprom") .subscribe(boost::bind(&fx2_ctrl::usrp_load_eeprom, _fx2_ctrl, _1)); diff --git a/host/lib/usrp/dboard/db_basic_and_lf.cpp b/host/lib/usrp/dboard/db_basic_and_lf.cpp index fc42a73d5..2b30dab52 100644 --- a/host/lib/usrp/dboard/db_basic_and_lf.cpp +++ b/host/lib/usrp/dboard/db_basic_and_lf.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2011 Ettus Research LLC +// Copyright 2010-2012 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 @@ -108,11 +108,17 @@ basic_rx::basic_rx(ctor_args_t args, double max_freq) : rx_dboard_base(args){ //////////////////////////////////////////////////////////////////// // Register properties //////////////////////////////////////////////////////////////////// - this->get_rx_subtree()->create("name").set( - std::string(str(boost::format("%s - %s") - % get_rx_id().to_pp_string() - % get_subdev_name() + if(get_rx_id() == 0x0001){ + this->get_rx_subtree()->create("name").set( + std::string(str(boost::format("BasicRX (%s)") % get_subdev_name() ))); + } + else{ + this->get_rx_subtree()->create("name").set( + std::string(str(boost::format("LFRX (%s)") % get_subdev_name() + ))); + } + this->get_rx_subtree()->create("gains"); //phony property so this dir exists this->get_rx_subtree()->create("freq/value") .publish(&always_zero_freq); @@ -157,11 +163,17 @@ basic_tx::basic_tx(ctor_args_t args, double max_freq) : tx_dboard_base(args){ //////////////////////////////////////////////////////////////////// // Register properties //////////////////////////////////////////////////////////////////// - this->get_tx_subtree()->create("name").set( - std::string(str(boost::format("%s - %s") - % get_tx_id().to_pp_string() - % get_subdev_name() + if(get_tx_id() == 0x0000){ + this->get_tx_subtree()->create("name").set( + std::string(str(boost::format("BasicTX (%s)") % get_subdev_name() ))); + } + else{ + this->get_tx_subtree()->create("name").set( + std::string(str(boost::format("LFTX (%s)") % get_subdev_name() + ))); + } + this->get_tx_subtree()->create("gains"); //phony property so this dir exists this->get_tx_subtree()->create("freq/value") .publish(&always_zero_freq); diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp index 95c5c5d4d..b1cee4aa7 100644 --- a/host/lib/usrp/dboard/db_dbsrx.cpp +++ b/host/lib/usrp/dboard/db_dbsrx.cpp @@ -202,7 +202,7 @@ dbsrx::dbsrx(ctor_args_t args) : rx_dboard_base(args){ // Register properties //////////////////////////////////////////////////////////////////// this->get_rx_subtree()->create("name") - .set(get_rx_id().to_pp_string()); + .set("DBSRX"); this->get_rx_subtree()->create("sensors/lo_locked") .publish(boost::bind(&dbsrx::get_locked, this)); BOOST_FOREACH(const std::string &name, dbsrx_gain_ranges.keys()){ diff --git a/host/lib/usrp/dboard/db_dbsrx2.cpp b/host/lib/usrp/dboard/db_dbsrx2.cpp index 517b7b183..013f3178a 100644 --- a/host/lib/usrp/dboard/db_dbsrx2.cpp +++ b/host/lib/usrp/dboard/db_dbsrx2.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2011 Ettus Research LLC +// Copyright 2010-2012 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 @@ -189,7 +189,7 @@ dbsrx2::dbsrx2(ctor_args_t args) : rx_dboard_base(args){ // Register properties //////////////////////////////////////////////////////////////////// this->get_rx_subtree()->create("name") - .set(get_rx_id().to_pp_string()); + .set("DBSRX2"); this->get_rx_subtree()->create("sensors/lo_locked") .publish(boost::bind(&dbsrx2::get_locked, this)); BOOST_FOREACH(const std::string &name, dbsrx2_gain_ranges.keys()){ diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp index 32aa3fe04..77f61f862 100644 --- a/host/lib/usrp/dboard/db_rfx.cpp +++ b/host/lib/usrp/dboard/db_rfx.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2011 Ettus Research LLC +// Copyright 2010-2012 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 @@ -174,7 +174,14 @@ rfx_xcvr::rfx_xcvr( //////////////////////////////////////////////////////////////////// // Register RX properties //////////////////////////////////////////////////////////////////// - this->get_rx_subtree()->create("name").set("RFX RX"); + if(get_rx_id() == 0x0024) this->get_rx_subtree()->create("name").set("RFX400 RX"); + else if(get_rx_id() == 0x0025) this->get_rx_subtree()->create("name").set("RFX900 RX"); + else if(get_rx_id() == 0x0034) this->get_rx_subtree()->create("name").set("RFX1800 RX"); + else if(get_rx_id() == 0x0026) this->get_rx_subtree()->create("name").set("RFX1200 RX"); + else if(get_rx_id() == 0x002c) this->get_rx_subtree()->create("name").set("RFX2200 RX"); + else if(get_rx_id() == 0x0027) this->get_rx_subtree()->create("name").set("RFX2400 RX"); + else this->get_rx_subtree()->create("name").set("RFX RX"); + this->get_rx_subtree()->create("sensors/lo_locked") .publish(boost::bind(&rfx_xcvr::get_locked, this, dboard_iface::UNIT_RX)); BOOST_FOREACH(const std::string &name, _rx_gain_ranges.keys()){ @@ -203,7 +210,14 @@ rfx_xcvr::rfx_xcvr( //////////////////////////////////////////////////////////////////// // Register TX properties //////////////////////////////////////////////////////////////////// - this->get_tx_subtree()->create("name").set("RFX TX"); + if(get_tx_id() == 0x0028) this->get_tx_subtree()->create("name").set("RFX400 TX"); + else if(get_tx_id() == 0x0029) this->get_tx_subtree()->create("name").set("RFX900 TX"); + else if(get_tx_id() == 0x0035) this->get_tx_subtree()->create("name").set("RFX1800 TX"); + else if(get_tx_id() == 0x002a) this->get_tx_subtree()->create("name").set("RFX1200 TX"); + else if(get_tx_id() == 0x002d) this->get_tx_subtree()->create("name").set("RFX2200 TX"); + else if(get_tx_id() == 0x002b) this->get_tx_subtree()->create("name").set("RFX2400 TX"); + else this->get_tx_subtree()->create("name").set("RFX TX"); + this->get_tx_subtree()->create("sensors/lo_locked") .publish(boost::bind(&rfx_xcvr::get_locked, this, dboard_iface::UNIT_TX)); this->get_tx_subtree()->create("gains"); //phony property so this dir exists diff --git a/host/lib/usrp/dboard/db_sbx_common.cpp b/host/lib/usrp/dboard/db_sbx_common.cpp index d1cd5b373..07857b98a 100644 --- a/host/lib/usrp/dboard/db_sbx_common.cpp +++ b/host/lib/usrp/dboard/db_sbx_common.cpp @@ -1,5 +1,5 @@ // -// Copyright 2011 Ettus Research LLC +// Copyright 2011-2012 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 @@ -127,7 +127,10 @@ sbx_xcvr::sbx_xcvr(ctor_args_t args) : xcvr_dboard_base(args){ //////////////////////////////////////////////////////////////////// // Register RX properties //////////////////////////////////////////////////////////////////// - this->get_rx_subtree()->create("name").set("SBX RX"); + if(get_rx_id() == 0x054) this->get_rx_subtree()->create("name").set("SBXv3 RX"); + else if(get_rx_id() == 0x065) this->get_rx_subtree()->create("name").set("SBXv4 RX"); + else this->get_rx_subtree()->create("name").set("SBX RX"); + this->get_rx_subtree()->create("sensors/lo_locked") .publish(boost::bind(&sbx_xcvr::get_locked, this, dboard_iface::UNIT_RX)); BOOST_FOREACH(const std::string &name, sbx_rx_gain_ranges.keys()){ @@ -156,7 +159,10 @@ sbx_xcvr::sbx_xcvr(ctor_args_t args) : xcvr_dboard_base(args){ //////////////////////////////////////////////////////////////////// // Register TX properties //////////////////////////////////////////////////////////////////// - this->get_tx_subtree()->create("name").set("SBX TX"); + if(get_tx_id() == 0x055) this->get_tx_subtree()->create("name").set("SBXv3 TX"); + else if(get_tx_id() == 0x067) this->get_tx_subtree()->create("name").set("SBXv4 TX"); + else this->get_tx_subtree()->create("name").set("SBX TX"); + this->get_tx_subtree()->create("sensors/lo_locked") .publish(boost::bind(&sbx_xcvr::get_locked, this, dboard_iface::UNIT_TX)); BOOST_FOREACH(const std::string &name, sbx_tx_gain_ranges.keys()){ diff --git a/host/lib/usrp/dboard/db_tvrx.cpp b/host/lib/usrp/dboard/db_tvrx.cpp index fd86d5b83..edee46cd5 100644 --- a/host/lib/usrp/dboard/db_tvrx.cpp +++ b/host/lib/usrp/dboard/db_tvrx.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2011 Ettus Research LLC +// Copyright 2010-2012 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 @@ -186,7 +186,7 @@ tvrx::tvrx(ctor_args_t args) : rx_dboard_base(args){ // Register properties //////////////////////////////////////////////////////////////////// this->get_rx_subtree()->create("name") - .set(get_rx_id().to_pp_string()); + .set("TVRX"); this->get_rx_subtree()->create("sensors"); //phony property so this dir exists BOOST_FOREACH(const std::string &name, get_tvrx_gain_ranges().keys()){ this->get_rx_subtree()->create("gains/"+name+"/value") diff --git a/host/lib/usrp/dboard/db_tvrx2.cpp b/host/lib/usrp/dboard/db_tvrx2.cpp index 628221527..0bfa5229a 100644 --- a/host/lib/usrp/dboard/db_tvrx2.cpp +++ b/host/lib/usrp/dboard/db_tvrx2.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010,2012 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 @@ -955,7 +955,7 @@ tvrx2::tvrx2(ctor_args_t args) : rx_dboard_base(args){ // Register properties //////////////////////////////////////////////////////////////////// this->get_rx_subtree()->create("name") - .set(get_rx_id().to_pp_string()); + .set("TVRX2"); this->get_rx_subtree()->create("sensors/lo_locked") .publish(boost::bind(&tvrx2::get_locked, this)); this->get_rx_subtree()->create("sensors/rssi") diff --git a/host/lib/usrp/dboard/db_wbx_simple.cpp b/host/lib/usrp/dboard/db_wbx_simple.cpp index 3d633a672..4ba30255d 100644 --- a/host/lib/usrp/dboard/db_wbx_simple.cpp +++ b/host/lib/usrp/dboard/db_wbx_simple.cpp @@ -1,5 +1,5 @@ // -// Copyright 2011 Ettus Research LLC +// Copyright 2011-2012 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 @@ -81,8 +81,10 @@ wbx_simple::wbx_simple(ctor_args_t args) : wbx_base(args){ //////////////////////////////////////////////////////////////////// // Register RX properties //////////////////////////////////////////////////////////////////// + this->get_rx_subtree()->access("name").set( - this->get_rx_subtree()->access("name").get() + " + Simple GDB"); + std::string(str(boost::format("%s+GDB") % this->get_rx_subtree()->access("name").get() + ))); this->get_rx_subtree()->create("antenna/value") .subscribe(boost::bind(&wbx_simple::set_rx_ant, this, _1)) .set("RX2"); @@ -93,7 +95,8 @@ wbx_simple::wbx_simple(ctor_args_t args) : wbx_base(args){ // Register TX properties //////////////////////////////////////////////////////////////////// this->get_tx_subtree()->access("name").set( - this->get_tx_subtree()->access("name").get() + " + Simple GDB"); + std::string(str(boost::format("%s+GDB") % this->get_tx_subtree()->access("name").get() + ))); this->get_tx_subtree()->create("antenna/value") .subscribe(boost::bind(&wbx_simple::set_tx_ant, this, _1)) .set(wbx_tx_antennas.at(0)); diff --git a/host/lib/usrp/dboard/db_wbx_version2.cpp b/host/lib/usrp/dboard/db_wbx_version2.cpp index ad31339e7..9037d5d05 100644 --- a/host/lib/usrp/dboard/db_wbx_version2.cpp +++ b/host/lib/usrp/dboard/db_wbx_version2.cpp @@ -1,5 +1,5 @@ // -// Copyright 2011 Ettus Research LLC +// Copyright 2011-2012 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 @@ -78,7 +78,7 @@ wbx_base::wbx_version2::wbx_version2(wbx_base *_self_wbx_base) { //////////////////////////////////////////////////////////////////// // Register RX properties //////////////////////////////////////////////////////////////////// - this->get_rx_subtree()->create("name").set("WBX RX v2"); + this->get_rx_subtree()->create("name").set("WBXv2 RX"); this->get_rx_subtree()->create("freq/value") .coerce(boost::bind(&wbx_base::wbx_version2::set_lo_freq, this, dboard_iface::UNIT_RX, _1)) .set((wbx_v2_freq_range.start() + wbx_v2_freq_range.stop())/2.0); @@ -87,7 +87,7 @@ wbx_base::wbx_version2::wbx_version2(wbx_base *_self_wbx_base) { //////////////////////////////////////////////////////////////////// // Register TX properties //////////////////////////////////////////////////////////////////// - this->get_tx_subtree()->create("name").set("WBX TX v2"); + this->get_tx_subtree()->create("name").set("WBXv2 TX"); BOOST_FOREACH(const std::string &name, wbx_v2_tx_gain_ranges.keys()){ self_base->get_tx_subtree()->create("gains/"+name+"/value") .coerce(boost::bind(&wbx_base::wbx_version2::set_tx_gain, this, _1, name)) diff --git a/host/lib/usrp/dboard/db_wbx_version3.cpp b/host/lib/usrp/dboard/db_wbx_version3.cpp index 7ef47edd4..f0fdc2ffe 100644 --- a/host/lib/usrp/dboard/db_wbx_version3.cpp +++ b/host/lib/usrp/dboard/db_wbx_version3.cpp @@ -1,5 +1,5 @@ // -// Copyright 2011 Ettus Research LLC +// Copyright 2011-2012 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 @@ -84,7 +84,7 @@ wbx_base::wbx_version3::wbx_version3(wbx_base *_self_wbx_base) { //////////////////////////////////////////////////////////////////// // Register RX properties //////////////////////////////////////////////////////////////////// - this->get_rx_subtree()->create("name").set("WBX RX v3"); + this->get_rx_subtree()->create("name").set("WBXv3 RX"); this->get_rx_subtree()->create("freq/value") .coerce(boost::bind(&wbx_base::wbx_version3::set_lo_freq, this, dboard_iface::UNIT_RX, _1)) .set((wbx_v3_freq_range.start() + wbx_v3_freq_range.stop())/2.0); @@ -93,7 +93,7 @@ wbx_base::wbx_version3::wbx_version3(wbx_base *_self_wbx_base) { //////////////////////////////////////////////////////////////////// // Register TX properties //////////////////////////////////////////////////////////////////// - this->get_tx_subtree()->create("name").set("WBX TX v3"); + this->get_tx_subtree()->create("name").set("WBXv3 TX"); BOOST_FOREACH(const std::string &name, wbx_v3_tx_gain_ranges.keys()){ self_base->get_tx_subtree()->create("gains/"+name+"/value") .coerce(boost::bind(&wbx_base::wbx_version3::set_tx_gain, this, _1, name)) diff --git a/host/lib/usrp/dboard/db_wbx_version4.cpp b/host/lib/usrp/dboard/db_wbx_version4.cpp index 3a85826cd..418b85997 100644 --- a/host/lib/usrp/dboard/db_wbx_version4.cpp +++ b/host/lib/usrp/dboard/db_wbx_version4.cpp @@ -1,5 +1,5 @@ // -// Copyright 2011 Ettus Research LLC +// Copyright 2011-2012 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 @@ -85,7 +85,7 @@ wbx_base::wbx_version4::wbx_version4(wbx_base *_self_wbx_base) { //////////////////////////////////////////////////////////////////// // Register RX properties //////////////////////////////////////////////////////////////////// - this->get_rx_subtree()->create("name").set("WBX RX v4"); + this->get_rx_subtree()->create("name").set("WBXv4 RX"); this->get_rx_subtree()->create("freq/value") .coerce(boost::bind(&wbx_base::wbx_version4::set_lo_freq, this, dboard_iface::UNIT_RX, _1)) .set((wbx_v4_freq_range.start() + wbx_v4_freq_range.stop())/2.0); @@ -94,7 +94,7 @@ wbx_base::wbx_version4::wbx_version4(wbx_base *_self_wbx_base) { //////////////////////////////////////////////////////////////////// // Register TX properties //////////////////////////////////////////////////////////////////// - this->get_tx_subtree()->create("name").set("WBX TX v4"); + this->get_tx_subtree()->create("name").set("WBXv4 TX"); BOOST_FOREACH(const std::string &name, wbx_v4_tx_gain_ranges.keys()){ self_base->get_tx_subtree()->create("gains/"+name+"/value") .coerce(boost::bind(&wbx_base::wbx_version4::set_tx_gain, this, _1, name)) diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp index 0fdad0d40..6685b806d 100644 --- a/host/lib/usrp/dboard/db_xcvr2450.cpp +++ b/host/lib/usrp/dboard/db_xcvr2450.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2011 Ettus Research LLC +// Copyright 2010-2012 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 @@ -228,7 +228,7 @@ xcvr2450::xcvr2450(ctor_args_t args) : xcvr_dboard_base(args){ // Register RX properties //////////////////////////////////////////////////////////////////// this->get_rx_subtree()->create("name") - .set(get_rx_id().to_pp_string()); + .set("XCVR2450 RX"); this->get_rx_subtree()->create("sensors/lo_locked") .publish(boost::bind(&xcvr2450::get_locked, this)); this->get_rx_subtree()->create("sensors/rssi") @@ -266,7 +266,7 @@ xcvr2450::xcvr2450(ctor_args_t args) : xcvr_dboard_base(args){ // Register TX properties //////////////////////////////////////////////////////////////////// this->get_tx_subtree()->create("name") - .set(get_tx_id().to_pp_string()); + .set("XCVR2450 TX"); this->get_tx_subtree()->create("sensors/lo_locked") .publish(boost::bind(&xcvr2450::get_locked, this)); BOOST_FOREACH(const std::string &name, xcvr_tx_gain_ranges.keys()){ diff --git a/host/lib/usrp/e100/e100_impl.cpp b/host/lib/usrp/e100/e100_impl.cpp index d610c0b12..b7a3d9bcc 100644 --- a/host/lib/usrp/e100/e100_impl.cpp +++ b/host/lib/usrp/e100/e100_impl.cpp @@ -189,7 +189,8 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){ //////////////////////////////////////////////////////////////////// _tree->create("/name").set("E-Series Device"); const fs_path mb_path = "/mboards/0"; - _tree->create(mb_path / "name").set(str(boost::format("%s (euewanee)") % model)); + _tree->create(mb_path / "name").set(model); + _tree->create(mb_path / "codename").set("Euwanee"); //////////////////////////////////////////////////////////////////// // setup the mboard eeprom diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp index 1db2efa0d..33b40dd2f 100644 --- a/host/lib/usrp/usrp1/usrp1_impl.cpp +++ b/host/lib/usrp/usrp1/usrp1_impl.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2011 Ettus Research LLC +// Copyright 2010-2012 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 @@ -214,7 +214,7 @@ usrp1_impl::usrp1_impl(const device_addr_t &device_addr){ _tree = property_tree::make(); _tree->create("/name").set("USRP1 Device"); const fs_path mb_path = "/mboards/0"; - _tree->create(mb_path / "name").set("USRP1 (Classic)"); + _tree->create(mb_path / "name").set("USRP1"); _tree->create(mb_path / "load_eeprom") .subscribe(boost::bind(&fx2_ctrl::usrp_load_eeprom, _fx2_ctrl, _1)); diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp index 123910166..b202b6170 100644 --- a/host/lib/usrp/usrp2/usrp2_iface.cpp +++ b/host/lib/usrp/usrp2/usrp2_iface.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2011 Ettus Research LLC +// Copyright 2010-2012 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 @@ -340,13 +340,13 @@ public: const std::string get_cname(void){ switch(this->get_rev()){ - case USRP2_REV3: return "USRP2-REV3"; - case USRP2_REV4: return "USRP2-REV4"; - case USRP_N200: return "USRP-N200"; - case USRP_N210: return "USRP-N210"; - case USRP_N200_R4: return "USRP-N200-REV4"; - case USRP_N210_R4: return "USRP-N210-REV4"; - case USRP_NXXX: return "USRP-N???"; + case USRP2_REV3: return "USRP2 r3"; + case USRP2_REV4: return "USRP2 r4"; + case USRP_N200: return "N200"; + case USRP_N210: return "N210"; + case USRP_N200_R4: return "N200r4"; + case USRP_N210_R4: return "N210r4"; + case USRP_NXXX: return "N???"; } UHD_THROW_INVALID_CODE_PATH(); } -- cgit v1.2.3 From 81e2262c9e41bbd3621c9753231e5eba23cd7292 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 20 Apr 2012 19:25:57 -0700 Subject: e100: fix typo from last commit --- host/lib/usrp/e100/e100_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host') diff --git a/host/lib/usrp/e100/e100_impl.cpp b/host/lib/usrp/e100/e100_impl.cpp index b7a3d9bcc..ec459b2c4 100644 --- a/host/lib/usrp/e100/e100_impl.cpp +++ b/host/lib/usrp/e100/e100_impl.cpp @@ -190,7 +190,7 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){ _tree->create("/name").set("E-Series Device"); const fs_path mb_path = "/mboards/0"; _tree->create(mb_path / "name").set(model); - _tree->create(mb_path / "codename").set("Euwanee"); + _tree->create(mb_path / "codename").set("Euwanee"); //////////////////////////////////////////////////////////////////// // setup the mboard eeprom -- cgit v1.2.3