diff options
28 files changed, 35 insertions, 92 deletions
diff --git a/gnuradio-examples/python/tags/uhd_burst_detector.py b/gnuradio-examples/python/tags/uhd_burst_detector.py index ffa419562..7411ab06e 100755 --- a/gnuradio-examples/python/tags/uhd_burst_detector.py +++ b/gnuradio-examples/python/tags/uhd_burst_detector.py @@ -42,9 +42,7 @@ class uhd_burst_detector(gr.top_block): self.uhd_src = uhd.single_usrp_source( device_addr=self.uhd_addr, - io_type=uhd.io_type_t.COMPLEX_FLOAT32, - num_channels=1, - ) + stream_args=uhd.stream_args('fc32')) self.uhd_src.set_samp_rate(self.samp_rate) self.uhd_src.set_center_freq(self.freq, 0) diff --git a/gr-digital/examples/narrowband/uhd_interface.py b/gr-digital/examples/narrowband/uhd_interface.py index 21930ad01..27e370911 100644 --- a/gr-digital/examples/narrowband/uhd_interface.py +++ b/gr-digital/examples/narrowband/uhd_interface.py @@ -46,13 +46,9 @@ class uhd_interface: gain=None, spec=None, antenna=None): if(istx): - self.u = uhd.usrp_sink(device_addr=args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_sink(device_addr=args, stream_args=uhd.stream_args('fc32')) else: - self.u = uhd.usrp_source(device_addr=args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=args, stream_args=uhd.stream_args('fc32')) self._args = args self._ant = antenna diff --git a/gr-digital/examples/ofdm/uhd_interface.py b/gr-digital/examples/ofdm/uhd_interface.py index 476d3c842..14a542b0f 100644 --- a/gr-digital/examples/ofdm/uhd_interface.py +++ b/gr-digital/examples/ofdm/uhd_interface.py @@ -46,13 +46,9 @@ class uhd_interface: gain=None, spec=None, antenna=None): if(istx): - self.u = uhd.usrp_sink(device_addr=args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_sink(device_addr=args, stream_args=uhd.stream_args('fc32')) else: - self.u = uhd.usrp_source(device_addr=args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=args, stream_args=uhd.stream_args('fc32')) self._args = args self._ant = antenna diff --git a/gr-pager/apps/usrp_flex.py b/gr-pager/apps/usrp_flex.py index 7c90d9296..7d0d66a95 100755 --- a/gr-pager/apps/usrp_flex.py +++ b/gr-pager/apps/usrp_flex.py @@ -35,9 +35,7 @@ class app_top_block(gr.top_block): if options.from_file is None: # Set up USRP source - self.u = uhd.usrp_source(device_addr=options.address, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=options.address, stream_args=uhd.stream_args('fc32')) # Grab 250 KHz of spectrum # (A UHD facility to get sample rate range and granularity would be useful) diff --git a/gr-pager/apps/usrp_flex_all.py b/gr-pager/apps/usrp_flex_all.py index 71a0a398e..36bd90034 100755 --- a/gr-pager/apps/usrp_flex_all.py +++ b/gr-pager/apps/usrp_flex_all.py @@ -39,9 +39,7 @@ class app_top_block(gr.top_block): else: # Set up USRP source - self.u = uhd.usrp_source(device_addr=options.address, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=options.address, stream_args=uhd.stream_args('fc32')) # Tune daughterboard r = self.u.set_center_freq(options.freq+options.calibration, 0) diff --git a/gr-pager/apps/usrp_flex_band.py b/gr-pager/apps/usrp_flex_band.py index 8ea76c229..63fb93fa1 100755 --- a/gr-pager/apps/usrp_flex_band.py +++ b/gr-pager/apps/usrp_flex_band.py @@ -35,9 +35,7 @@ class app_top_block(gr.top_block): print "Reading samples from file", options.from_file else: # Set up USRP source - self.u = uhd.usrp_source(device_addr=options.address, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=options.address, stream_args=uhd.stream_args('fc32')) # Grab 1 MHz of spectrum # (A UHD facility to get sample rate range and granularity would be useful) diff --git a/gr-qtgui/apps/uhd_display.py b/gr-qtgui/apps/uhd_display.py index 806914797..94e4f099c 100755 --- a/gr-qtgui/apps/uhd_display.py +++ b/gr-qtgui/apps/uhd_display.py @@ -171,9 +171,7 @@ class my_top_block(gr.top_block): self.qapp = QtGui.QApplication(sys.argv) - self.u = uhd.usrp_source(device_addr=options.address, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=options.address, stream_args=uhd.stream_args('fc32')) self.set_bandwidth(options.samp_rate) if options.gain is None: diff --git a/gr-uhd/apps/uhd_fft.py b/gr-uhd/apps/uhd_fft.py index eec709c14..c06a23036 100755 --- a/gr-uhd/apps/uhd_fft.py +++ b/gr-uhd/apps/uhd_fft.py @@ -74,9 +74,7 @@ class app_top_block(stdgui2.std_top_block): self.options = options self.show_debug_info = True - self.u = uhd.usrp_source(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32')) # Set the subdevice spec if(options.spec): diff --git a/gr-uhd/apps/uhd_rx_cfile.py b/gr-uhd/apps/uhd_rx_cfile.py index 625de36d3..61d5342c5 100755 --- a/gr-uhd/apps/uhd_rx_cfile.py +++ b/gr-uhd/apps/uhd_rx_cfile.py @@ -41,14 +41,10 @@ class rx_cfile_block(gr.top_block): # Create a UHD device source if options.output_shorts: - self._u = uhd.usrp_source(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_INT16, - num_channels=1) + self._u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('sc16')) self._sink = gr.file_sink(gr.sizeof_short*2, filename) else: - self._u = uhd.usrp_source(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self._u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32')) self._sink = gr.file_sink(gr.sizeof_gr_complex, filename) # Set receiver sample rate diff --git a/gr-uhd/apps/uhd_rx_nogui.py b/gr-uhd/apps/uhd_rx_nogui.py index 25068b3ac..7a2e0a07a 100755 --- a/gr-uhd/apps/uhd_rx_nogui.py +++ b/gr-uhd/apps/uhd_rx_nogui.py @@ -88,9 +88,7 @@ class uhd_src(gr.hier_block2): gr.io_signature(0, 0, 0), # Input signature gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature - self._src = uhd.usrp_source(device_addr=args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self._src = uhd.usrp_source(device_addr=args, stream_args=uhd.stream_args('fc32')) self._src.set_samp_rate(samp_rate) dev_rate = self._src.get_samp_rate() diff --git a/gr-uhd/apps/uhd_siggen.py b/gr-uhd/apps/uhd_siggen.py index 08efc908f..27e9e8e01 100755 --- a/gr-uhd/apps/uhd_siggen.py +++ b/gr-uhd/apps/uhd_siggen.py @@ -92,9 +92,7 @@ class top_block(gr.top_block, pubsub): self[TYPE_KEY] = options.type #set type last def _setup_usrpx(self, options): - self._u = uhd.usrp_sink(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self._u = uhd.usrp_sink(device_addr=options.args, stream_args=uhd.stream_args('fc32')) self._u.set_samp_rate(options.samp_rate) # Set the subdevice spec diff --git a/gr-uhd/examples/fm_tx4.py b/gr-uhd/examples/fm_tx4.py index 11148ea63..714eed3cf 100755 --- a/gr-uhd/examples/fm_tx4.py +++ b/gr-uhd/examples/fm_tx4.py @@ -117,9 +117,7 @@ class fm_tx_block(stdgui2.std_top_block): # ---------------------------------------------------------------- # Set up constants and parameters - self.u = uhd.usrp_sink(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_sink(device_addr=options.args, stream_args=uhd.stream_args('fc32')) self.usrp_rate = options.samp_rate self.u.set_samp_rate(self.usrp_rate) diff --git a/gr-uhd/examples/fm_tx_2_daughterboards.py b/gr-uhd/examples/fm_tx_2_daughterboards.py index 61c437a98..c0a7112de 100755 --- a/gr-uhd/examples/fm_tx_2_daughterboards.py +++ b/gr-uhd/examples/fm_tx_2_daughterboards.py @@ -113,9 +113,8 @@ class my_top_block(gr.top_block): d = uhd.find_devices(uhd.device_addr(options.args)) uhd_type = d[0].get('type') - self.u = uhd.usrp_sink(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=2) + stream_args = uhd.stream_args('fc32', channels=range(2)) + self.u = uhd.usrp_sink(device_addr=options.args, stream_args=stream_args) # Set up USRP system based on type if(uhd_type == "usrp"): diff --git a/gr-uhd/examples/max_power.py b/gr-uhd/examples/max_power.py index 53e1b413c..a849432ee 100755 --- a/gr-uhd/examples/max_power.py +++ b/gr-uhd/examples/max_power.py @@ -59,9 +59,8 @@ class build_block(gr.top_block): if tx_enable: print "\nTRANSMIT CHAIN" - self.u_tx = uhd.usrp_sink(device_addr=args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=tx_nchan) + stream_args = uhd.stream_args('fc32', channels=range(tx_nchan)) + self.u_tx = uhd.usrp_sink(device_addr=args, stream_args=stream_args) self.u_tx.set_samp_rate(MAX_RATE) self.tx_src0 = gr.sig_source_c(self.u_tx.get_samp_rate(), diff --git a/gr-uhd/examples/tags_demo.cc b/gr-uhd/examples/tags_demo.cc index b40518f34..f7442f098 100644 --- a/gr-uhd/examples/tags_demo.cc +++ b/gr-uhd/examples/tags_demo.cc @@ -80,7 +80,7 @@ int main(int argc, char *argv[]){ //-- make the usrp source test blocks //------------------------------------------------------------------ boost::shared_ptr<uhd_usrp_source> usrp_source = uhd_make_usrp_source( - device_addr, uhd::io_type_t::COMPLEX_FLOAT32, 1 + device_addr, uhd::stream_args_t("fc32") ); usrp_source->set_samp_rate(samp_rate); usrp_source->set_center_freq(center_freq); @@ -96,7 +96,7 @@ int main(int argc, char *argv[]){ //-- make the usrp sink test blocks //------------------------------------------------------------------ boost::shared_ptr<uhd_usrp_sink> usrp_sink = uhd_make_usrp_sink( - device_addr, uhd::io_type_t::COMPLEX_FLOAT32, 1 + device_addr, uhd::stream_args_t("fc32") ); usrp_sink->set_samp_rate(samp_rate); usrp_sink->set_center_freq(center_freq); diff --git a/gr-uhd/examples/usrp_am_mw_rcv.py b/gr-uhd/examples/usrp_am_mw_rcv.py index db3b35760..31fe9af70 100755 --- a/gr-uhd/examples/usrp_am_mw_rcv.py +++ b/gr-uhd/examples/usrp_am_mw_rcv.py @@ -75,9 +75,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.freq = 0 # build graph - self.u = uhd.usrp_source(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32')) usrp_rate = 256e3 demod_rate = 64e3 diff --git a/gr-uhd/examples/usrp_nbfm_ptt.py b/gr-uhd/examples/usrp_nbfm_ptt.py index 8f7ddee7d..3b28bc2ea 100755 --- a/gr-uhd/examples/usrp_nbfm_ptt.py +++ b/gr-uhd/examples/usrp_nbfm_ptt.py @@ -281,9 +281,7 @@ class transmit_path(gr.hier_block2): gr.io_signature(0, 0, 0), # Input signature gr.io_signature(0, 0, 0)) # Output signature - self.u = uhd.usrp_sink(device_addr=args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_sink(device_addr=args, stream_args=uhd.stream_args('fc32')) self.if_rate = 320e3 self.audio_rate = 32e3 diff --git a/gr-uhd/examples/usrp_nbfm_rcv.py b/gr-uhd/examples/usrp_nbfm_rcv.py index a558b9347..7e15abbcf 100755 --- a/gr-uhd/examples/usrp_nbfm_rcv.py +++ b/gr-uhd/examples/usrp_nbfm_rcv.py @@ -266,9 +266,7 @@ class receive_path(gr.hier_block2): gr.io_signature(0, 0, 0), # Input signature gr.io_signature(0, 0, 0)) # Output signature - self.u = uhd.usrp_source(device_addr=args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=args, stream_args=uhd.stream_args('fc32')) self.if_rate = 256e3 self.quad_rate = 64e3 diff --git a/gr-uhd/examples/usrp_spectrum_sense.py b/gr-uhd/examples/usrp_spectrum_sense.py index 01ca60396..ceb95ea2a 100755 --- a/gr-uhd/examples/usrp_spectrum_sense.py +++ b/gr-uhd/examples/usrp_spectrum_sense.py @@ -131,9 +131,7 @@ class my_top_block(gr.top_block): print "Note: failed to enable realtime scheduling" # build graph - self.u = uhd.usrp_source(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32')) usrp_rate = options.samp_rate self.u.set_samp_rate(usrp_rate) diff --git a/gr-uhd/examples/usrp_tv_rcv.py b/gr-uhd/examples/usrp_tv_rcv.py index 22493dd00..6e61eceec 100755 --- a/gr-uhd/examples/usrp_tv_rcv.py +++ b/gr-uhd/examples/usrp_tv_rcv.py @@ -131,9 +131,7 @@ class tv_rx_block (stdgui2.std_top_block): self.gain=0.0 else: # use a UHD device - self.u = uhd.usrp_source(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32')) self.u.set_samp_rate(usrp_rate) dev_rate = self.u.get_samp_rate() diff --git a/gr-uhd/examples/usrp_tv_rcv_nogui.py b/gr-uhd/examples/usrp_tv_rcv_nogui.py index 2324eb29e..f6a40d675 100755 --- a/gr-uhd/examples/usrp_tv_rcv_nogui.py +++ b/gr-uhd/examples/usrp_tv_rcv_nogui.py @@ -131,9 +131,7 @@ class my_top_block(gr.top_block): raise SystemExit, 1 # build the graph - self.u = uhd.usrp_source(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32')) self.u.set_samp_rate(input_rate) dev_rate = self.u.get_samp_rate() diff --git a/gr-uhd/examples/usrp_wfm_rcv.py b/gr-uhd/examples/usrp_wfm_rcv.py index cfdaa6d6f..a4abdd2a7 100755 --- a/gr-uhd/examples/usrp_wfm_rcv.py +++ b/gr-uhd/examples/usrp_wfm_rcv.py @@ -69,9 +69,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.fm_freq_max = options.freq_max # build graph - self.u = uhd.usrp_source(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32')) usrp_rate = 320e3 demod_rate = 320e3 diff --git a/gr-uhd/examples/usrp_wfm_rcv2_nogui.py b/gr-uhd/examples/usrp_wfm_rcv2_nogui.py index 8cbd18475..4173468ef 100755 --- a/gr-uhd/examples/usrp_wfm_rcv2_nogui.py +++ b/gr-uhd/examples/usrp_wfm_rcv2_nogui.py @@ -70,9 +70,8 @@ class wfm_rx_block (gr.top_block): self.fm_freq_max = options.freq_max # build graph - self.u = uhd.usrp_source(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=2) + stream_args = uhd.stream_args('fc32', channels=range(2)) + self.u = uhd.usrp_source(device_addr=options.args, stream_args=stream_args) # Set front end channel mapping self.u.set_subdev_spec(options.spec) diff --git a/gr-uhd/examples/usrp_wfm_rcv_fmdet.py b/gr-uhd/examples/usrp_wfm_rcv_fmdet.py index 39c711a6d..225c9607b 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_fmdet.py +++ b/gr-uhd/examples/usrp_wfm_rcv_fmdet.py @@ -71,9 +71,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.fm_freq_max = options.freq_max # build graph - self.u = uhd.usrp_source(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32')) usrp_rate = 320e3 demod_rate = 320e3 diff --git a/gr-uhd/examples/usrp_wfm_rcv_nogui.py b/gr-uhd/examples/usrp_wfm_rcv_nogui.py index 90caf7d08..498d2dec6 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_nogui.py +++ b/gr-uhd/examples/usrp_wfm_rcv_nogui.py @@ -63,9 +63,7 @@ class wfm_rx_block (gr.top_block): self.fm_freq_max = options.freq_max # build graph - self.u = uhd.usrp_source(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32')) usrp_rate = 320e3 demod_rate = 320e3 diff --git a/gr-uhd/examples/usrp_wfm_rcv_pll.py b/gr-uhd/examples/usrp_wfm_rcv_pll.py index 2901bf735..383670c75 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_pll.py +++ b/gr-uhd/examples/usrp_wfm_rcv_pll.py @@ -71,9 +71,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.fm_freq_max = options.freq_max # build graph - self.u = uhd.usrp_source(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32')) usrp_rate = 320e3 demod_rate = 320e3 diff --git a/gr-uhd/examples/usrp_wfm_rcv_sca.py b/gr-uhd/examples/usrp_wfm_rcv_sca.py index 9caef7499..9b233a7fb 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_sca.py +++ b/gr-uhd/examples/usrp_wfm_rcv_sca.py @@ -100,9 +100,7 @@ class wfm_rx_sca_block (stdgui2.std_top_block): # build graph - self.u = uhd.usrp_source(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32')) usrp_rate = 320e3 demod_rate = 320e3 diff --git a/gr-uhd/examples/usrp_wxapt_rcv.py b/gr-uhd/examples/usrp_wxapt_rcv.py index 1da51d363..78cc7bd08 100755 --- a/gr-uhd/examples/usrp_wxapt_rcv.py +++ b/gr-uhd/examples/usrp_wxapt_rcv.py @@ -69,9 +69,7 @@ class wxapt_rx_block (stdgui2.std_top_block): self.freq_max = options.freq_max # build graph - self.u = uhd.usrp_source(device_addr=options.args, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32')) usrp_rate = 320e3 demod_rate = 320e3 |