summaryrefslogtreecommitdiff
path: root/gr-uhd
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2016-04-27 07:25:30 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2016-04-27 07:25:30 -0700
commitd241c13acb5d53f60e4f39b2b99aae83a53afaab (patch)
tree30ab73ae70bf65e5a696881a5b2c7be8b5ecbb87 /gr-uhd
parentefbb415e5abeefe0cedf36f44e13362514fd4521 (diff)
parent26de50e62da7116754c0175c32c4179de2d13672 (diff)
Merge branch 'master' into next
Diffstat (limited to 'gr-uhd')
-rw-r--r--gr-uhd/grc/gen_uhd_usrp_blocks.py92
-rw-r--r--gr-uhd/include/gnuradio/uhd/usrp_source.h77
-rw-r--r--gr-uhd/lib/usrp_block_impl.h5
-rw-r--r--gr-uhd/lib/usrp_sink_impl.cc2
-rw-r--r--gr-uhd/lib/usrp_source_impl.cc98
-rw-r--r--gr-uhd/lib/usrp_source_impl.h9
-rw-r--r--gr-uhd/swig/uhd_swig.i6
7 files changed, 3 insertions, 286 deletions
diff --git a/gr-uhd/grc/gen_uhd_usrp_blocks.py b/gr-uhd/grc/gen_uhd_usrp_blocks.py
index e99de0d7d0..fd2e77707e 100644
--- a/gr-uhd/grc/gen_uhd_usrp_blocks.py
+++ b/gr-uhd/grc/gen_uhd_usrp_blocks.py
@@ -82,12 +82,6 @@ self.\$(id).set_antenna(\$ant$(n), $n)
self.\$(id).set_bandwidth(\$bw$(n), $n)
\#end if
#if $sourk == 'source'
- \#if \$lo_export$(n)() and not \$hide_lo_controls()
-self.\$(id).set_lo_export_enabled(\$lo_export$(n), uhd.ALL_LOS, $n)
- \#end if
- \#if \$lo_source$(n)() and not \$hide_lo_controls()
-self.\$(id).set_lo_source(\$lo_source$(n), uhd.ALL_LOS, $n)
- \#end if
\#if \$dc_offs_enb$(n)()
self.\$(id).set_auto_dc_offset(\$dc_offs_enb$(n), $n)
\#end if
@@ -107,14 +101,6 @@ self.\$(id).set_normalized_gain(\$gain$(n), $n)
self.\$(id).set_gain(\$gain$(n), $n)
\#end if
</callback>
- <callback>\#if not \$hide_lo_controls()
-set_lo_source(\$lo_source$(n), uhd.ALL_LOS, $n)
-\#end if
- </callback>
- <callback>\#if not \$hide_lo_controls()
-set_lo_export_enabled(\$lo_export$(n), uhd.ALL_LOS, $n)
-\#end if
- </callback>
<callback>set_antenna(\$ant$(n), $n)</callback>
<callback>set_bandwidth(\$bw$(n), $n)</callback>
#end for
@@ -538,62 +524,6 @@ PARAMS_TMPL = """ <param>
</param>
#if $sourk == 'source'
<param>
- <name>Ch$(n): LO Source</name>
- <key>lo_source$(n)</key>
- <value>internal</value>
- <type>string</type>
- <hide>
- \#if not \$nchan() > $n
- all
- \#elif \$hide_lo_controls()
- all
- \#else
- none
- \#end if
- </hide>
- <option>
- <name>Internal</name>
- <key>internal</key>
- </option>
- <option>
- <name>External</name>
- <key>external</key>
- </option>
- <option>
- <name>Companion</name>
- <key>companion</key>
- </option>
- <tab>RF Options</tab>
- </param>
-#end if
-#if $sourk == 'source'
- <param>
- <name>Ch$(n): LO Export</name>
- <key>lo_export$(n)</key>
- <value>False</value>
- <type>bool</type>
- <hide>
- \#if not \$nchan() > $n
- all
- \#elif \$hide_lo_controls()
- all
- \#else
- none
- \#end if
- </hide>
- <option>
- <name>True</name>
- <key>True</key>
- </option>
- <option>
- <name>False</name>
- <key>False</key>
- </option>
- <tab>RF Options</tab>
- </param>
-#end if
-#if $sourk == 'source'
- <param>
<name>Ch$(n): Enable DC Offset Correction</name>
<key>dc_offs_enb$(n)</key>
<value>""</value>
@@ -643,25 +573,6 @@ SHOW_CMD_PORT_PARAM = """
</param>
"""
-SHOW_LO_CONTROLS_PARAM = """
- <param>
- <name>Show LO Controls</name>
- <key>hide_lo_controls</key>
- <value>True</value>
- <type>bool</type>
- <hide>part</hide>
- <option>
- <name>Yes</name>
- <key>False</key>
- </option>
- <option>
- <name>No</name>
- <key>True</key>
- </option>
- <tab>Advanced</tab>
- </param>
-"""
-
TSBTAG_PARAM = """ <param>
<name>TSB tag name</name>
<key>len_tag_name</key>
@@ -694,8 +605,7 @@ if __name__ == '__main__':
else: raise Exception, 'is %s a source or sink?'%file
params = ''.join([parse_tmpl(PARAMS_TMPL, n=n, sourk=sourk) for n in range(max_num_channels)])
- params += SHOW_CMD_PORT_PARAM
- params += SHOW_LO_CONTROLS_PARAM
+ params += SHOW_CMD_PORT_PARAM
if sourk == 'sink':
params += TSBTAG_PARAM
lentag_arg = TSBTAG_ARG
diff --git a/gr-uhd/include/gnuradio/uhd/usrp_source.h b/gr-uhd/include/gnuradio/uhd/usrp_source.h
index a0022b3876..19201c031c 100644
--- a/gr-uhd/include/gnuradio/uhd/usrp_source.h
+++ b/gr-uhd/include/gnuradio/uhd/usrp_source.h
@@ -140,83 +140,6 @@ namespace gr {
*/
virtual ::uhd::dict<std::string, std::string> get_usrp_info(size_t chan = 0) = 0;
-
- /*!
- * Get a list of possible LO stage names
- * \param chan the channel index 0 to N-1
- * \return a vector of strings for possible LO names
- */
- virtual std::vector<std::string> get_lo_names(size_t chan = 0) = 0;
-
- /*!
- * Set the LO source for the usrp device.
- * For usrps that support selectable LOs, this function
- * allows switching between them.
- * Typical options for source: internal, external.
- * \param src a string representing the LO source
- * \param name the name of the LO stage to update
- * \param chan the channel index 0 to N-1
- */
- virtual void set_lo_source(const std::string &src, const std::string &name, size_t chan = 0) = 0;
-
- /*!
- * Get the currently set LO source.
- * \param name the name of the LO stage to query
- * \param chan the channel index 0 to N-1
- * \return the configured LO source
- */
- virtual const std::string get_lo_source(const std::string &name, size_t chan = 0) = 0;
-
- /*!
- * Get a list of possible LO sources.
- * \param name the name of the LO stage to query
- * \param chan the channel index 0 to N-1
- * \return a vector of strings for possible settings
- */
- virtual std::vector<std::string> get_lo_sources(const std::string &name, size_t chan = 0) = 0;
-
- /*!
- * Set whether the LO used by the usrp device is exported
- * For usrps that support exportable LOs, this function
- * configures if the LO used by chan is exported or not.
- * \param enabled if true then export the LO
- * \param name the name of the LO stage to update
- * \param chan the channel index 0 to N-1 for the source channel
- */
- virtual void set_lo_export_enabled(bool enabled, const std::string &name, size_t chan = 0) = 0;
-
- /*!
- * Returns true if the currently selected LO is being exported.
- * \param name the name of the LO stage to query
- * \param chan the channel index 0 to N-1
- */
- virtual bool get_lo_export_enabled(const std::string &name, size_t chan = 0) = 0;
-
- /*!
- * Set the RX LO frequency (Advanced).
- * \param freq the frequency to set the LO to
- * \param name the name of the LO stage to update
- * \param chan the channel index 0 to N-1
- * \return a coerced LO frequency
- */
- virtual double set_lo_freq(double freq, const std::string &name, size_t chan = 0) = 0;
-
- /*!
- * Get the current RX LO frequency (Advanced).
- * \param name the name of the LO stage to query
- * \param chan the channel index 0 to N-1
- * \return the configured LO frequency
- */
- virtual double get_lo_freq(const std::string &name, size_t chan = 0) = 0;
-
- /*!
- * Get the LO frequency range of the RX LO.
- * \param name the name of the LO stage to query
- * \param chan the channel index 0 to N-1
- * \return a frequency range object
- */
- virtual ::uhd::freq_range_t get_lo_freq_range(const std::string &name, size_t chan = 0) = 0;
-
/*!
* Enable/disable the automatic DC offset correction.
* The automatic correction subtracts out the long-run average.
diff --git a/gr-uhd/lib/usrp_block_impl.h b/gr-uhd/lib/usrp_block_impl.h
index 37c1de1e56..cb07fb356d 100644
--- a/gr-uhd/lib/usrp_block_impl.h
+++ b/gr-uhd/lib/usrp_block_impl.h
@@ -40,11 +40,6 @@
namespace gr {
namespace uhd {
- static const size_t ALL_MBOARDS = ::uhd::usrp::multi_usrp::ALL_MBOARDS;
- static const size_t ALL_CHANS = ::uhd::usrp::multi_usrp::ALL_CHANS;
- static const std::string ALL_GAINS = ::uhd::usrp::multi_usrp::ALL_GAINS;
- static const std::string ALL_LOS = ::uhd::usrp::multi_usrp::ALL_LOS;
-
class usrp_block_impl : virtual public usrp_block
{
public:
diff --git a/gr-uhd/lib/usrp_sink_impl.cc b/gr-uhd/lib/usrp_sink_impl.cc
index d8f98fdd80..e2e4d334b6 100644
--- a/gr-uhd/lib/usrp_sink_impl.cc
+++ b/gr-uhd/lib/usrp_sink_impl.cc
@@ -29,6 +29,8 @@
namespace gr {
namespace uhd {
+ static const size_t ALL_CHANS = ::uhd::usrp::multi_usrp::ALL_CHANS;
+
usrp_sink::sptr
usrp_sink::make(const ::uhd::device_addr_t &device_addr,
const ::uhd::io_type_t &io_type,
diff --git a/gr-uhd/lib/usrp_source_impl.cc b/gr-uhd/lib/usrp_source_impl.cc
index 33b96f8a02..7ce8633597 100644
--- a/gr-uhd/lib/usrp_source_impl.cc
+++ b/gr-uhd/lib/usrp_source_impl.cc
@@ -278,104 +278,6 @@ namespace gr {
return _dev->get_rx_bandwidth_range(chan);
}
- std::vector<std::string>
- usrp_source_impl::get_lo_names(size_t chan)
- {
-#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API
- chan = _stream_args.channels[chan];
- return _dev->get_rx_lo_names(chan);
-#else
- throw std::runtime_error("not implemented in this version");
-#endif
- }
-
- const std::string
- usrp_source_impl::get_lo_source(const std::string &name, size_t chan)
- {
-#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API
- chan = _stream_args.channels[chan];
- return _dev->get_rx_lo_source(name, chan);
-#else
- throw std::runtime_error("not implemented in this version");
-#endif
- }
-
- std::vector<std::string>
- usrp_source_impl::get_lo_sources(const std::string &name, size_t chan)
- {
-#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API
- chan = _stream_args.channels[chan];
- return _dev->get_rx_lo_sources(name, chan);
-#else
- throw std::runtime_error("not implemented in this version");
-#endif
- }
-
- void
- usrp_source_impl::set_lo_source(const std::string &src, const std::string &name, size_t chan)
- {
-#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API
- chan = _stream_args.channels[chan];
- return _dev->set_rx_lo_source(src, name, chan);
-#else
- throw std::runtime_error("not implemented in this version");
-#endif
- }
-
- bool
- usrp_source_impl::get_lo_export_enabled(const std::string &name, size_t chan)
- {
-#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API
- chan = _stream_args.channels[chan];
- return _dev->get_rx_lo_export_enabled(name, chan);
-#else
- throw std::runtime_error("not implemented in this version");
-#endif
- }
-
- void
- usrp_source_impl::set_lo_export_enabled(bool enabled, const std::string &name, size_t chan)
- {
-#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API
- chan = _stream_args.channels[chan];
- return _dev->set_rx_lo_export_enabled(enabled, name, chan);
-#else
- throw std::runtime_error("not implemented in this version");
-#endif
- }
-
- ::uhd::freq_range_t
- usrp_source_impl::get_lo_freq_range(const std::string &name, size_t chan)
- {
-#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API
- chan = _stream_args.channels[chan];
- return _dev->get_rx_lo_freq_range(name, chan);
-#else
- throw std::runtime_error("not implemented in this version");
-#endif
- }
-
- double
- usrp_source_impl::get_lo_freq(const std::string &name, size_t chan)
- {
-#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API
- chan = _stream_args.channels[chan];
- return _dev->get_rx_lo_freq(name, chan);
-#else
- throw std::runtime_error("not implemented in this version");
-#endif
- }
-
- double
- usrp_source_impl::set_lo_freq(double freq, const std::string &name, size_t chan) {
-#ifdef UHD_USRP_MULTI_USRP_LO_CONFIG_API
- chan = _stream_args.channels[chan];
- return _dev->set_rx_lo_freq(freq, name, chan);
-#else
- throw std::runtime_error("not implemented in this version");
-#endif
- }
-
void
usrp_source_impl::set_auto_dc_offset(const bool enable, size_t chan)
{
diff --git a/gr-uhd/lib/usrp_source_impl.h b/gr-uhd/lib/usrp_source_impl.h
index 8f03101965..b43df4dab3 100644
--- a/gr-uhd/lib/usrp_source_impl.h
+++ b/gr-uhd/lib/usrp_source_impl.h
@@ -77,12 +77,6 @@ namespace gr {
::uhd::sensor_value_t get_sensor(const std::string &name, size_t chan);
std::vector<std::string> get_sensor_names(size_t chan);
::uhd::usrp::dboard_iface::sptr get_dboard_iface(size_t chan);
- std::vector<std::string> get_lo_names(size_t chan);
- const std::string get_lo_source(const std::string &name, size_t chan);
- std::vector<std::string> get_lo_sources(const std::string &name, size_t chan);
- bool get_lo_export_enabled(const std::string &name, size_t chan);
- double get_lo_freq(const std::string &name, size_t chan);
- ::uhd::freq_range_t get_lo_freq_range(const std::string &name, size_t chan);
// Set Commands
void set_subdev_spec(const std::string &spec, size_t mboard);
@@ -102,9 +96,6 @@ namespace gr {
void set_iq_balance(const std::complex<double> &correction, size_t chan);
void set_stream_args(const ::uhd::stream_args_t &stream_args);
void set_start_time(const ::uhd::time_spec_t &time);
- void set_lo_source(const std::string &src, const std::string &name = ALL_LOS, size_t chan = 0);
- void set_lo_export_enabled(bool enabled, const std::string &name = ALL_LOS, size_t chan = 0);
- double set_lo_freq(double freq, const std::string &name, size_t chan);
void issue_stream_cmd(const ::uhd::stream_cmd_t &cmd);
void flush(void);
diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i
index 40a1c1509b..108f544da3 100644
--- a/gr-uhd/swig/uhd_swig.i
+++ b/gr-uhd/swig/uhd_swig.i
@@ -155,14 +155,8 @@ static uhd::device_addrs_t find_devices_raw(const uhd::device_addr_t &dev_addr =
////////////////////////////////////////////////////////////////////////
%{
static const size_t ALL_MBOARDS = uhd::usrp::multi_usrp::ALL_MBOARDS;
-static const size_t ALL_CHANS = uhd::usrp::multi_usrp::ALL_CHANS;
-static const std::string ALL_GAINS = uhd::usrp::multi_usrp::ALL_GAINS;
-static const std::string ALL_LOS = uhd::usrp::multi_usrp::ALL_LOS;
%}
static const size_t ALL_MBOARDS;
-static const size_t ALL_CHANS;
-static const std::string ALL_GAINS;
-static const std::string ALL_LOS;
%{
#include <uhd/version.hpp>