diff options
Diffstat (limited to 'gr-uhd/lib/usrp_sink_impl.h')
-rw-r--r-- | gr-uhd/lib/usrp_sink_impl.h | 48 |
1 files changed, 2 insertions, 46 deletions
diff --git a/gr-uhd/lib/usrp_sink_impl.h b/gr-uhd/lib/usrp_sink_impl.h index e0cb5a9a60..1575378d21 100644 --- a/gr-uhd/lib/usrp_sink_impl.h +++ b/gr-uhd/lib/usrp_sink_impl.h @@ -20,9 +20,9 @@ * Boston, MA 02110-1301, USA. */ +#include "usrp_block_impl.h" #include <gnuradio/uhd/usrp_sink.h> #include <uhd/convert.hpp> -#include "usrp_common.h" static const pmt::pmt_t SOB_KEY = pmt::string_to_symbol("tx_sob"); static const pmt::pmt_t EOB_KEY = pmt::string_to_symbol("tx_eob"); @@ -52,7 +52,7 @@ namespace gr { /*********************************************************************** * UHD Multi USRP Sink Impl **********************************************************************/ - class usrp_sink_impl : public usrp_sink, public usrp_common_impl + class usrp_sink_impl : public usrp_sink, public usrp_block_impl { public: usrp_sink_impl(const ::uhd::device_addr_t &device_addr, @@ -60,8 +60,6 @@ namespace gr { const std::string &length_tag_name); ~usrp_sink_impl(); - void setup_rpc(); - ::uhd::dict<std::string, std::string> get_usrp_info(size_t chan); double get_samp_rate(void); ::uhd::meta_range_t get_samp_rates(void); @@ -77,17 +75,7 @@ namespace gr { std::vector<std::string> get_antennas(size_t chan); ::uhd::sensor_value_t get_sensor(const std::string &name, size_t chan); std::vector<std::string> get_sensor_names(size_t chan); - ::uhd::sensor_value_t get_mboard_sensor(const std::string &name, size_t mboard); - std::vector<std::string> get_mboard_sensor_names(size_t mboard); - std::string get_time_source(const size_t mboard); - std::vector<std::string> get_time_sources(const size_t mboard); - std::string get_clock_source(const size_t mboard); - std::vector<std::string> get_clock_sources(const size_t mboard); - double get_clock_rate(size_t mboard); - ::uhd::time_spec_t get_time_now(size_t mboard = 0); - ::uhd::time_spec_t get_time_last_pps(size_t mboard); ::uhd::usrp::dboard_iface::sptr get_dboard_iface(size_t chan); - ::uhd::usrp::multi_usrp::sptr get_device(void); void set_subdev_spec(const std::string &spec, size_t mboard); std::string get_subdev_spec(size_t mboard); @@ -103,16 +91,6 @@ namespace gr { ::uhd::freq_range_t get_bandwidth_range(size_t chan); void set_dc_offset(const std::complex<double> &offset, size_t chan); void set_iq_balance(const std::complex<double> &correction, size_t chan); - void set_clock_config(const ::uhd::clock_config_t &clock_config, size_t mboard); - void set_time_source(const std::string &source, const size_t mboard); - void set_clock_source(const std::string &source, const size_t mboard); - void set_clock_rate(double rate, size_t mboard); - void set_time_now(const ::uhd::time_spec_t &time_spec, size_t mboard); - void set_time_next_pps(const ::uhd::time_spec_t &time_spec); - void set_time_unknown_pps(const ::uhd::time_spec_t &time_spec); - void set_command_time(const ::uhd::time_spec_t &time_spec, size_t mboard); - void clear_command_time(size_t mboard); - void set_user_register(const uint8_t addr, const uint32_t data, size_t mboard); void set_stream_args(const ::uhd::stream_args_t &stream_args); void set_start_time(const ::uhd::time_spec_t &time); @@ -126,14 +104,8 @@ namespace gr { inline void tag_work(int &ninput_items); private: - /*! \brief Run through all 'lock' sensors and make sure they are actually locked. - */ - bool _check_sensors_locked(); - //! Like set_center_freq(), but uses _curr_freq and _curr_lo_offset ::uhd::tune_result_t _set_center_freq_from_internals(size_t chan); - //! Calls _set_center_freq_from_internals() on all channels - void _set_center_freq_from_internals_allchans(); #ifdef GR_UHD_USE_STREAM_API ::uhd::tx_streamer::sptr _tx_stream; @@ -141,27 +113,11 @@ namespace gr { ::uhd::tx_metadata_t _metadata; double _sample_rate; - //stream tags related stuff std::vector<tag_t> _tags; const pmt::pmt_t _length_tag_key; long _nitems_to_send; - /****** Command interface related **********/ - //! Stores a list of commands for later execution - std::vector<pmt::pmt_t> _pending_cmds; - //! Receives commands and handles them - void msg_handler_command(pmt::pmt_t msg); - //! Stores the last value we told the USRP to tune to for every channel - // (this is not necessarily the true value the USRP is currently tuned to!). - // We could theoretically ask the device, but during streaming, we want to minimize - // communication with the USRP. - std::vector<double> _curr_freq; - //! Stores the last value we told the USRP to have the LO offset for every channel. - std::vector<double> _curr_lo_offset; - //! Stores the last gain value we told the USRP to have for every channel. - std::vector<double> _curr_gain; - boost::dynamic_bitset<> _chans_to_tune; }; } /* namespace uhd */ |