diff options
author | eb | 2008-10-27 08:45:43 +0000 |
---|---|---|
committer | eb | 2008-10-27 08:45:43 +0000 |
commit | c1182121a9c1ead0522ccd3012f4d4c2a885a84e (patch) | |
tree | 7856125b716801d162a04a32bb1f4e6b65281040 /usrp2/host/lib/usrp2_impl.h | |
parent | 02f918615be22ea1660aa70ac74904d8abaedb41 (diff) | |
download | gnuradio-c1182121a9c1ead0522ccd3012f4d4c2a885a84e.tar.gz gnuradio-c1182121a9c1ead0522ccd3012f4d4c2a885a84e.tar.bz2 gnuradio-c1182121a9c1ead0522ccd3012f4d4c2a885a84e.zip |
An insufficient attempt to fix the set_freq problem...
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9874 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'usrp2/host/lib/usrp2_impl.h')
-rw-r--r-- | usrp2/host/lib/usrp2_impl.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/usrp2/host/lib/usrp2_impl.h b/usrp2/host/lib/usrp2_impl.h index f513cf9d3..f6ba77acc 100644 --- a/usrp2/host/lib/usrp2_impl.h +++ b/usrp2/host/lib/usrp2_impl.h @@ -26,6 +26,7 @@ #include "control.h" #include "ring.h" #include <string> +#include <iostream> namespace usrp2 { @@ -83,6 +84,13 @@ namespace usrp2 { int d_tx_interp; // shadow tx interp int d_rx_decim; // shadow rx decim + // FIXME KLUDGE: shadow rx streaming state + bool d_rx_str_p; // Is the rx streaming? + unsigned int d_rx_str_channel; + unsigned int d_rx_str_items_per_frame; + + friend struct without_streaming; + void inc_enqueued() { omni_mutex_lock l(d_enqueued_mutex); d_num_enqueued++; @@ -107,6 +115,7 @@ namespace usrp2 { data_handler::result handle_data_packet(const void *base, size_t len); bool dboard_info(); + public: impl(const std::string &ifc, props *p); ~impl(); @@ -175,6 +184,30 @@ namespace usrp2 { bool burn_mac_addr(const std::string &new_addr); }; + + struct without_streaming { + usrp2::impl *d_impl; + bool d_was_streaming; + + without_streaming(usrp2::impl *p) + : d_impl(p), d_was_streaming(p->d_rx_str_p) + { + if (d_was_streaming){ + std::cerr << "without_streaming: stopping streaming\n"; + d_impl->stop_rx_streaming(d_impl->d_rx_str_channel); + } + } + + ~without_streaming() + { + if (d_was_streaming){ + std::cerr << "without_streaming: re-starting streaming\n"; + d_impl->start_rx_streaming(d_impl->d_rx_str_channel, d_impl->d_rx_str_items_per_frame); + } + } + }; + + } // namespace usrp2 #endif /* INCLUDED_USRP2_IMPL_H */ |