diff options
author | Josh Blum | 2009-09-22 11:17:29 -0700 |
---|---|---|
committer | Josh Blum | 2009-09-22 11:17:29 -0700 |
commit | 77ad7e778d668a2bddc9bf431088b586707bd279 (patch) | |
tree | ad79affadb05db90688fcd949749b4d68bebd371 /gr-vrt | |
parent | 7d8dd5e122e0201d96410eec6549b903881f8b3a (diff) | |
download | gnuradio-77ad7e778d668a2bddc9bf431088b586707bd279.tar.gz gnuradio-77ad7e778d668a2bddc9bf431088b586707bd279.tar.bz2 gnuradio-77ad7e778d668a2bddc9bf431088b586707bd279.zip |
made rxdspno a parameter for: start/stop streaming, and quadradio32fc
Diffstat (limited to 'gr-vrt')
-rw-r--r-- | gr-vrt/src/vrt_quadradio_source_32fc.cc | 20 | ||||
-rw-r--r-- | gr-vrt/src/vrt_quadradio_source_32fc.h | 8 |
2 files changed, 17 insertions, 11 deletions
diff --git a/gr-vrt/src/vrt_quadradio_source_32fc.cc b/gr-vrt/src/vrt_quadradio_source_32fc.cc index 0aac86991..03d75c78d 100644 --- a/gr-vrt/src/vrt_quadradio_source_32fc.cc +++ b/gr-vrt/src/vrt_quadradio_source_32fc.cc @@ -29,25 +29,29 @@ vrt_quadradio_source_32fc_sptr vrt_make_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize, - size_t samples_per_pkt) + size_t samples_per_pkt, + int rxdspno) { return gnuradio::get_initial_sptr(new vrt_quadradio_source_32fc(ip, rx_bufsize, - samples_per_pkt)); + samples_per_pkt, + rxdspno)); } vrt_quadradio_source_32fc::vrt_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize, - size_t samples_per_pkt) + size_t samples_per_pkt, + int rxdspno) : vrt_source_32fc("quadradio_source_32fc"), - d_samples_per_pkt(samples_per_pkt == 0 ? 800 : samples_per_pkt), - d_qr(vrt::quadradio::sptr(new vrt::quadradio(ip, rx_bufsize))) + d_samples_per_pkt(samples_per_pkt == 0 ? (rxdspno == 0 ? 800 : 200) : samples_per_pkt), + d_qr(vrt::quadradio::sptr(new vrt::quadradio(ip, rx_bufsize))), + d_rxdspno(rxdspno) { } vrt_quadradio_source_32fc::~vrt_quadradio_source_32fc() { - d_qr->stop_streaming(); + d_qr->stop_streaming(d_rxdspno); } vrt::rx::sptr @@ -64,13 +68,13 @@ vrt_quadradio_source_32fc::start() vrt_rx()->rx_packets(&nop, true); d_checker.resync(); - return d_qr->start_streaming(d_samples_per_pkt); + return d_qr->start_streaming(d_rxdspno, d_samples_per_pkt); } bool vrt_quadradio_source_32fc::stop() { - return d_qr->stop_streaming(); + return d_qr->stop_streaming(d_rxdspno); } bool diff --git a/gr-vrt/src/vrt_quadradio_source_32fc.h b/gr-vrt/src/vrt_quadradio_source_32fc.h index 6193efa10..eaf2741c1 100644 --- a/gr-vrt/src/vrt_quadradio_source_32fc.h +++ b/gr-vrt/src/vrt_quadradio_source_32fc.h @@ -33,19 +33,21 @@ typedef boost::shared_ptr<vrt_quadradio_source_32fc> vrt_quadradio_source_32fc_s vrt_quadradio_source_32fc_sptr vrt_make_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize = 0, - size_t samples_per_pkt = 0); + size_t samples_per_pkt = 0, + int rxdspno = 0); class vrt_quadradio_source_32fc : public vrt_source_32fc { size_t d_samples_per_pkt; boost::shared_ptr<vrt::quadradio> d_qr; + int d_rxdspno; vrt_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize, - size_t samples_per_pkt); + size_t samples_per_pkt, int rxdspno); friend vrt_quadradio_source_32fc_sptr vrt_make_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize, - size_t samples_per_pkt); + size_t samples_per_pkt, int rxdspno); public: virtual ~vrt_quadradio_source_32fc(); |