diff options
author | Johnathan Corgan | 2012-04-03 18:18:41 -0700 |
---|---|---|
committer | Johnathan Corgan | 2012-04-03 18:18:41 -0700 |
commit | 6522dd051302a1691a7ce27be78acd81d733fdb2 (patch) | |
tree | 13e8c6308e43e5a65cd730be3479a02812e37429 /gr-uhd | |
parent | fb8292238c7efff4a5b2a7ae26d3a2835f9be3ce (diff) | |
parent | fc03a9b18ca874cac546b7a414089d3649dce48d (diff) | |
download | gnuradio-6522dd051302a1691a7ce27be78acd81d733fdb2.tar.gz gnuradio-6522dd051302a1691a7ce27be78acd81d733fdb2.tar.bz2 gnuradio-6522dd051302a1691a7ce27be78acd81d733fdb2.zip |
Merge branch 'master' into next
Diffstat (limited to 'gr-uhd')
-rw-r--r-- | gr-uhd/include/gr_uhd_usrp_sink.h | 11 | ||||
-rw-r--r-- | gr-uhd/include/gr_uhd_usrp_source.h | 9 | ||||
-rw-r--r-- | gr-uhd/lib/gr_uhd_usrp_sink.cc | 8 | ||||
-rw-r--r-- | gr-uhd/lib/gr_uhd_usrp_source.cc | 8 | ||||
-rw-r--r-- | gr-uhd/swig/__init__.py | 2 | ||||
-rw-r--r-- | gr-uhd/swig/uhd_swig.i | 2 |
6 files changed, 37 insertions, 3 deletions
diff --git a/gr-uhd/include/gr_uhd_usrp_sink.h b/gr-uhd/include/gr_uhd_usrp_sink.h index ff4856f9b..169d58152 100644 --- a/gr-uhd/include/gr_uhd_usrp_sink.h +++ b/gr-uhd/include/gr_uhd_usrp_sink.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2011 Free Software Foundation, Inc. + * Copyright 2010-2012 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -131,6 +131,15 @@ public: virtual void set_start_time(const uhd::time_spec_t &time) = 0; /*! + * Returns identifying information about this USRP's configuration. + * Returns motherboard ID, name, and serial. + * Returns daughterboard TX/RX ID, subdev name, and serial. + * \param mboard the motherboard index 0 to M-1 + * \param chan channel index 0 to N-1 + */ + virtual uhd::dict<std::string, std::string> get_usrp_info(size_t mboard = 0, size_t chan = 0) = 0; + + /*! * Set the frontend specification. * \param spec the subdev spec markup string * \param mboard the motherboard index 0 to M-1 diff --git a/gr-uhd/include/gr_uhd_usrp_source.h b/gr-uhd/include/gr_uhd_usrp_source.h index 415503bc1..20cc863d7 100644 --- a/gr-uhd/include/gr_uhd_usrp_source.h +++ b/gr-uhd/include/gr_uhd_usrp_source.h @@ -123,6 +123,15 @@ public: virtual void set_start_time(const uhd::time_spec_t &time) = 0; /*! + * Returns identifying information about this USRP's configuration. + * Returns motherboard ID, name, and serial. + * Returns daughterboard TX/RX ID, subdev name, and serial. + * \param mboard the motherboard index 0 to M-1 + * \param chan channel index 0 to N-1 + */ + virtual uhd::dict<std::string, std::string> get_usrp_info(size_t mboard = 0, size_t chan = 0) = 0; + + /*! * Set the frontend specification. * \param spec the subdev spec markup string * \param mboard the motherboard index 0 to M-1 diff --git a/gr-uhd/lib/gr_uhd_usrp_sink.cc b/gr-uhd/lib/gr_uhd_usrp_sink.cc index 7e7875898..66be056df 100644 --- a/gr-uhd/lib/gr_uhd_usrp_sink.cc +++ b/gr-uhd/lib/gr_uhd_usrp_sink.cc @@ -66,6 +66,14 @@ public: _dev = uhd::usrp::multi_usrp::make(device_addr); } + uhd::dict<std::string, std::string> get_usrp_info(size_t mboard, size_t chan){ + #ifdef UHD_USRP_MULTI_USRP_GET_USRP_INFO_API + return _dev->get_usrp_info(mboard, chan); + #else + throw std::runtime_error("not implemented in this version"); + #endif + } + void set_subdev_spec(const std::string &spec, size_t mboard){ return _dev->set_tx_subdev_spec(spec, mboard); } diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc index bd7f4e21d..ba87ae8e0 100644 --- a/gr-uhd/lib/gr_uhd_usrp_source.cc +++ b/gr-uhd/lib/gr_uhd_usrp_source.cc @@ -70,6 +70,14 @@ public: _dev = uhd::usrp::multi_usrp::make(device_addr); } + uhd::dict<std::string, std::string> get_usrp_info(size_t mboard, size_t chan){ + #ifdef UHD_USRP_MULTI_USRP_GET_USRP_INFO_API + return _dev->get_usrp_info(mboard, chan); + #else + throw std::runtime_error("not implemented in this version"); + #endif + } + void set_subdev_spec(const std::string &spec, size_t mboard){ return _dev->set_rx_subdev_spec(spec, mboard); } diff --git a/gr-uhd/swig/__init__.py b/gr-uhd/swig/__init__.py index 82dbdd9e7..b4045e77f 100644 --- a/gr-uhd/swig/__init__.py +++ b/gr-uhd/swig/__init__.py @@ -1,5 +1,5 @@ # -# Copyright 2010-2011 Free Software Foundation, Inc. +# Copyright 2010-2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index d814a5ae0..cb74b3dce 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2010-2011 Free Software Foundation, Inc. + * Copyright 2010-2012 Free Software Foundation, Inc. * * This file is part of GNU Radio * |