[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r11326 - in gnuradio/branches/developers/eb/vrt: gr-ut
From: |
matt |
Subject: |
[Commit-gnuradio] r11326 - in gnuradio/branches/developers/eb/vrt: gr-utils/src/python gr-vrt/src vrt/apps |
Date: |
Thu, 2 Jul 2009 00:58:32 -0600 (MDT) |
Author: matt
Date: 2009-07-02 00:58:32 -0600 (Thu, 02 Jul 2009)
New Revision: 11326
Modified:
gnuradio/branches/developers/eb/vrt/gr-utils/src/python/qr_fft.py
gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt.i
gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt_quadradio_source_32fc.cc
gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt_quadradio_source_32fc.h
gnuradio/branches/developers/eb/vrt/vrt/apps/simple_rx_samples.cc
Log:
added samples_per_pkt parameter to vrt_quadradio_source_32fc
Modified: gnuradio/branches/developers/eb/vrt/gr-utils/src/python/qr_fft.py
===================================================================
--- gnuradio/branches/developers/eb/vrt/gr-utils/src/python/qr_fft.py
2009-07-02 05:59:47 UTC (rev 11325)
+++ gnuradio/branches/developers/eb/vrt/gr-utils/src/python/qr_fft.py
2009-07-02 06:58:32 UTC (rev 11326)
@@ -62,6 +62,8 @@
help="Set dBFS=0dB input value, default=[%default]")
parser.add_option("--fft-size", type="int", default=1024,
help="Set number of FFT bins [default=%default]")
+ parser.add_option("--samples-per-pkt", type="int", default=0,
+ help="Set number of SAMPLES-PER-PKT
[default=%default]")
(options, args) = parser.parse_args()
if len(args) != 0:
parser.print_help()
@@ -69,7 +71,8 @@
self.options = options
self.show_debug_info = True
- self.u = vrt.quadradio_source_32fc("192.168.123.123", int(62.5e6))
+ self.u = vrt.quadradio_source_32fc("192.168.123.123",
+ int(62.5e6),
options.samples_per_pkt)
#self.u.set_decim(options.decim)
#input_rate = self.u.adc_rate() / self.u.decim()
Modified: gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt.i
===================================================================
--- gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt.i 2009-07-02
05:59:47 UTC (rev 11325)
+++ gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt.i 2009-07-02
06:58:32 UTC (rev 11326)
@@ -60,7 +60,8 @@
vrt_quadradio_source_32fc_sptr
vrt_make_quadradio_source_32fc(const std::string &ip,
- size_t rx_bufsize = 0)
+ size_t rx_bufsize = 0,
+ size_t samples_per_pkt = 0)
throw (std::runtime_error);
class vrt_quadradio_source_32fc : public vrt_source_32fc
Modified:
gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt_quadradio_source_32fc.cc
===================================================================
--- gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt_quadradio_source_32fc.cc
2009-07-02 05:59:47 UTC (rev 11325)
+++ gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt_quadradio_source_32fc.cc
2009-07-02 06:58:32 UTC (rev 11326)
@@ -26,15 +26,21 @@
#include <vrt/rx_packet_handler.h>
vrt_quadradio_source_32fc_sptr
-vrt_make_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize)
+vrt_make_quadradio_source_32fc(const std::string &ip,
+ size_t rx_bufsize,
+ size_t samples_per_pkt)
{
- return gnuradio::get_initial_sptr(new vrt_quadradio_source_32fc(ip,
rx_bufsize));
+ return gnuradio::get_initial_sptr(new vrt_quadradio_source_32fc(ip,
+ rx_bufsize,
+
samples_per_pkt));
}
-vrt_quadradio_source_32fc::vrt_quadradio_source_32fc(const std::string &ip,
size_t rx_bufsize)
+vrt_quadradio_source_32fc::vrt_quadradio_source_32fc(const std::string &ip,
+ size_t rx_bufsize,
+ size_t samples_per_pkt)
: vrt_source_32fc("quadradio_source_32fc"),
- d_qr(vrt::quadradio::sptr(new vrt::quadradio(ip, rx_bufsize))),
- d_samples_per_pkt(800)
+ d_samples_per_pkt(samples_per_pkt == 0 ? 800 : samples_per_pkt),
+ d_qr(vrt::quadradio::sptr(new vrt::quadradio(ip, rx_bufsize)))
{
}
Modified:
gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt_quadradio_source_32fc.h
===================================================================
--- gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt_quadradio_source_32fc.h
2009-07-02 05:59:47 UTC (rev 11325)
+++ gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt_quadradio_source_32fc.h
2009-07-02 06:58:32 UTC (rev 11326)
@@ -31,17 +31,21 @@
typedef boost::shared_ptr<vrt_quadradio_source_32fc>
vrt_quadradio_source_32fc_sptr;
vrt_quadradio_source_32fc_sptr
-vrt_make_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize = 0);
+vrt_make_quadradio_source_32fc(const std::string &ip,
+ size_t rx_bufsize = 0,
+ size_t samples_per_pkt = 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_samples_per_pkt;
- vrt_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize);
+ vrt_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize,
+ size_t samples_per_pkt);
friend vrt_quadradio_source_32fc_sptr
- vrt_make_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize);
+ vrt_make_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize,
+ size_t samples_per_pkt);
public:
virtual ~vrt_quadradio_source_32fc();
Modified: gnuradio/branches/developers/eb/vrt/vrt/apps/simple_rx_samples.cc
===================================================================
--- gnuradio/branches/developers/eb/vrt/vrt/apps/simple_rx_samples.cc
2009-07-02 05:59:47 UTC (rev 11325)
+++ gnuradio/branches/developers/eb/vrt/vrt/apps/simple_rx_samples.cc
2009-07-02 06:58:32 UTC (rev 11326)
@@ -363,6 +363,8 @@
handler = rx_nop_handler::sptr(new rx_nop_handler(nsamples));
+ printf("samples_per_pkt = %d\n", samples_per_pkt);
+
if (!qr->start_streaming(samples_per_pkt)){
fprintf(stderr, "failed to send_rx_command\n");
return 1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r11326 - in gnuradio/branches/developers/eb/vrt: gr-utils/src/python gr-vrt/src vrt/apps,
matt <=