diff options
Diffstat (limited to 'gr-uhd/examples')
-rwxr-xr-x | gr-uhd/examples/fm_tx4.py | 4 | ||||
-rwxr-xr-x | gr-uhd/examples/fm_tx_2_daughterboards.py | 5 | ||||
-rwxr-xr-x | gr-uhd/examples/max_power.py | 5 | ||||
-rw-r--r-- | gr-uhd/examples/tags_demo.cc | 4 | ||||
-rwxr-xr-x | gr-uhd/examples/usrp_am_mw_rcv.py | 4 | ||||
-rwxr-xr-x | gr-uhd/examples/usrp_nbfm_ptt.py | 4 | ||||
-rwxr-xr-x | gr-uhd/examples/usrp_nbfm_rcv.py | 4 | ||||
-rwxr-xr-x | gr-uhd/examples/usrp_spectrum_sense.py | 4 | ||||
-rwxr-xr-x | gr-uhd/examples/usrp_tv_rcv.py | 4 | ||||
-rwxr-xr-x | gr-uhd/examples/usrp_tv_rcv_nogui.py | 4 | ||||
-rwxr-xr-x | gr-uhd/examples/usrp_wfm_rcv.py | 4 | ||||
-rwxr-xr-x | gr-uhd/examples/usrp_wfm_rcv2_nogui.py | 5 | ||||
-rwxr-xr-x | gr-uhd/examples/usrp_wfm_rcv_fmdet.py | 4 | ||||
-rwxr-xr-x | gr-uhd/examples/usrp_wfm_rcv_nogui.py | 4 | ||||
-rwxr-xr-x | gr-uhd/examples/usrp_wfm_rcv_pll.py | 4 | ||||
-rwxr-xr-x | gr-uhd/examples/usrp_wfm_rcv_sca.py | 4 | ||||
-rwxr-xr-x | gr-uhd/examples/usrp_wxapt_rcv.py | 4 |
17 files changed, 21 insertions, 50 deletions
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 |