diff options
Diffstat (limited to 'gr-uhd')
87 files changed, 11116 insertions, 1133 deletions
diff --git a/gr-uhd/.gitignore b/gr-uhd/.gitignore deleted file mode 100644 index a37fc0c1a..000000000 --- a/gr-uhd/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/*.pc diff --git a/gr-uhd/CMakeLists.txt b/gr-uhd/CMakeLists.txt index 4f4503234..8d5c3a884 100644 --- a/gr-uhd/CMakeLists.txt +++ b/gr-uhd/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -39,6 +39,8 @@ GR_SET_GLOBAL(GR_UHD_INCLUDE_DIRS ${UHD_INCLUDE_DIRS} ) +SET(GR_PKG_UHD_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/uhd) + ######################################################################## # Begin conditional configuration ######################################################################## @@ -71,6 +73,13 @@ CPACK_COMPONENT("uhd_python" DEPENDS "core_python;uhd_runtime" ) +CPACK_COMPONENT("uhd_examples" + GROUP "UHD" + DISPLAY_NAME "Examples" + DESCRIPTION "Example programs" + DEPENDS "uhd_runtime" +) + CPACK_COMPONENT("uhd_swig" GROUP "UHD" DISPLAY_NAME "SWIG" @@ -83,12 +92,14 @@ CPACK_COMPONENT("uhd_swig" ######################################################################## add_subdirectory(include) add_subdirectory(lib) -add_subdirectory(examples) add_subdirectory(doc) +add_subdirectory(examples/c++) if(ENABLE_PYTHON) add_subdirectory(swig) add_subdirectory(grc) add_subdirectory(apps) + add_subdirectory(examples/python) + add_subdirectory(examples/grc) endif(ENABLE_PYTHON) ######################################################################## diff --git a/gr-uhd/apps/.gitignore b/gr-uhd/apps/.gitignore deleted file mode 100644 index 22a4e7292..000000000 --- a/gr-uhd/apps/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile -Makefile.in - diff --git a/gr-uhd/apps/CMakeLists.txt b/gr-uhd/apps/CMakeLists.txt index 20ae8993f..1d68c00ac 100644 --- a/gr-uhd/apps/CMakeLists.txt +++ b/gr-uhd/apps/CMakeLists.txt @@ -23,12 +23,19 @@ include(GrPython) # Install some uhd apps ######################################################################## GR_PYTHON_INSTALL( + FILES + uhd_siggen_base.py + DESTINATION ${GR_PYTHON_DIR}/gnuradio/uhd + COMPONENT "uhd_python" +) + +GR_PYTHON_INSTALL( PROGRAMS - uhd_fft.py - uhd_rx_cfile.py - uhd_siggen.py - uhd_siggen_gui.py - uhd_rx_nogui.py + uhd_fft + uhd_rx_cfile + uhd_siggen + uhd_siggen_gui + uhd_rx_nogui DESTINATION ${GR_RUNTIME_DIR} COMPONENT "uhd_python" ) diff --git a/gr-uhd/apps/Makefile.am b/gr-uhd/apps/Makefile.am deleted file mode 100644 index c30a143c2..000000000 --- a/gr-uhd/apps/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -EXTRA_DIST += \ - $(bin_SCRIPTS) - -SUBDIRS = hf_explorer hf_radio - -ourpythondir = $(grpythondir) - -bin_SCRIPTS = \ - uhd_fft.py \ - uhd_rx_cfile.py \ - uhd_siggen.py \ - uhd_siggen_gui.py \ - uhd_rx_nogui.py diff --git a/gr-uhd/apps/hf_explorer/.gitignore b/gr-uhd/apps/hf_explorer/.gitignore deleted file mode 100644 index b6950912c..000000000 --- a/gr-uhd/apps/hf_explorer/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/*.pyc diff --git a/gr-uhd/apps/hf_explorer/Makefile.am b/gr-uhd/apps/hf_explorer/Makefile.am deleted file mode 100644 index c8e7ecb25..000000000 --- a/gr-uhd/apps/hf_explorer/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright 2006,2009 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -ourdatadir = $(exampledir)/hf_explorer - -dist_ourdata_DATA = \ - README \ - hfx_help - -dist_ourdata_SCRIPTS = \ - hfx.py diff --git a/gr-uhd/apps/hf_explorer/hfx.py b/gr-uhd/apps/hf_explorer/hfx.py index 687adf82b..1f08bd8ba 100755 --- a/gr-uhd/apps/hf_explorer/hfx.py +++ b/gr-uhd/apps/hf_explorer/hfx.py @@ -56,7 +56,7 @@ # | # V # (dst) -# +# #---------------------------------------------------------------------- # # Versions 2.2.1 adds loop antenna automatic tuner @@ -65,7 +65,7 @@ # added more comments. # # 2.4.1 updates usrp interface to support auto subdev -# +# # 2.8.1 changed saved file format from 8-byte complex to # 4-byte short for obvious storage space savings. @@ -93,7 +93,7 @@ ID_BUTTON_3 = wx.NewId() # AM ID_BUTTON_4 = wx.NewId() # CW ID_BUTTON_5 = wx.NewId() # Powermate controls: Upper audio freq cutoff ID_BUTTON_6 = wx.NewId() # " Lower audio freq cutoff -ID_BUTTON_7 = wx.NewId() # " Frequency +ID_BUTTON_7 = wx.NewId() # " Frequency ID_BUTTON_8 = wx.NewId() # " Volume ID_BUTTON_9 = wx.NewId() # " Time ID_BUTTON_10 = wx.NewId() # Time Seek Forwards @@ -105,7 +105,7 @@ ID_TEXT_1 = wx.NewId() # Band Center, USRP ddc Freq ID_SPIN_1 = wx.NewId() # Frequency display and control ID_SLIDER_1 = wx.NewId() # Upper audio freq cutoff ID_SLIDER_2 = wx.NewId() # Lower audio freq cutoff -ID_SLIDER_3 = wx.NewId() # Frequency +ID_SLIDER_3 = wx.NewId() # Frequency ID_SLIDER_4 = wx.NewId() # Volume ID_SLIDER_5 = wx.NewId() # Programmable Gain Amp, PGA, RF gain ID_SLIDER_6 = wx.NewId() # AM Sync carrier level @@ -118,7 +118,7 @@ class MyFrame(wx.Frame): # begin wxGlade: MyFrame.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) - + # Menu Bar self.frame_1_menubar = wx.MenuBar() self.SetMenuBar(self.frame_1_menubar) @@ -215,7 +215,7 @@ class MyFrame(wx.Frame): self.f_slider_scale = 10000 self.spin_ctrl_1.SetRange(self.f_lo,self.f_hi) self.text_ctrl_1.SetValue(str(int(self.usrp_center))) - self.slider_5.SetValue(0) + self.slider_5.SetValue(0) self.AM_mode = False self.slider_3.SetValue((self.frequency-self.f_slider_offset)/self.f_slider_scale) @@ -265,7 +265,7 @@ class MyFrame(wx.Frame): self.tb.connect((s2ss,1),s2f2) self.tb.connect(s2f1,(src_f2c,0)) self.tb.connect(s2f2,(src_f2c,1)) - + # save radio data to a file if SAVE_RADIO_TO_FILE: radio_file = gr.file_sink(gr.sizeof_short, options.radio_file) @@ -295,7 +295,7 @@ class MyFrame(wx.Frame): sample_rate=self.af_sample_rate, average=True, size=(640,240)) - # AM Sync carrier + # AM Sync carrier if AM_SYNC_DISPLAY: self.fft2 = fftsink.fft_sink_c(self.tb, self.panel_9, y_per_div=20, fft_size=512, @@ -698,10 +698,10 @@ class MyFrame(wx.Frame): if self.AM_mode: fRel = ( event.GetX() - 330. ) / 14.266666 - 7.5 else: - fRel = ( event.GetX() - 330. ) / 14.266666 + fRel = ( event.GetX() - 330. ) / 14.266666 self.fft.win.SetToolTip(wx.ToolTip(eng_notation.num_to_str(self.frequency + (fRel*1e3)))) - # Mouse clicked on fft display - change frequency + # Mouse clicked on fft display - change frequency def Click(self,event): fRel = ( event.GetX() - 330. ) / 14.266666 if self.AM_mode == False: @@ -752,7 +752,7 @@ class MyFrame(wx.Frame): dev.write_aux_dac(uhd.dboard_iface.UNIT_RX, uhd.dboard_iface.AUX_DAC_C, float(self.slider_7.GetValue())) - + # Timer events - check for web commands def OnUpdate(self): cmds = os.listdir("/var/www/cgi-bin/commands/") diff --git a/gr-uhd/apps/hf_explorer/hfx_help b/gr-uhd/apps/hf_explorer/hfx_help index 9a52dd2bb..c8fa28dbd 100644 --- a/gr-uhd/apps/hf_explorer/hfx_help +++ b/gr-uhd/apps/hf_explorer/hfx_help @@ -10,7 +10,7 @@ Default is 3.9e6 80 meter ham band. Example: - hfx.py -c 9500k + hfx.py -c 9500k starts up in the 31 meter band. @@ -49,15 +49,15 @@ usrp hardware needed. Tune about the 800kHz wide band. When playing a recorded file, time controls fast-forward and rewind are available. - + -d Decimation. Sets sample rate and bandwidth. This is the factor that the usrp sample rate, 64e6, is divided by. Default is 250 for 256kHz bandwidth - which is enough to record a ham band without + which is enough to record a ham band without eating up disk space too fast. The 64e6 sample rate limits the upper practical frequency to 32MHz. The Basic RX transformer limits the lower frequency - to about 200kHz. + to about 200kHz. Powermate Knob: @@ -145,12 +145,12 @@ amp I like is a Minicircuits ZHL-32A 29db amp but they are expensive and hard to find. Also it may help to use some filters to keep strong local signals from the ADC, or limit rf input - to the band of interest, etc. + to the band of interest, etc. Resonant outdoor antennas, like a dipole, in a low-noise (away from consumer electronics) environment are nice. Long random wires with a tuner work. I like a small indoor tuned loop made from 10ft of 1/4" copper tube, a 365pf tuning cap and a pickup loop connected - to rg-58. + to rg-58. Web Control: @@ -167,7 +167,7 @@ IF Output: - There is a provision for outputting un-demodulated complex + There is a provision for outputting un-demodulated complex through the audio out in stereo for use with Digital Radio Mondial (DRM) or using a seperate demodulation program like SDRadio (by I2PHD). diff --git a/gr-uhd/apps/hf_radio/.gitignore b/gr-uhd/apps/hf_radio/.gitignore deleted file mode 100644 index b6950912c..000000000 --- a/gr-uhd/apps/hf_radio/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/*.pyc diff --git a/gr-uhd/apps/hf_radio/Makefile.am b/gr-uhd/apps/hf_radio/Makefile.am deleted file mode 100644 index e514076f6..000000000 --- a/gr-uhd/apps/hf_radio/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright 2006,2009 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -ourdatadir = $(exampledir)/hf_radio - -dist_ourdata_DATA = \ - hfir.sci \ - radio.xml \ - input.py \ - output.py \ - README.TXT \ - ssbagc.py \ - ssbdemod.py \ - startup.py \ - ssb_taps - -dist_ourdata_SCRIPTS = \ - radio.py \ - ui.py diff --git a/gr-uhd/apps/hf_radio/README.TXT b/gr-uhd/apps/hf_radio/README.TXT index 7c7edf5e0..c5c57f847 100644 --- a/gr-uhd/apps/hf_radio/README.TXT +++ b/gr-uhd/apps/hf_radio/README.TXT @@ -1,17 +1,17 @@ # 2008-02-07 -# +# # These files have not yet been update to use the new top_block/hier_block2 # interfaces. Until someone does that, this files will no longer run. -# +# The files in this directory implement a fairly simple HF radio that works with the basic rx daughter board on the USRP. -Many thanks to the Gnu Radio folks for a great new way to waste large blocks +Many thanks to the Gnu Radio folks for a great new way to waste large blocks of time in infinitely tweaking a huge number of free parameters. -Start the receiver by running the radio.py in this directory. Or from the +Start the receiver by running the radio.py in this directory. Or from the Python prompt type "from radio import *" and you'll get the prompt back with the receiver running. You can then poke around to see what's going on. @@ -19,7 +19,7 @@ There are two spectrum displays. One is the output of the USRP and displays about 300KHz of bandwidth centered at the current tuning freq. The other displays the output spectrum of the demodulator. -The demodulator does AM demod using the complex modulus block from gr. It +The demodulator does AM demod using the complex modulus block from gr. It does SSB demod using the frequency translating fir filter as a complex hilbert transformer. The taps for this filter were generated using a program called Scilab and the Scilab program in the file hfir.sci. More details in @@ -39,7 +39,7 @@ The audio bandwidth can be similarly adjusted from about 50Hz to 10KHz. The GUI layout was produced using wxGlade. The file radio.xml is the GUI specification. It will produce a file called ui.py which is subclassed by classes defined in radio.py. The ui.py is purely generated by wxGlade -all app specific code for the GUI is in radio.py. +all app specific code for the GUI is in radio.py. Most of the actual signal processing code is built up in the other included files using the hierarchical block facilities. This organization should @@ -50,7 +50,7 @@ Known bugs weakness and other wxPython and wxGlade seem to conspire to insure that the layout can never be exactly what you have in mind. -Some of the controls don't behave as one might like. wx spin controls +Some of the controls don't behave as one might like. wx spin controls and spin boxes only support integers so it is rather a nuisance to make units come out nice. In the process of development I came up with a reasonable kluge so there is a mixture of approaches. diff --git a/gr-uhd/apps/hf_radio/hfir.sci b/gr-uhd/apps/hf_radio/hfir.sci index a2d5e2a62..64f5385d7 100644 --- a/gr-uhd/apps/hf_radio/hfir.sci +++ b/gr-uhd/apps/hf_radio/hfir.sci @@ -25,7 +25,7 @@ // This isn't as computationally efficient as using the hilbert transformer // and compensating delay but fascinating none the less. // -// This program is for the scilab language a very powerful free math +// This program is for the scilab language a very powerful free math // package similar to Matlab with infinitely better price/performace. // // compute the prototype lowpass fir diff --git a/gr-uhd/apps/hf_radio/input.py b/gr-uhd/apps/hf_radio/input.py index 2626ddfb5..78e800bb6 100644 --- a/gr-uhd/apps/hf_radio/input.py +++ b/gr-uhd/apps/hf_radio/input.py @@ -1,22 +1,22 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # Basic USRP setup and control. # It's only ever been tried with a basic rx daughter card. @@ -24,7 +24,7 @@ # Imagine that the gnuradio boilerplate is here. # # M. Revnell 2005-Dec - + from gnuradio import gr from gnuradio import uhd @@ -33,7 +33,7 @@ class uhd_input(gr.hier_block2): gr.hier_block2.__init__(self, "uhd_input", gr.io_signature(0,0,0), gr.io_signature(1,1,gr.sizeof_gr_complex)) - + self.src = uhd.usrp_source(device_addr=address, io_type=uhd.io_type.COMPLEX_FLOAT32, num_channels=1) @@ -65,7 +65,7 @@ class uhd_input(gr.hier_block2): self.gain = gain self.src.set_gain(gain, 0) - def add_options(parser): + def add_options(parser): parser.add_option("-a", "--address", type="string", default="addr=192.168.10.2", help="Address of UHD device, [default=%default]") diff --git a/gr-uhd/apps/hf_radio/output.py b/gr-uhd/apps/hf_radio/output.py index 8ee7dc54c..70add5b84 100644 --- a/gr-uhd/apps/hf_radio/output.py +++ b/gr-uhd/apps/hf_radio/output.py @@ -1,22 +1,22 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # Audio output with a volume control. @@ -31,7 +31,7 @@ class output( gr.hier_block2 ): gr.hier_block2.__init__(self, "output", gr.io_signature(1,1,gr.sizeof_float), gr.io_signature(0,0,0)) - + self.vol = gr.multiply_const_ff( 0.1 ) self.out = audio.sink( int(rate), device ) @@ -39,4 +39,4 @@ class output( gr.hier_block2 ): def set( self, val ): self.vol.set_k( val ) - + diff --git a/gr-uhd/apps/hf_radio/radio.py b/gr-uhd/apps/hf_radio/radio.py index 32e26c7eb..93d985067 100755 --- a/gr-uhd/apps/hf_radio/radio.py +++ b/gr-uhd/apps/hf_radio/radio.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # GUI interactions and high level connections handled here. # @@ -107,7 +107,7 @@ class radio_frame( ui_frame ): agc_ref = self.block.agc.offs.k() self.agc_ref.SetValue( str( agc_ref ) ) self.agc_ref_s.SetValue( 5 ) - + self.fespectrum = fftsink2.fft_sink_c( self.fe_panel, fft_size=512, @@ -138,7 +138,7 @@ class radio_frame( ui_frame ): r = r + 5 self.agc_ref.SetValue( str( r ) ) self.block.agc.offs.set_k( r ) - + def agc_ref_down( self, event ): self.agc_ref_s.SetValue( 5 ) r = float( self.agc_ref.GetValue() ) @@ -184,7 +184,7 @@ class radio_frame( ui_frame ): def tune_evt( self, event ): f = self.freq_disp.GetValue() self.tune( f ) - + def tune( self, frequency ): self.freq_disp.SetValue( frequency ) self.block.tune( frequency ) @@ -247,13 +247,13 @@ class radio_frame( ui_frame ): def event_pga( self, event ): self.block.src.set_gain(self.pga.GetValue()) - + def event_vol( self, event ): self.block.out.set( self.volume.GetValue()/20.0 ) def set_usb( self, event ): self.block.demod.upper_sb() - + def set_lsb( self, event ): self.block.demod.lower_sb() @@ -310,9 +310,9 @@ def main(): thread2 = Thread( target = rssi_function ) thread2.start() - + radio_obj.MainLoop() - + if __name__ == "__main__": main() diff --git a/gr-uhd/apps/hf_radio/ssbagc.py b/gr-uhd/apps/hf_radio/ssbagc.py index 494712863..6a2e0a7cd 100644 --- a/gr-uhd/apps/hf_radio/ssbagc.py +++ b/gr-uhd/apps/hf_radio/ssbagc.py @@ -1,22 +1,22 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. - + # post detection agc processing # diff --git a/gr-uhd/apps/hf_radio/ssbdemod.py b/gr-uhd/apps/hf_radio/ssbdemod.py index 072d317a2..3c533f617 100644 --- a/gr-uhd/apps/hf_radio/ssbdemod.py +++ b/gr-uhd/apps/hf_radio/ssbdemod.py @@ -1,22 +1,22 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # This tries to push the hilbert transform for ssb demod back into the # freq. xlating filter. @@ -45,7 +45,7 @@ class ssb_demod( gr.hier_block2 ): self.sideband = 1 self.xlate_taps = ([complex(v) for v in file('ssb_taps').readlines()]) - + self.audio_taps = gr.firdes.low_pass( 1.0, self.af_rate, @@ -69,7 +69,7 @@ class ssb_demod( gr.hier_block2 ): self.sb_sel = gr.multiply_const_ff( 1 ) self.mixer = gr.add_ff() self.am_det = gr.complex_to_mag() - + self.connect(self, self.xlate) self.connect(self.xlate, self.split) self.connect((self.split, 0), (self.sum, 0)) @@ -83,7 +83,7 @@ class ssb_demod( gr.hier_block2 ): self.connect(self.lpf, self) def upper_sb( self ): - self.xlate.set_taps([v.conjugate() for v in self.xlate_taps]) + self.xlate.set_taps([v.conjugate() for v in self.xlate_taps]) self.sb_sel.set_k( 1.0 ) self.am_sel.set_k( 0.0 ) @@ -91,7 +91,7 @@ class ssb_demod( gr.hier_block2 ): self.xlate.set_taps(self.xlate_taps) self.sb_sel.set_k( 1.0 ) self.am_sel.set_k( 0.0 ) - + def set_am( self ): taps = gr.firdes.low_pass( 1.0, self.if_rate, diff --git a/gr-uhd/apps/hf_radio/ui.py b/gr-uhd/apps/hf_radio/ui.py index 551a30415..a20ba4fab 100755 --- a/gr-uhd/apps/hf_radio/ui.py +++ b/gr-uhd/apps/hf_radio/ui.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # -*- coding: UTF-8 -*- # generated by wxGlade 0.4 on Mon Jan 2 19:02:03 2006 diff --git a/gr-uhd/apps/uhd_fft.py b/gr-uhd/apps/uhd_fft index 2f2b0ebfa..8bb5e0d2b 100755 --- a/gr-uhd/apps/uhd_fft.py +++ b/gr-uhd/apps/uhd_fft @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gru from gnuradio import uhd @@ -44,7 +44,7 @@ class app_top_block(stdgui2.std_top_block): self.frame = frame self.panel = panel - + parser = OptionParser(option_class=eng_option) parser.add_option("-a", "--args", type="string", default="", help="UHD device address args , [default=%default]") @@ -74,8 +74,8 @@ class app_top_block(stdgui2.std_top_block): help="Set FFT update rate, [default=%default]") parser.add_option("", "--wire-format", type="string", default="sc16", help="Set wire format from USRP [default=%default]") - parser.add_option("", "--scalar", type="int", default=1024, - help="Set scalar multiplier value sc8 wire format [default=%default]") + parser.add_option("", "--stream-args", type="string", default="", + help="Set additional stream args [default=%default]") parser.add_option("", "--show-async-msg", action="store_true", default=False, help="Show asynchronous message notifications from UHD [default=%default]") (options, args) = parser.parse_args() @@ -84,11 +84,10 @@ class app_top_block(stdgui2.std_top_block): sys.exit(1) self.options = options self.show_debug_info = True - - scalar="scalar="+str(options.scalar) + self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args(cpu_format='fc32', - otw_format=options.wire_format, args=scalar)) + otw_format=options.wire_format, args=options.stream_args)) # Set the subdevice spec if(options.spec): @@ -100,7 +99,7 @@ class app_top_block(stdgui2.std_top_block): self.u.set_samp_rate(options.samp_rate) input_rate = self.u.get_samp_rate() - + if options.waterfall: self.scope = \ waterfallsink2.waterfall_sink_c (panel, fft_size=1024, @@ -112,7 +111,7 @@ class app_top_block(stdgui2.std_top_block): else: self.scope = fftsink2.fft_sink_c (panel, fft_size=options.fft_size, - sample_rate=input_rate, + sample_rate=input_rate, ref_scale=options.ref_scale, ref_level=20.0, y_divs = 12, @@ -126,7 +125,7 @@ class app_top_block(stdgui2.std_top_block): self._build_gui(vbox) self._setup_events() - + # set initial values if options.gain is None: @@ -138,7 +137,7 @@ class app_top_block(stdgui2.std_top_block): # if no freq was specified, use the mid-point r = self.u.get_freq_range() options.freq = float(r.start()+r.stop())/2 - + self.set_gain(options.gain) if self.show_debug_info: @@ -166,9 +165,9 @@ class app_top_block(stdgui2.std_top_block): def _form_set_freq(kv): return self.set_freq(kv['freq']) - + vbox.Add(self.scope.win, 10, wx.EXPAND) - + # add control area at the bottom self.myform = myform = form.form() hbox = wx.BoxSizer(wx.HORIZONTAL) @@ -185,11 +184,11 @@ class app_top_block(stdgui2.std_top_block): if g.stop() <= g.start(): glow = 0.0 ghigh = 1.0 - + else: glow = g.start() ghigh = g.stop() - + myform['gain'] = form.slider_field(parent=self.panel, sizer=hbox, label="Gain", weight=3, @@ -235,7 +234,7 @@ class app_top_block(stdgui2.std_top_block): # FIXME figure out how to have this be a subpanel that is always # created, but has its visibility controlled by foo.Show(True/False) - + def _form_set_samp_rate(kv): return self.set_samp_rate(kv['samprate']) @@ -266,7 +265,7 @@ class app_top_block(stdgui2.std_top_block): vbox.Add(hbox, 0, wx.EXPAND) vbox.AddSpacer(5) - + def set_freq(self, target_freq): """ Set the center frequency we're interested in. @@ -300,12 +299,12 @@ class app_top_block(stdgui2.std_top_block): self.myform['samprate'].set_value(self.u.get_samp_rate()) # uhd set_samp_rate never fails; always falls back to closest requested. - return True + return True def _setup_events(self): if not self.options.waterfall and not self.options.oscilloscope: self.scope.win.Bind(wx.EVT_LEFT_DCLICK, self.evt_left_dclick) - + def evt_left_dclick(self, event): (ux, uy) = self.scope.win.GetXY(event) if event.CmdDown(): @@ -318,17 +317,17 @@ class app_top_block(stdgui2.std_top_block): ind = int(points.shape()[0]/2) else: ind = numpy.argmax(points[:,1]) - + (freq, pwr) = points[ind] target_freq = freq/self.scope.win._scale_factor print ind, freq, pwr - self.set_freq(target_freq) + self.set_freq(target_freq) else: # Re-center on clicked frequency target_freq = ux/self.scope.win._scale_factor self.set_freq(target_freq) - - + + def main (): app = stdgui2.stdapp(app_top_block, "UHD FFT", nstatus=1) app.MainLoop() diff --git a/gr-uhd/apps/uhd_rx_cfile.py b/gr-uhd/apps/uhd_rx_cfile index 718bb80b7..62874771c 100755 --- a/gr-uhd/apps/uhd_rx_cfile.py +++ b/gr-uhd/apps/uhd_rx_cfile @@ -1,28 +1,28 @@ #!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# """ Read samples from a UHD device and write to file formatted as binary -outputs single precision complex float values or complex short values +outputs single precision complex float values or complex short values (interleaved 16 bit signed short integers). """ @@ -39,15 +39,14 @@ class rx_cfile_block(gr.top_block): def __init__(self, options, filename): gr.top_block.__init__(self) - scalar="scalar="+str(options.scalar) # Create a UHD device source if options.output_shorts: self._u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('sc16', - options.wire_format, args=scalar)) + options.wire_format, args=options.stream_args)) self._sink = gr.file_sink(gr.sizeof_short*2, filename) else: self._u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32', - options.wire_format, args=scalar)) + options.wire_format, args=options.stream_args)) self._sink = gr.file_sink(gr.sizeof_gr_complex, filename) # Set the subdevice spec @@ -90,9 +89,29 @@ class rx_cfile_block(gr.top_block): self.connect(self._u, self._head, self._sink) input_rate = self._u.get_samp_rate() - + if options.verbose: - print "Args: ", options.args + try: + info = self._u.get_usrp_info() + + mboard_id = info.get("mboard_id").split(" ")[0] + if info.get("mboard_serial") == "": + mboard_serial = "no serial" + else: + mboard_serial = info.get("mboard_serial") + + rx_id = info.get("rx_id").split(" ")[0] + if info.get("rx_serial") == "": + rx_serial = "no serial" + else: + rx_serial = info.get("rx_serial") + rx_antenna = info.get("rx_antenna") + rx_subdev_spec = info.get("rx_subdev_spec") + + print "Motherboard: %s (%s)" % (mboard_id, mboard_serial) + print "Daughterboard: %s (%s, %s, %s)" % (rx_id, rx_serial, rx_antenna, rx_subdev_spec) + except: + print "Args: ", options.args print "Rx gain:", options.gain print "Rx baseband frequency:", n2s(tr.actual_rf_freq) print "Rx DDC frequency:", n2s(tr.actual_dsp_freq) @@ -117,7 +136,7 @@ class rx_cfile_block(gr.top_block): md = self.async_src.msg_to_async_metadata_t(msg) print "Channel: %i Time: %f Event: %i" % (md.channel, md.time_spec.get_real_secs(), md.event_code) - + def get_options(): usage="%prog: [options] output_filename" parser = OptionParser(option_class=eng_option, usage=usage) @@ -143,8 +162,8 @@ def get_options(): help="set daughterboard LO offset to OFFSET [default=hw default]") parser.add_option("", "--wire-format", type="string", default="sc16", help="set wire format from USRP [default=%default") - parser.add_option("", "--scalar", type="int", default=1024, - help="set scalar multiplier value for sc8 wire format [default=%default]") + parser.add_option("", "--stream-args", type="string", default="", + help="set stream arguments [default=%default]") parser.add_option("", "--show-async-msg", action="store_true", default=False, help="Show asynchronous message notifications from UHD [default=%default]") @@ -152,19 +171,19 @@ def get_options(): if len(args) != 1: parser.print_help() raise SystemExit, 1 - + if options.freq is None: parser.print_help() sys.stderr.write('You must specify the frequency with -f FREQ\n'); raise SystemExit, 1 - + return (options, args[0]) if __name__ == '__main__': (options, filename) = get_options() tb = rx_cfile_block(options, filename) - + try: tb.run() except KeyboardInterrupt: diff --git a/gr-uhd/apps/uhd_rx_nogui.py b/gr-uhd/apps/uhd_rx_nogui index bcb52c619..9977f55a3 100755 --- a/gr-uhd/apps/uhd_rx_nogui.py +++ b/gr-uhd/apps/uhd_rx_nogui @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2007,2011,2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gru, uhd, optfir, audio, blks2 from gnuradio import eng_notation @@ -27,8 +27,8 @@ from optparse import OptionParser import sys """ -This example application demonstrates receiving and demodulating -different types of signals using the USRP. +This example application demonstrates receiving and demodulating +different types of signals using the USRP. A receive chain is built up of the following signal processing blocks: @@ -77,11 +77,11 @@ demod_params = { class uhd_src(gr.hier_block2): """ Create a UHD source object supplying complex floats. - + Selects user supplied subdevice or chooses first available one. - Calibration value is the offset from the tuned frequency to - the actual frequency. + Calibration value is the offset from the tuned frequency to + the actual frequency. """ def __init__(self, args, spec, antenna, samp_rate, gain=None, calibration=0.0): gr.hier_block2.__init__(self, "uhd_src", @@ -93,19 +93,19 @@ class uhd_src(gr.hier_block2): # Set the subdevice spec if(spec): self._src.set_subdev_spec(spec, 0) - + # Set the antenna if(antenna): self._src.set_antenna(antenna, 0) - + self._src.set_samp_rate(samp_rate) dev_rate = self._src.get_samp_rate() self._samp_rate = samp_rate - + # Resampler to get to exactly samp_rate no matter what dev_rate is self._rrate = samp_rate / dev_rate self._resamp = blks2.pfb_arb_resampler_ccf(self._rrate) - + # If no gain specified, set to midrange gain_range = self._src.get_gain_range() if gain is None: @@ -121,7 +121,7 @@ class uhd_src(gr.hier_block2): def rate(self): return self._samp_rate - + class app_top_block(gr.top_block): def __init__(self, options): gr.top_block.__init__(self) @@ -160,7 +160,7 @@ class app_top_block(gr.top_block): False) # Zero, not gate output AGC = gr.agc_cc(1.0/channel_rate, # Time constant - 1.0, # Reference power + 1.0, # Reference power 1.0, # Initial gain 1.0) # Maximum gain @@ -184,7 +184,7 @@ class app_top_block(gr.top_block): out_decim = int(out_lcm // options.output_rate) RSAMP = blks2.rational_resampler_fff(out_interp, out_decim) self.connect(tail, RSAMP) - tail = RSAMP + tail = RSAMP # Send to audio output device AUDIO = audio.sink(int(options.output_rate), @@ -201,7 +201,7 @@ class app_top_block(gr.top_block): md = self.async_src.msg_to_async_metadata_t(msg) print "Channel: %i Time: %f Event: %i" % (md.channel, md.time_spec.get_real_secs(), md.event_code) - + def main(): parser = OptionParser(option_class=eng_option) parser.add_option("-a", "--args", type="string", default="", @@ -244,7 +244,7 @@ def main(): if options.modulation is None: sys.stderr.write("Must supply a modulation type (AM, FM, WFM).\n") sys.exit(1) - + tb = app_top_block(options) try: tb.run() diff --git a/gr-uhd/apps/uhd_siggen b/gr-uhd/apps/uhd_siggen new file mode 100755 index 000000000..52fc24922 --- /dev/null +++ b/gr-uhd/apps/uhd_siggen @@ -0,0 +1,51 @@ +#!/usr/bin/env python +# +# Copyright 2008,2009,2011,2012 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +from gnuradio import gr +from gnuradio.uhd import uhd_siggen_base as uhd_siggen +import sys + +def main(): + if gr.enable_realtime_scheduling() != gr.RT_OK: + print "Note: failed to enable realtime scheduling, continuing" + + # Grab command line options and create top block + try: + (options, args) = uhd_siggen.get_options() + tb = uhd_siggen.top_block(options, args) + + except RuntimeError, e: + print e + sys.exit(1) + + tb.start() + raw_input('Press Enter to quit: ') + tb.stop() + tb.wait() + +# Make sure to create the top block (tb) within a function: +# That code in main will allow tb to go out of scope on return, +# which will call the decontructor on usrp and stop transmit. +# Whats odd is that grc works fine with tb in the __main__, +# perhaps its because the try/except clauses around tb. +if __name__ == "__main__": + main() diff --git a/gr-uhd/apps/uhd_siggen.py b/gr-uhd/apps/uhd_siggen_base.py index add8d1bf3..5fa881e42 100755..100644 --- a/gr-uhd/apps/uhd_siggen.py +++ b/gr-uhd/apps/uhd_siggen_base.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2008,2009,2011,2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# DESC_KEY = 'desc' SAMP_RATE_KEY = 'samp_rate' @@ -85,7 +85,7 @@ class top_block(gr.top_block, pubsub): self.subscribe(TYPE_KEY, self.set_waveform) #force update on pubsub keys - for key in (SAMP_RATE_KEY, GAIN_KEY, TX_FREQ_KEY, + for key in (SAMP_RATE_KEY, GAIN_KEY, TX_FREQ_KEY, AMPLITUDE_KEY, WAVEFORM_FREQ_KEY, WAVEFORM_OFFSET_KEY, WAVEFORM2_FREQ_KEY): self[key] = self[key] @@ -120,7 +120,7 @@ class top_block(gr.top_block, pubsub): dboard_serial = "no serial" subdev = self._u.get_subdev_spec() antenna = self._u.get_antenna() - + desc_key_str = "Motherboard: %s [%s]\n" % (mboard_id, mboard_serial) desc_key_str += "Daughterboard: %s [%s]\n" % (dboard_id, dboard_serial) desc_key_str += "Subdev: %s\n" % subdev @@ -172,7 +172,7 @@ class top_block(gr.top_block, pubsub): self._src2.set_sampling_freq(self[WAVEFORM_FREQ_KEY]*2*math.pi/self[SAMP_RATE_KEY]) else: return True # Waveform not yet set - + if self._verbose: print "Set sample rate to:", sr @@ -211,7 +211,7 @@ class top_block(gr.top_block, pubsub): print "Tx RF frequency: %sHz" % (n2s(tr.actual_rf_freq),) print "Tx DSP frequency: %sHz" % (n2s(tr.actual_dsp_freq),) elif self._verbose: - print "Failed to set freq." + print "Failed to set freq." return tr def set_waveform_freq(self, freq): @@ -313,7 +313,7 @@ class top_block(gr.top_block, pubsub): self._src.set_k(amplitude) else: return True # Waveform not yet set - + if self._verbose: print "Set amplitude to:", amplitude return True @@ -342,7 +342,7 @@ def get_options(): parser.add_option("--sine", dest="type", action="store_const", const=gr.GR_SIN_WAVE, help="Generate a carrier modulated by a complex sine wave", default=gr.GR_SIN_WAVE) - parser.add_option("--const", dest="type", action="store_const", const=gr.GR_CONST_WAVE, + parser.add_option("--const", dest="type", action="store_const", const=gr.GR_CONST_WAVE, help="Generate a constant carrier") parser.add_option("--offset", type="eng_float", default=0, help="Set waveform phase offset to OFFSET [default=%default]") @@ -368,10 +368,10 @@ def get_options(): # If this script is executed, the following runs. If it is imported, # the below does not run. -def main(): +def test_main(): if gr.enable_realtime_scheduling() != gr.RT_OK: print "Note: failed to enable realtime scheduling, continuing" - + # Grab command line options and create top block try: (options, args) = get_options() @@ -392,4 +392,4 @@ def main(): # Whats odd is that grc works fine with tb in the __main__, # perhaps its because the try/except clauses around tb. if __name__ == "__main__": - main() + test_main() diff --git a/gr-uhd/apps/uhd_siggen_gui.py b/gr-uhd/apps/uhd_siggen_gui index 1f6a73c2c..70929b182 100755 --- a/gr-uhd/apps/uhd_siggen_gui.py +++ b/gr-uhd/apps/uhd_siggen_gui @@ -1,30 +1,30 @@ #!/usr/bin/env python # # Copyright 2009,2011,2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# import wx from gnuradio import gr, uhd from gnuradio.gr.pubsub import pubsub from gnuradio.wxgui import gui, forms -import uhd_siggen +from gnuradio.uhd import uhd_siggen_base as uhd_siggen import sys, math class app_gui(pubsub): @@ -152,7 +152,7 @@ class app_gui(pubsub): key=uhd_siggen.TX_FREQ_KEY, ) freq_hbox.AddSpacer(10) - + forms.slider( parent=self.panel, sizer=freq_hbox, proportion=2, diff --git a/gr-uhd/doc/.gitignore b/gr-uhd/doc/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-uhd/doc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-uhd/doc/CMakeLists.txt b/gr-uhd/doc/CMakeLists.txt index da3021776..b78c50a02 100644 --- a/gr-uhd/doc/CMakeLists.txt +++ b/gr-uhd/doc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/doc/Makefile.am b/gr-uhd/doc/Makefile.am deleted file mode 100644 index eee3ebcf6..000000000 --- a/gr-uhd/doc/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = - -dist_gr_doc_DATA = \ - README.uhd diff --git a/gr-uhd/doc/README.uhd b/gr-uhd/doc/README.uhd index ec8024c09..b0720d6d0 100644 --- a/gr-uhd/doc/README.uhd +++ b/gr-uhd/doc/README.uhd @@ -8,7 +8,7 @@ as: See the Doxygen documentation for details about the blocks available in this package. A quick listing of the details can be found in Python -after importing by using: +after importing by using: help(uhd) diff --git a/gr-uhd/doc/uhd.dox b/gr-uhd/doc/uhd.dox index 92ad7db4c..f03705fe1 100644 --- a/gr-uhd/doc/uhd.dox +++ b/gr-uhd/doc/uhd.dox @@ -66,7 +66,7 @@ To use these options to create a UHD source object: g = self.u.get_gain_range() options.gain = float(g.start()+g.stop())/2 self.u.set_gain(options.gain, 0) - + # Set the center frequency self.u.set_center_freq(options.freq, 0) diff --git a/gr-uhd/examples/.gitignore b/gr-uhd/examples/.gitignore deleted file mode 100644 index ad8a13c08..000000000 --- a/gr-uhd/examples/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/Makefile -/Makefile.in -*.dat -*.32f -*.32fc diff --git a/gr-uhd/examples/Makefile.am b/gr-uhd/examples/Makefile.am deleted file mode 100644 index a5dc177c4..000000000 --- a/gr-uhd/examples/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = - -ourdatadir = $(exampledir)/uhd - -dist_ourdata_SCRIPTS = \ - fm_tx4.py \ - fm_tx_2_daughterboards.py \ - max_power.py \ - usrp_am_mw_rcv.py \ - usrp_nbfm_ptt.py \ - usrp_nbfm_rcv.py \ - usrp_spectrum_sense.py \ - usrp_tv_rcv_nogui.py \ - usrp_tv_rcv.py \ - usrp_wfm_rcv2_nogui.py \ - usrp_wfm_rcv_fmdet.py \ - usrp_wfm_rcv_nogui.py \ - usrp_wfm_rcv_pll.py \ - usrp_wfm_rcv.py \ - usrp_wfm_rcv_sca.py \ - usrp_wxapt_rcv.py diff --git a/gr-uhd/examples/CMakeLists.txt b/gr-uhd/examples/c++/CMakeLists.txt index 91e2dfdaf..25645117c 100644 --- a/gr-uhd/examples/CMakeLists.txt +++ b/gr-uhd/examples/c++/CMakeLists.txt @@ -38,30 +38,8 @@ link_directories(${Boost_LIBRARY_DIRS}) add_executable(tags_demo tags_demo.cc) target_link_libraries(tags_demo gnuradio-uhd) -######################################################################## -# Python examples -######################################################################## -if(ENABLE_PYTHON) -GR_PYTHON_INSTALL( - PROGRAMS - fm_tx4.py - fm_tx_2_daughterboards.py - max_power.py - usrp_am_mw_rcv.py - usrp_nbfm_ptt.py - usrp_nbfm_rcv.py - usrp_spectrum_sense.py - usrp_tv_rcv_nogui.py - usrp_tv_rcv.py - usrp_wfm_rcv2_nogui.py - usrp_wfm_rcv_fmdet.py - usrp_wfm_rcv_nogui.py - usrp_wfm_rcv_pll.py - usrp_wfm_rcv.py - usrp_wfm_rcv_sca.py - usrp_wxapt_rcv.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/uhd - COMPONENT "uhd_python" +INSTALL(TARGETS + tags_demo + DESTINATION ${GR_PKG_UHD_EXAMPLES_DIR} + COMPONENT "uhd_examples" ) - -endif(ENABLE_PYTHON) diff --git a/gr-uhd/examples/tag_sink_demo.h b/gr-uhd/examples/c++/tag_sink_demo.h index 7d49bd971..207cc47e6 100644 --- a/gr-uhd/examples/tag_sink_demo.h +++ b/gr-uhd/examples/c++/tag_sink_demo.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/examples/tag_source_demo.h b/gr-uhd/examples/c++/tag_source_demo.h index 9743c3407..7d48502b2 100644 --- a/gr-uhd/examples/tag_source_demo.h +++ b/gr-uhd/examples/c++/tag_source_demo.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/examples/tags_demo.cc b/gr-uhd/examples/c++/tags_demo.cc index f7442f098..cc4c93272 100644 --- a/gr-uhd/examples/tags_demo.cc +++ b/gr-uhd/examples/c++/tags_demo.cc @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/Makefile.am b/gr-uhd/examples/grc/CMakeLists.txt index 56829e9c4..06c233d45 100644 --- a/gr-uhd/Makefile.am +++ b/gr-uhd/examples/grc/CMakeLists.txt @@ -1,31 +1,31 @@ +# Copyright 2012 Free Software Foundation, Inc. # -# Copyright 2010-2011 Free Software Foundation, Inc. -# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = include lib apps examples doc - -if PYTHON -SUBDIRS += swig grc -endif -pkgconfigdir = $(libdir)/pkgconfig -dist_pkgconfig_DATA = gnuradio-uhd.pc +install( + FILES + uhd_const_wave.grc + uhd_dpsk_mod.grc + uhd_fft.grc + uhd_rx_dpsk.grc + uhd_two_tone_loopback.grc + uhd_tx_dpsk.grc + uhd_wbfm_receive.grc + DESTINATION ${GR_PKG_UHD_EXAMPLES_DIR} + COMPONENT "uhd_python" +) diff --git a/gr-uhd/examples/grc/uhd_const_wave.grc b/gr-uhd/examples/grc/uhd_const_wave.grc new file mode 100644 index 000000000..c64721c83 --- /dev/null +++ b/gr-uhd/examples/grc/uhd_const_wave.grc @@ -0,0 +1,1020 @@ +<?xml version='1.0' encoding='ASCII'?> +<flow_graph> + <timestamp>Sat Oct 8 10:24:27 2011</timestamp> + <block> + <key>const_source_x</key> + <param> + <key>id</key> + <value>const_source_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>const</key> + <value>ampl</value> + </param> + <param> + <key>_coordinate</key> + <value>(102, 193)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>ampl</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Amplitude</value> + </param> + <param> + <key>value</key> + <value>.1</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>1</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(174, 313)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tun_gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>UHD Gain</value> + </param> + <param> + <key>value</key> + <value>gain</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>20</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(318, 314)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tun_freq</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>UHD Freq (Hz)</value> + </param> + <param> + <key>value</key> + <value>freq</value> + </param> + <param> + <key>min</key> + <value>2.4e9</value> + </param> + <param> + <key>max</key> + <value>2.5e9</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(24, 315)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>options</key> + <param> + <key>id</key> + <value>uhd_const_wave</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value>UHD Constant Wave</value> + </param> + <param> + <key>author</key> + <value>Example</value> + </param> + <param> + <key>description</key> + <value>Tune UHD Device</value> + </param> + <param> + <key>window_size</key> + <value>1280, 1024</value> + </param> + <param> + <key>generate_options</key> + <value>wx_gui</value> + </param> + <param> + <key>category</key> + <value>Custom</value> + </param> + <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> + <key>realtime_scheduling</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(10, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>address</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>IP Address</value> + </param> + <param> + <key>value</key> + <value>addr=192.168.11.2</value> + </param> + <param> + <key>type</key> + <value>string</value> + </param> + <param> + <key>short_id</key> + <value>a</value> + </param> + <param> + <key>_coordinate</key> + <value>(188, 12)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>samp_rate</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Sample Rate</value> + </param> + <param> + <key>value</key> + <value>1e6</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>s</value> + </param> + <param> + <key>_coordinate</key> + <value>(342, 14)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>uhd_usrp_sink</key> + <param> + <key>id</key> + <value>uhd_usrp_sink_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>dev_addr</key> + <value>address</value> + </param> + <param> + <key>sync</key> + <value></value> + </param> + <param> + <key>clock_rate</key> + <value>0.0</value> + </param> + <param> + <key>num_mboards</key> + <value>1</value> + </param> + <param> + <key>ref_source0</key> + <value></value> + </param> + <param> + <key>sd_spec0</key> + <value></value> + </param> + <param> + <key>ref_source1</key> + <value></value> + </param> + <param> + <key>sd_spec1</key> + <value></value> + </param> + <param> + <key>ref_source2</key> + <value></value> + </param> + <param> + <key>sd_spec2</key> + <value></value> + </param> + <param> + <key>ref_source3</key> + <value></value> + </param> + <param> + <key>sd_spec3</key> + <value></value> + </param> + <param> + <key>ref_source4</key> + <value></value> + </param> + <param> + <key>sd_spec4</key> + <value></value> + </param> + <param> + <key>ref_source5</key> + <value></value> + </param> + <param> + <key>sd_spec5</key> + <value></value> + </param> + <param> + <key>ref_source6</key> + <value></value> + </param> + <param> + <key>sd_spec6</key> + <value></value> + </param> + <param> + <key>ref_source7</key> + <value></value> + </param> + <param> + <key>sd_spec7</key> + <value></value> + </param> + <param> + <key>nchan</key> + <value>1</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>center_freq0</key> + <value>tun_freq</value> + </param> + <param> + <key>gain0</key> + <value>tun_gain</value> + </param> + <param> + <key>ant0</key> + <value></value> + </param> + <param> + <key>bw0</key> + <value>0</value> + </param> + <param> + <key>center_freq1</key> + <value>0</value> + </param> + <param> + <key>gain1</key> + <value>0</value> + </param> + <param> + <key>ant1</key> + <value></value> + </param> + <param> + <key>bw1</key> + <value>0</value> + </param> + <param> + <key>center_freq2</key> + <value>0</value> + </param> + <param> + <key>gain2</key> + <value>0</value> + </param> + <param> + <key>ant2</key> + <value></value> + </param> + <param> + <key>bw2</key> + <value>0</value> + </param> + <param> + <key>center_freq3</key> + <value>0</value> + </param> + <param> + <key>gain3</key> + <value>0</value> + </param> + <param> + <key>ant3</key> + <value></value> + </param> + <param> + <key>bw3</key> + <value>0</value> + </param> + <param> + <key>center_freq4</key> + <value>0</value> + </param> + <param> + <key>gain4</key> + <value>0</value> + </param> + <param> + <key>ant4</key> + <value></value> + </param> + <param> + <key>bw4</key> + <value>0</value> + </param> + <param> + <key>center_freq5</key> + <value>0</value> + </param> + <param> + <key>gain5</key> + <value>0</value> + </param> + <param> + <key>ant5</key> + <value></value> + </param> + <param> + <key>bw5</key> + <value>0</value> + </param> + <param> + <key>center_freq6</key> + <value>0</value> + </param> + <param> + <key>gain6</key> + <value>0</value> + </param> + <param> + <key>ant6</key> + <value></value> + </param> + <param> + <key>bw6</key> + <value>0</value> + </param> + <param> + <key>center_freq7</key> + <value>0</value> + </param> + <param> + <key>gain7</key> + <value>0</value> + </param> + <param> + <key>ant7</key> + <value></value> + </param> + <param> + <key>bw7</key> + <value>0</value> + </param> + <param> + <key>center_freq8</key> + <value>0</value> + </param> + <param> + <key>gain8</key> + <value>0</value> + </param> + <param> + <key>ant8</key> + <value></value> + </param> + <param> + <key>bw8</key> + <value>0</value> + </param> + <param> + <key>center_freq9</key> + <value>0</value> + </param> + <param> + <key>gain9</key> + <value>0</value> + </param> + <param> + <key>ant9</key> + <value></value> + </param> + <param> + <key>bw9</key> + <value>0</value> + </param> + <param> + <key>center_freq10</key> + <value>0</value> + </param> + <param> + <key>gain10</key> + <value>0</value> + </param> + <param> + <key>ant10</key> + <value></value> + </param> + <param> + <key>bw10</key> + <value>0</value> + </param> + <param> + <key>center_freq11</key> + <value>0</value> + </param> + <param> + <key>gain11</key> + <value>0</value> + </param> + <param> + <key>ant11</key> + <value></value> + </param> + <param> + <key>bw11</key> + <value>0</value> + </param> + <param> + <key>center_freq12</key> + <value>0</value> + </param> + <param> + <key>gain12</key> + <value>0</value> + </param> + <param> + <key>ant12</key> + <value></value> + </param> + <param> + <key>bw12</key> + <value>0</value> + </param> + <param> + <key>center_freq13</key> + <value>0</value> + </param> + <param> + <key>gain13</key> + <value>0</value> + </param> + <param> + <key>ant13</key> + <value></value> + </param> + <param> + <key>bw13</key> + <value>0</value> + </param> + <param> + <key>center_freq14</key> + <value>0</value> + </param> + <param> + <key>gain14</key> + <value>0</value> + </param> + <param> + <key>ant14</key> + <value></value> + </param> + <param> + <key>bw14</key> + <value>0</value> + </param> + <param> + <key>center_freq15</key> + <value>0</value> + </param> + <param> + <key>gain15</key> + <value>0</value> + </param> + <param> + <key>ant15</key> + <value></value> + </param> + <param> + <key>bw15</key> + <value>0</value> + </param> + <param> + <key>center_freq16</key> + <value>0</value> + </param> + <param> + <key>gain16</key> + <value>0</value> + </param> + <param> + <key>ant16</key> + <value></value> + </param> + <param> + <key>bw16</key> + <value>0</value> + </param> + <param> + <key>center_freq17</key> + <value>0</value> + </param> + <param> + <key>gain17</key> + <value>0</value> + </param> + <param> + <key>ant17</key> + <value></value> + </param> + <param> + <key>bw17</key> + <value>0</value> + </param> + <param> + <key>center_freq18</key> + <value>0</value> + </param> + <param> + <key>gain18</key> + <value>0</value> + </param> + <param> + <key>ant18</key> + <value></value> + </param> + <param> + <key>bw18</key> + <value>0</value> + </param> + <param> + <key>center_freq19</key> + <value>0</value> + </param> + <param> + <key>gain19</key> + <value>0</value> + </param> + <param> + <key>ant19</key> + <value></value> + </param> + <param> + <key>bw19</key> + <value>0</value> + </param> + <param> + <key>center_freq20</key> + <value>0</value> + </param> + <param> + <key>gain20</key> + <value>0</value> + </param> + <param> + <key>ant20</key> + <value></value> + </param> + <param> + <key>bw20</key> + <value>0</value> + </param> + <param> + <key>center_freq21</key> + <value>0</value> + </param> + <param> + <key>gain21</key> + <value>0</value> + </param> + <param> + <key>ant21</key> + <value></value> + </param> + <param> + <key>bw21</key> + <value>0</value> + </param> + <param> + <key>center_freq22</key> + <value>0</value> + </param> + <param> + <key>gain22</key> + <value>0</value> + </param> + <param> + <key>ant22</key> + <value></value> + </param> + <param> + <key>bw22</key> + <value>0</value> + </param> + <param> + <key>center_freq23</key> + <value>0</value> + </param> + <param> + <key>gain23</key> + <value>0</value> + </param> + <param> + <key>ant23</key> + <value></value> + </param> + <param> + <key>bw23</key> + <value>0</value> + </param> + <param> + <key>center_freq24</key> + <value>0</value> + </param> + <param> + <key>gain24</key> + <value>0</value> + </param> + <param> + <key>ant24</key> + <value></value> + </param> + <param> + <key>bw24</key> + <value>0</value> + </param> + <param> + <key>center_freq25</key> + <value>0</value> + </param> + <param> + <key>gain25</key> + <value>0</value> + </param> + <param> + <key>ant25</key> + <value></value> + </param> + <param> + <key>bw25</key> + <value>0</value> + </param> + <param> + <key>center_freq26</key> + <value>0</value> + </param> + <param> + <key>gain26</key> + <value>0</value> + </param> + <param> + <key>ant26</key> + <value></value> + </param> + <param> + <key>bw26</key> + <value>0</value> + </param> + <param> + <key>center_freq27</key> + <value>0</value> + </param> + <param> + <key>gain27</key> + <value>0</value> + </param> + <param> + <key>ant27</key> + <value></value> + </param> + <param> + <key>bw27</key> + <value>0</value> + </param> + <param> + <key>center_freq28</key> + <value>0</value> + </param> + <param> + <key>gain28</key> + <value>0</value> + </param> + <param> + <key>ant28</key> + <value></value> + </param> + <param> + <key>bw28</key> + <value>0</value> + </param> + <param> + <key>center_freq29</key> + <value>0</value> + </param> + <param> + <key>gain29</key> + <value>0</value> + </param> + <param> + <key>ant29</key> + <value></value> + </param> + <param> + <key>bw29</key> + <value>0</value> + </param> + <param> + <key>center_freq30</key> + <value>0</value> + </param> + <param> + <key>gain30</key> + <value>0</value> + </param> + <param> + <key>ant30</key> + <value></value> + </param> + <param> + <key>bw30</key> + <value>0</value> + </param> + <param> + <key>center_freq31</key> + <value>0</value> + </param> + <param> + <key>gain31</key> + <value>0</value> + </param> + <param> + <key>ant31</key> + <value></value> + </param> + <param> + <key>bw31</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(308, 169)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>freq</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Default Frequency</value> + </param> + <param> + <key>value</key> + <value>2.45e9</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>f</value> + </param> + <param> + <key>_coordinate</key> + <value>(468, 14)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Default Gain</value> + </param> + <param> + <key>value</key> + <value>0</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>g</value> + </param> + <param> + <key>_coordinate</key> + <value>(616, 13)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <connection> + <source_block_id>const_source_x_0</source_block_id> + <sink_block_id>uhd_usrp_sink_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> +</flow_graph> diff --git a/gr-uhd/examples/grc/uhd_dpsk_mod.grc b/gr-uhd/examples/grc/uhd_dpsk_mod.grc new file mode 100644 index 000000000..18ae9c3db --- /dev/null +++ b/gr-uhd/examples/grc/uhd_dpsk_mod.grc @@ -0,0 +1,2238 @@ +<?xml version='1.0' encoding='ASCII'?> +<flow_graph> + <timestamp>Sat Oct 8 14:44:48 2011</timestamp> + <block> + <key>options</key> + <param> + <key>id</key> + <value>uhd_dpsk_mod</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value>UHD DPSK Modulation</value> + </param> + <param> + <key>author</key> + <value>Example</value> + </param> + <param> + <key>description</key> + <value>Generate a DPSK signal</value> + </param> + <param> + <key>window_size</key> + <value>1280, 1024</value> + </param> + <param> + <key>generate_options</key> + <value>wx_gui</value> + </param> + <param> + <key>category</key> + <value>Custom</value> + </param> + <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> + <key>realtime_scheduling</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(10, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>samps_per_sym</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>8</value> + </param> + <param> + <key>_coordinate</key> + <value>(33, 280)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>wxgui_fftsink2_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>FFT Plot</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>baseband_freq</key> + <value>tun_freq</value> + </param> + <param> + <key>y_per_div</key> + <value>10</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>10</value> + </param> + <param> + <key>ref_scale</key> + <value>2.0</value> + </param> + <param> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>30</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>win</key> + <value>None</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(697, 248)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_scopesink2</key> + <param> + <key>id</key> + <value>wxgui_scopesink2_0</value> + </param> + <param> + <key>_enabled</key> + <value>False</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>Scope Plot</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>v_scale</key> + <value>0</value> + </param> + <param> + <key>v_offset</key> + <value>0</value> + </param> + <param> + <key>t_scale</key> + <value>1e-6</value> + </param> + <param> + <key>ac_couple</key> + <value>False</value> + </param> + <param> + <key>xy_mode</key> + <value>True</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>trig_mode</key> + <value>gr.gr_TRIG_MODE_AUTO</value> + </param> + <param> + <key>y_axis_label</key> + <value>Counts</value> + </param> + <param> + <key>_coordinate</key> + <value>(469, 355)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>random_source_x</key> + <param> + <key>id</key> + <value>random_source_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>byte</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>256</value> + </param> + <param> + <key>num_samps</key> + <value>1000</value> + </param> + <param> + <key>repeat</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(245, 139)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_multiply_const_vxx</key> + <param> + <key>id</key> + <value>gr_multiply_const_vxx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>const</key> + <value>ampl</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(647, 163)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tun_rx_gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>UHD RX Gain</value> + </param> + <param> + <key>value</key> + <value>rx_gain</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>20</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(477, 509)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>rx_freq_off</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>RX Freq Offset (Hz)</value> + </param> + <param> + <key>value</key> + <value>freq_offset</value> + </param> + <param> + <key>min</key> + <value>-50e3</value> + </param> + <param> + <key>max</key> + <value>+50e3</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(190, 507)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>rx_gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Default RX Gain</value> + </param> + <param> + <key>value</key> + <value>0</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(1137, 8)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>freq_offset</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Rx Frequency Offset</value> + </param> + <param> + <key>value</key> + <value>0</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>o</value> + </param> + <param> + <key>_coordinate</key> + <value>(824, 8)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>uhd_usrp_source</key> + <param> + <key>id</key> + <value>uhd_usrp_source_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>dev_addr</key> + <value>address1</value> + </param> + <param> + <key>sync</key> + <value></value> + </param> + <param> + <key>clock_rate</key> + <value>0.0</value> + </param> + <param> + <key>num_mboards</key> + <value>1</value> + </param> + <param> + <key>ref_source0</key> + <value></value> + </param> + <param> + <key>sd_spec0</key> + <value></value> + </param> + <param> + <key>ref_source1</key> + <value></value> + </param> + <param> + <key>sd_spec1</key> + <value></value> + </param> + <param> + <key>ref_source2</key> + <value></value> + </param> + <param> + <key>sd_spec2</key> + <value></value> + </param> + <param> + <key>ref_source3</key> + <value></value> + </param> + <param> + <key>sd_spec3</key> + <value></value> + </param> + <param> + <key>ref_source4</key> + <value></value> + </param> + <param> + <key>sd_spec4</key> + <value></value> + </param> + <param> + <key>ref_source5</key> + <value></value> + </param> + <param> + <key>sd_spec5</key> + <value></value> + </param> + <param> + <key>ref_source6</key> + <value></value> + </param> + <param> + <key>sd_spec6</key> + <value></value> + </param> + <param> + <key>ref_source7</key> + <value></value> + </param> + <param> + <key>sd_spec7</key> + <value></value> + </param> + <param> + <key>nchan</key> + <value>1</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>center_freq0</key> + <value>tun_freq+rx_freq_off</value> + </param> + <param> + <key>gain0</key> + <value>tun_rx_gain</value> + </param> + <param> + <key>ant0</key> + <value></value> + </param> + <param> + <key>bw0</key> + <value>0</value> + </param> + <param> + <key>center_freq1</key> + <value>0</value> + </param> + <param> + <key>gain1</key> + <value>0</value> + </param> + <param> + <key>ant1</key> + <value></value> + </param> + <param> + <key>bw1</key> + <value>0</value> + </param> + <param> + <key>center_freq2</key> + <value>0</value> + </param> + <param> + <key>gain2</key> + <value>0</value> + </param> + <param> + <key>ant2</key> + <value></value> + </param> + <param> + <key>bw2</key> + <value>0</value> + </param> + <param> + <key>center_freq3</key> + <value>0</value> + </param> + <param> + <key>gain3</key> + <value>0</value> + </param> + <param> + <key>ant3</key> + <value></value> + </param> + <param> + <key>bw3</key> + <value>0</value> + </param> + <param> + <key>center_freq4</key> + <value>0</value> + </param> + <param> + <key>gain4</key> + <value>0</value> + </param> + <param> + <key>ant4</key> + <value></value> + </param> + <param> + <key>bw4</key> + <value>0</value> + </param> + <param> + <key>center_freq5</key> + <value>0</value> + </param> + <param> + <key>gain5</key> + <value>0</value> + </param> + <param> + <key>ant5</key> + <value></value> + </param> + <param> + <key>bw5</key> + <value>0</value> + </param> + <param> + <key>center_freq6</key> + <value>0</value> + </param> + <param> + <key>gain6</key> + <value>0</value> + </param> + <param> + <key>ant6</key> + <value></value> + </param> + <param> + <key>bw6</key> + <value>0</value> + </param> + <param> + <key>center_freq7</key> + <value>0</value> + </param> + <param> + <key>gain7</key> + <value>0</value> + </param> + <param> + <key>ant7</key> + <value></value> + </param> + <param> + <key>bw7</key> + <value>0</value> + </param> + <param> + <key>center_freq8</key> + <value>0</value> + </param> + <param> + <key>gain8</key> + <value>0</value> + </param> + <param> + <key>ant8</key> + <value></value> + </param> + <param> + <key>bw8</key> + <value>0</value> + </param> + <param> + <key>center_freq9</key> + <value>0</value> + </param> + <param> + <key>gain9</key> + <value>0</value> + </param> + <param> + <key>ant9</key> + <value></value> + </param> + <param> + <key>bw9</key> + <value>0</value> + </param> + <param> + <key>center_freq10</key> + <value>0</value> + </param> + <param> + <key>gain10</key> + <value>0</value> + </param> + <param> + <key>ant10</key> + <value></value> + </param> + <param> + <key>bw10</key> + <value>0</value> + </param> + <param> + <key>center_freq11</key> + <value>0</value> + </param> + <param> + <key>gain11</key> + <value>0</value> + </param> + <param> + <key>ant11</key> + <value></value> + </param> + <param> + <key>bw11</key> + <value>0</value> + </param> + <param> + <key>center_freq12</key> + <value>0</value> + </param> + <param> + <key>gain12</key> + <value>0</value> + </param> + <param> + <key>ant12</key> + <value></value> + </param> + <param> + <key>bw12</key> + <value>0</value> + </param> + <param> + <key>center_freq13</key> + <value>0</value> + </param> + <param> + <key>gain13</key> + <value>0</value> + </param> + <param> + <key>ant13</key> + <value></value> + </param> + <param> + <key>bw13</key> + <value>0</value> + </param> + <param> + <key>center_freq14</key> + <value>0</value> + </param> + <param> + <key>gain14</key> + <value>0</value> + </param> + <param> + <key>ant14</key> + <value></value> + </param> + <param> + <key>bw14</key> + <value>0</value> + </param> + <param> + <key>center_freq15</key> + <value>0</value> + </param> + <param> + <key>gain15</key> + <value>0</value> + </param> + <param> + <key>ant15</key> + <value></value> + </param> + <param> + <key>bw15</key> + <value>0</value> + </param> + <param> + <key>center_freq16</key> + <value>0</value> + </param> + <param> + <key>gain16</key> + <value>0</value> + </param> + <param> + <key>ant16</key> + <value></value> + </param> + <param> + <key>bw16</key> + <value>0</value> + </param> + <param> + <key>center_freq17</key> + <value>0</value> + </param> + <param> + <key>gain17</key> + <value>0</value> + </param> + <param> + <key>ant17</key> + <value></value> + </param> + <param> + <key>bw17</key> + <value>0</value> + </param> + <param> + <key>center_freq18</key> + <value>0</value> + </param> + <param> + <key>gain18</key> + <value>0</value> + </param> + <param> + <key>ant18</key> + <value></value> + </param> + <param> + <key>bw18</key> + <value>0</value> + </param> + <param> + <key>center_freq19</key> + <value>0</value> + </param> + <param> + <key>gain19</key> + <value>0</value> + </param> + <param> + <key>ant19</key> + <value></value> + </param> + <param> + <key>bw19</key> + <value>0</value> + </param> + <param> + <key>center_freq20</key> + <value>0</value> + </param> + <param> + <key>gain20</key> + <value>0</value> + </param> + <param> + <key>ant20</key> + <value></value> + </param> + <param> + <key>bw20</key> + <value>0</value> + </param> + <param> + <key>center_freq21</key> + <value>0</value> + </param> + <param> + <key>gain21</key> + <value>0</value> + </param> + <param> + <key>ant21</key> + <value></value> + </param> + <param> + <key>bw21</key> + <value>0</value> + </param> + <param> + <key>center_freq22</key> + <value>0</value> + </param> + <param> + <key>gain22</key> + <value>0</value> + </param> + <param> + <key>ant22</key> + <value></value> + </param> + <param> + <key>bw22</key> + <value>0</value> + </param> + <param> + <key>center_freq23</key> + <value>0</value> + </param> + <param> + <key>gain23</key> + <value>0</value> + </param> + <param> + <key>ant23</key> + <value></value> + </param> + <param> + <key>bw23</key> + <value>0</value> + </param> + <param> + <key>center_freq24</key> + <value>0</value> + </param> + <param> + <key>gain24</key> + <value>0</value> + </param> + <param> + <key>ant24</key> + <value></value> + </param> + <param> + <key>bw24</key> + <value>0</value> + </param> + <param> + <key>center_freq25</key> + <value>0</value> + </param> + <param> + <key>gain25</key> + <value>0</value> + </param> + <param> + <key>ant25</key> + <value></value> + </param> + <param> + <key>bw25</key> + <value>0</value> + </param> + <param> + <key>center_freq26</key> + <value>0</value> + </param> + <param> + <key>gain26</key> + <value>0</value> + </param> + <param> + <key>ant26</key> + <value></value> + </param> + <param> + <key>bw26</key> + <value>0</value> + </param> + <param> + <key>center_freq27</key> + <value>0</value> + </param> + <param> + <key>gain27</key> + <value>0</value> + </param> + <param> + <key>ant27</key> + <value></value> + </param> + <param> + <key>bw27</key> + <value>0</value> + </param> + <param> + <key>center_freq28</key> + <value>0</value> + </param> + <param> + <key>gain28</key> + <value>0</value> + </param> + <param> + <key>ant28</key> + <value></value> + </param> + <param> + <key>bw28</key> + <value>0</value> + </param> + <param> + <key>center_freq29</key> + <value>0</value> + </param> + <param> + <key>gain29</key> + <value>0</value> + </param> + <param> + <key>ant29</key> + <value></value> + </param> + <param> + <key>bw29</key> + <value>0</value> + </param> + <param> + <key>center_freq30</key> + <value>0</value> + </param> + <param> + <key>gain30</key> + <value>0</value> + </param> + <param> + <key>ant30</key> + <value></value> + </param> + <param> + <key>bw30</key> + <value>0</value> + </param> + <param> + <key>center_freq31</key> + <value>0</value> + </param> + <param> + <key>gain31</key> + <value>0</value> + </param> + <param> + <key>ant31</key> + <value></value> + </param> + <param> + <key>bw31</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(216, 288)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_constellationsink2</key> + <param> + <key>id</key> + <value>wxgui_constellationsink2_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value>Constellation Plot</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>frame_rate</key> + <value>5</value> + </param> + <param> + <key>const_size</key> + <value>2048</value> + </param> + <param> + <key>M</key> + <value>4</value> + </param> + <param> + <key>theta</key> + <value>0</value> + </param> + <param> + <key>loop_bw</key> + <value>6.28/100.0</value> + </param> + <param> + <key>fmax</key> + <value>0.06</value> + </param> + <param> + <key>mu</key> + <value>0.5</value> + </param> + <param> + <key>gain_mu</key> + <value>0.005</value> + </param> + <param> + <key>symbol_rate</key> + <value>samp_rate/samps_per_sym</value> + </param> + <param> + <key>omega_limit</key> + <value>0.005</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(862, 336)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>digital_dxpsk_mod</key> + <param> + <key>id</key> + <value>digital_dxpsk_mod_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>dqpsk</value> + </param> + <param> + <key>samples_per_symbol</key> + <value>samps_per_sym</value> + </param> + <param> + <key>excess_bw</key> + <value>0.35</value> + </param> + <param> + <key>gray_coded</key> + <value>True</value> + </param> + <param> + <key>verbose</key> + <value>False</value> + </param> + <param> + <key>log</key> + <value>False</value> + </param> + <param> + <key>_coordinate</key> + <value>(426, 139)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>ampl</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Amplitude</value> + </param> + <param> + <key>value</key> + <value>.1</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>1</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(33, 353)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>uhd_usrp_sink</key> + <param> + <key>id</key> + <value>uhd_usrp_sink_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>dev_addr</key> + <value>address0</value> + </param> + <param> + <key>sync</key> + <value></value> + </param> + <param> + <key>clock_rate</key> + <value>0.0</value> + </param> + <param> + <key>num_mboards</key> + <value>1</value> + </param> + <param> + <key>ref_source0</key> + <value></value> + </param> + <param> + <key>sd_spec0</key> + <value></value> + </param> + <param> + <key>ref_source1</key> + <value></value> + </param> + <param> + <key>sd_spec1</key> + <value></value> + </param> + <param> + <key>ref_source2</key> + <value></value> + </param> + <param> + <key>sd_spec2</key> + <value></value> + </param> + <param> + <key>ref_source3</key> + <value></value> + </param> + <param> + <key>sd_spec3</key> + <value></value> + </param> + <param> + <key>ref_source4</key> + <value></value> + </param> + <param> + <key>sd_spec4</key> + <value></value> + </param> + <param> + <key>ref_source5</key> + <value></value> + </param> + <param> + <key>sd_spec5</key> + <value></value> + </param> + <param> + <key>ref_source6</key> + <value></value> + </param> + <param> + <key>sd_spec6</key> + <value></value> + </param> + <param> + <key>ref_source7</key> + <value></value> + </param> + <param> + <key>sd_spec7</key> + <value></value> + </param> + <param> + <key>nchan</key> + <value>1</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>center_freq0</key> + <value>tun_freq</value> + </param> + <param> + <key>gain0</key> + <value>tun_rx_gain</value> + </param> + <param> + <key>ant0</key> + <value></value> + </param> + <param> + <key>bw0</key> + <value>0</value> + </param> + <param> + <key>center_freq1</key> + <value>0</value> + </param> + <param> + <key>gain1</key> + <value>0</value> + </param> + <param> + <key>ant1</key> + <value></value> + </param> + <param> + <key>bw1</key> + <value>0</value> + </param> + <param> + <key>center_freq2</key> + <value>0</value> + </param> + <param> + <key>gain2</key> + <value>0</value> + </param> + <param> + <key>ant2</key> + <value></value> + </param> + <param> + <key>bw2</key> + <value>0</value> + </param> + <param> + <key>center_freq3</key> + <value>0</value> + </param> + <param> + <key>gain3</key> + <value>0</value> + </param> + <param> + <key>ant3</key> + <value></value> + </param> + <param> + <key>bw3</key> + <value>0</value> + </param> + <param> + <key>center_freq4</key> + <value>0</value> + </param> + <param> + <key>gain4</key> + <value>0</value> + </param> + <param> + <key>ant4</key> + <value></value> + </param> + <param> + <key>bw4</key> + <value>0</value> + </param> + <param> + <key>center_freq5</key> + <value>0</value> + </param> + <param> + <key>gain5</key> + <value>0</value> + </param> + <param> + <key>ant5</key> + <value></value> + </param> + <param> + <key>bw5</key> + <value>0</value> + </param> + <param> + <key>center_freq6</key> + <value>0</value> + </param> + <param> + <key>gain6</key> + <value>0</value> + </param> + <param> + <key>ant6</key> + <value></value> + </param> + <param> + <key>bw6</key> + <value>0</value> + </param> + <param> + <key>center_freq7</key> + <value>0</value> + </param> + <param> + <key>gain7</key> + <value>0</value> + </param> + <param> + <key>ant7</key> + <value></value> + </param> + <param> + <key>bw7</key> + <value>0</value> + </param> + <param> + <key>center_freq8</key> + <value>0</value> + </param> + <param> + <key>gain8</key> + <value>0</value> + </param> + <param> + <key>ant8</key> + <value></value> + </param> + <param> + <key>bw8</key> + <value>0</value> + </param> + <param> + <key>center_freq9</key> + <value>0</value> + </param> + <param> + <key>gain9</key> + <value>0</value> + </param> + <param> + <key>ant9</key> + <value></value> + </param> + <param> + <key>bw9</key> + <value>0</value> + </param> + <param> + <key>center_freq10</key> + <value>0</value> + </param> + <param> + <key>gain10</key> + <value>0</value> + </param> + <param> + <key>ant10</key> + <value></value> + </param> + <param> + <key>bw10</key> + <value>0</value> + </param> + <param> + <key>center_freq11</key> + <value>0</value> + </param> + <param> + <key>gain11</key> + <value>0</value> + </param> + <param> + <key>ant11</key> + <value></value> + </param> + <param> + <key>bw11</key> + <value>0</value> + </param> + <param> + <key>center_freq12</key> + <value>0</value> + </param> + <param> + <key>gain12</key> + <value>0</value> + </param> + <param> + <key>ant12</key> + <value></value> + </param> + <param> + <key>bw12</key> + <value>0</value> + </param> + <param> + <key>center_freq13</key> + <value>0</value> + </param> + <param> + <key>gain13</key> + <value>0</value> + </param> + <param> + <key>ant13</key> + <value></value> + </param> + <param> + <key>bw13</key> + <value>0</value> + </param> + <param> + <key>center_freq14</key> + <value>0</value> + </param> + <param> + <key>gain14</key> + <value>0</value> + </param> + <param> + <key>ant14</key> + <value></value> + </param> + <param> + <key>bw14</key> + <value>0</value> + </param> + <param> + <key>center_freq15</key> + <value>0</value> + </param> + <param> + <key>gain15</key> + <value>0</value> + </param> + <param> + <key>ant15</key> + <value></value> + </param> + <param> + <key>bw15</key> + <value>0</value> + </param> + <param> + <key>center_freq16</key> + <value>0</value> + </param> + <param> + <key>gain16</key> + <value>0</value> + </param> + <param> + <key>ant16</key> + <value></value> + </param> + <param> + <key>bw16</key> + <value>0</value> + </param> + <param> + <key>center_freq17</key> + <value>0</value> + </param> + <param> + <key>gain17</key> + <value>0</value> + </param> + <param> + <key>ant17</key> + <value></value> + </param> + <param> + <key>bw17</key> + <value>0</value> + </param> + <param> + <key>center_freq18</key> + <value>0</value> + </param> + <param> + <key>gain18</key> + <value>0</value> + </param> + <param> + <key>ant18</key> + <value></value> + </param> + <param> + <key>bw18</key> + <value>0</value> + </param> + <param> + <key>center_freq19</key> + <value>0</value> + </param> + <param> + <key>gain19</key> + <value>0</value> + </param> + <param> + <key>ant19</key> + <value></value> + </param> + <param> + <key>bw19</key> + <value>0</value> + </param> + <param> + <key>center_freq20</key> + <value>0</value> + </param> + <param> + <key>gain20</key> + <value>0</value> + </param> + <param> + <key>ant20</key> + <value></value> + </param> + <param> + <key>bw20</key> + <value>0</value> + </param> + <param> + <key>center_freq21</key> + <value>0</value> + </param> + <param> + <key>gain21</key> + <value>0</value> + </param> + <param> + <key>ant21</key> + <value></value> + </param> + <param> + <key>bw21</key> + <value>0</value> + </param> + <param> + <key>center_freq22</key> + <value>0</value> + </param> + <param> + <key>gain22</key> + <value>0</value> + </param> + <param> + <key>ant22</key> + <value></value> + </param> + <param> + <key>bw22</key> + <value>0</value> + </param> + <param> + <key>center_freq23</key> + <value>0</value> + </param> + <param> + <key>gain23</key> + <value>0</value> + </param> + <param> + <key>ant23</key> + <value></value> + </param> + <param> + <key>bw23</key> + <value>0</value> + </param> + <param> + <key>center_freq24</key> + <value>0</value> + </param> + <param> + <key>gain24</key> + <value>0</value> + </param> + <param> + <key>ant24</key> + <value></value> + </param> + <param> + <key>bw24</key> + <value>0</value> + </param> + <param> + <key>center_freq25</key> + <value>0</value> + </param> + <param> + <key>gain25</key> + <value>0</value> + </param> + <param> + <key>ant25</key> + <value></value> + </param> + <param> + <key>bw25</key> + <value>0</value> + </param> + <param> + <key>center_freq26</key> + <value>0</value> + </param> + <param> + <key>gain26</key> + <value>0</value> + </param> + <param> + <key>ant26</key> + <value></value> + </param> + <param> + <key>bw26</key> + <value>0</value> + </param> + <param> + <key>center_freq27</key> + <value>0</value> + </param> + <param> + <key>gain27</key> + <value>0</value> + </param> + <param> + <key>ant27</key> + <value></value> + </param> + <param> + <key>bw27</key> + <value>0</value> + </param> + <param> + <key>center_freq28</key> + <value>0</value> + </param> + <param> + <key>gain28</key> + <value>0</value> + </param> + <param> + <key>ant28</key> + <value></value> + </param> + <param> + <key>bw28</key> + <value>0</value> + </param> + <param> + <key>center_freq29</key> + <value>0</value> + </param> + <param> + <key>gain29</key> + <value>0</value> + </param> + <param> + <key>ant29</key> + <value></value> + </param> + <param> + <key>bw29</key> + <value>0</value> + </param> + <param> + <key>center_freq30</key> + <value>0</value> + </param> + <param> + <key>gain30</key> + <value>0</value> + </param> + <param> + <key>ant30</key> + <value></value> + </param> + <param> + <key>bw30</key> + <value>0</value> + </param> + <param> + <key>center_freq31</key> + <value>0</value> + </param> + <param> + <key>gain31</key> + <value>0</value> + </param> + <param> + <key>ant31</key> + <value></value> + </param> + <param> + <key>bw31</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(838, 139)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tun_tx_gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>UHD TX Gain</value> + </param> + <param> + <key>value</key> + <value>tx_gain</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>20</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(351, 508)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>address0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>IP Address, Dev 0</value> + </param> + <param> + <key>value</key> + <value>addr=192.168.10.2</value> + </param> + <param> + <key>type</key> + <value>string</value> + </param> + <param> + <key>short_id</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(197, 11)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>address1</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>IP Address, Dev 1</value> + </param> + <param> + <key>value</key> + <value>addr=192.168.11.2</value> + </param> + <param> + <key>type</key> + <value>string</value> + </param> + <param> + <key>short_id</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(357, 11)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>samp_rate</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Sample Rate</value> + </param> + <param> + <key>value</key> + <value>1e6</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>s</value> + </param> + <param> + <key>_coordinate</key> + <value>(543, 8)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>freq</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Default Frequency</value> + </param> + <param> + <key>value</key> + <value>2.45e9</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>f</value> + </param> + <param> + <key>_coordinate</key> + <value>(669, 8)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>tx_gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Default TX Gain</value> + </param> + <param> + <key>value</key> + <value>0</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(1003, 8)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tun_freq</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Freq (Hz)</value> + </param> + <param> + <key>value</key> + <value>freq</value> + </param> + <param> + <key>min</key> + <value>2.4e9</value> + </param> + <param> + <key>max</key> + <value>2.5e9</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(35, 506)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <connection> + <source_block_id>uhd_usrp_source_0</source_block_id> + <sink_block_id>wxgui_fftsink2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>uhd_usrp_source_0</source_block_id> + <sink_block_id>wxgui_constellationsink2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>uhd_usrp_source_0</source_block_id> + <sink_block_id>wxgui_scopesink2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_multiply_const_vxx_0</source_block_id> + <sink_block_id>uhd_usrp_sink_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>random_source_x_0</source_block_id> + <sink_block_id>digital_dxpsk_mod_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>digital_dxpsk_mod_0</source_block_id> + <sink_block_id>gr_multiply_const_vxx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> +</flow_graph> diff --git a/gr-uhd/examples/grc/uhd_fft.grc b/gr-uhd/examples/grc/uhd_fft.grc new file mode 100644 index 000000000..29c375065 --- /dev/null +++ b/gr-uhd/examples/grc/uhd_fft.grc @@ -0,0 +1,1025 @@ +<?xml version='1.0' encoding='ASCII'?> +<flow_graph> + <timestamp>Sat Oct 8 10:26:30 2011</timestamp> + <block> + <key>options</key> + <param> + <key>id</key> + <value>uhd_fft</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value>UHD FFT Plotter</value> + </param> + <param> + <key>author</key> + <value>Example</value> + </param> + <param> + <key>description</key> + <value>FFT waveform plot</value> + </param> + <param> + <key>window_size</key> + <value>1280, 1024</value> + </param> + <param> + <key>generate_options</key> + <value>wx_gui</value> + </param> + <param> + <key>category</key> + <value>Custom</value> + </param> + <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> + <key>realtime_scheduling</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(10, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Default Gain</value> + </param> + <param> + <key>value</key> + <value>0</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>g</value> + </param> + <param> + <key>_coordinate</key> + <value>(633, 17)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>freq</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Default Frequency</value> + </param> + <param> + <key>value</key> + <value>2.45e9</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>f</value> + </param> + <param> + <key>_coordinate</key> + <value>(485, 18)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>address</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>IP Address</value> + </param> + <param> + <key>value</key> + <value>addr=192.168.11.2</value> + </param> + <param> + <key>type</key> + <value>string</value> + </param> + <param> + <key>short_id</key> + <value>a</value> + </param> + <param> + <key>_coordinate</key> + <value>(205, 16)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>samp_rate</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Sample Rate</value> + </param> + <param> + <key>value</key> + <value>1e6</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>s</value> + </param> + <param> + <key>_coordinate</key> + <value>(359, 18)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>wxgui_fftsink2_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>FFT Plot</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>baseband_freq</key> + <value>tun_freq</value> + </param> + <param> + <key>y_per_div</key> + <value>10</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>10</value> + </param> + <param> + <key>ref_scale</key> + <value>2.0</value> + </param> + <param> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>30</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>win</key> + <value>None</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(479, 176)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>uhd_usrp_source</key> + <param> + <key>id</key> + <value>uhd_usrp_source_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>dev_addr</key> + <value>address</value> + </param> + <param> + <key>sync</key> + <value></value> + </param> + <param> + <key>clock_rate</key> + <value>0.0</value> + </param> + <param> + <key>num_mboards</key> + <value>1</value> + </param> + <param> + <key>ref_source0</key> + <value></value> + </param> + <param> + <key>sd_spec0</key> + <value></value> + </param> + <param> + <key>ref_source1</key> + <value></value> + </param> + <param> + <key>sd_spec1</key> + <value></value> + </param> + <param> + <key>ref_source2</key> + <value></value> + </param> + <param> + <key>sd_spec2</key> + <value></value> + </param> + <param> + <key>ref_source3</key> + <value></value> + </param> + <param> + <key>sd_spec3</key> + <value></value> + </param> + <param> + <key>ref_source4</key> + <value></value> + </param> + <param> + <key>sd_spec4</key> + <value></value> + </param> + <param> + <key>ref_source5</key> + <value></value> + </param> + <param> + <key>sd_spec5</key> + <value></value> + </param> + <param> + <key>ref_source6</key> + <value></value> + </param> + <param> + <key>sd_spec6</key> + <value></value> + </param> + <param> + <key>ref_source7</key> + <value></value> + </param> + <param> + <key>sd_spec7</key> + <value></value> + </param> + <param> + <key>nchan</key> + <value>1</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>center_freq0</key> + <value>tun_freq</value> + </param> + <param> + <key>gain0</key> + <value>tun_gain</value> + </param> + <param> + <key>ant0</key> + <value></value> + </param> + <param> + <key>bw0</key> + <value>0</value> + </param> + <param> + <key>center_freq1</key> + <value>0</value> + </param> + <param> + <key>gain1</key> + <value>0</value> + </param> + <param> + <key>ant1</key> + <value></value> + </param> + <param> + <key>bw1</key> + <value>0</value> + </param> + <param> + <key>center_freq2</key> + <value>0</value> + </param> + <param> + <key>gain2</key> + <value>0</value> + </param> + <param> + <key>ant2</key> + <value></value> + </param> + <param> + <key>bw2</key> + <value>0</value> + </param> + <param> + <key>center_freq3</key> + <value>0</value> + </param> + <param> + <key>gain3</key> + <value>0</value> + </param> + <param> + <key>ant3</key> + <value></value> + </param> + <param> + <key>bw3</key> + <value>0</value> + </param> + <param> + <key>center_freq4</key> + <value>0</value> + </param> + <param> + <key>gain4</key> + <value>0</value> + </param> + <param> + <key>ant4</key> + <value></value> + </param> + <param> + <key>bw4</key> + <value>0</value> + </param> + <param> + <key>center_freq5</key> + <value>0</value> + </param> + <param> + <key>gain5</key> + <value>0</value> + </param> + <param> + <key>ant5</key> + <value></value> + </param> + <param> + <key>bw5</key> + <value>0</value> + </param> + <param> + <key>center_freq6</key> + <value>0</value> + </param> + <param> + <key>gain6</key> + <value>0</value> + </param> + <param> + <key>ant6</key> + <value></value> + </param> + <param> + <key>bw6</key> + <value>0</value> + </param> + <param> + <key>center_freq7</key> + <value>0</value> + </param> + <param> + <key>gain7</key> + <value>0</value> + </param> + <param> + <key>ant7</key> + <value></value> + </param> + <param> + <key>bw7</key> + <value>0</value> + </param> + <param> + <key>center_freq8</key> + <value>0</value> + </param> + <param> + <key>gain8</key> + <value>0</value> + </param> + <param> + <key>ant8</key> + <value></value> + </param> + <param> + <key>bw8</key> + <value>0</value> + </param> + <param> + <key>center_freq9</key> + <value>0</value> + </param> + <param> + <key>gain9</key> + <value>0</value> + </param> + <param> + <key>ant9</key> + <value></value> + </param> + <param> + <key>bw9</key> + <value>0</value> + </param> + <param> + <key>center_freq10</key> + <value>0</value> + </param> + <param> + <key>gain10</key> + <value>0</value> + </param> + <param> + <key>ant10</key> + <value></value> + </param> + <param> + <key>bw10</key> + <value>0</value> + </param> + <param> + <key>center_freq11</key> + <value>0</value> + </param> + <param> + <key>gain11</key> + <value>0</value> + </param> + <param> + <key>ant11</key> + <value></value> + </param> + <param> + <key>bw11</key> + <value>0</value> + </param> + <param> + <key>center_freq12</key> + <value>0</value> + </param> + <param> + <key>gain12</key> + <value>0</value> + </param> + <param> + <key>ant12</key> + <value></value> + </param> + <param> + <key>bw12</key> + <value>0</value> + </param> + <param> + <key>center_freq13</key> + <value>0</value> + </param> + <param> + <key>gain13</key> + <value>0</value> + </param> + <param> + <key>ant13</key> + <value></value> + </param> + <param> + <key>bw13</key> + <value>0</value> + </param> + <param> + <key>center_freq14</key> + <value>0</value> + </param> + <param> + <key>gain14</key> + <value>0</value> + </param> + <param> + <key>ant14</key> + <value></value> + </param> + <param> + <key>bw14</key> + <value>0</value> + </param> + <param> + <key>center_freq15</key> + <value>0</value> + </param> + <param> + <key>gain15</key> + <value>0</value> + </param> + <param> + <key>ant15</key> + <value></value> + </param> + <param> + <key>bw15</key> + <value>0</value> + </param> + <param> + <key>center_freq16</key> + <value>0</value> + </param> + <param> + <key>gain16</key> + <value>0</value> + </param> + <param> + <key>ant16</key> + <value></value> + </param> + <param> + <key>bw16</key> + <value>0</value> + </param> + <param> + <key>center_freq17</key> + <value>0</value> + </param> + <param> + <key>gain17</key> + <value>0</value> + </param> + <param> + <key>ant17</key> + <value></value> + </param> + <param> + <key>bw17</key> + <value>0</value> + </param> + <param> + <key>center_freq18</key> + <value>0</value> + </param> + <param> + <key>gain18</key> + <value>0</value> + </param> + <param> + <key>ant18</key> + <value></value> + </param> + <param> + <key>bw18</key> + <value>0</value> + </param> + <param> + <key>center_freq19</key> + <value>0</value> + </param> + <param> + <key>gain19</key> + <value>0</value> + </param> + <param> + <key>ant19</key> + <value></value> + </param> + <param> + <key>bw19</key> + <value>0</value> + </param> + <param> + <key>center_freq20</key> + <value>0</value> + </param> + <param> + <key>gain20</key> + <value>0</value> + </param> + <param> + <key>ant20</key> + <value></value> + </param> + <param> + <key>bw20</key> + <value>0</value> + </param> + <param> + <key>center_freq21</key> + <value>0</value> + </param> + <param> + <key>gain21</key> + <value>0</value> + </param> + <param> + <key>ant21</key> + <value></value> + </param> + <param> + <key>bw21</key> + <value>0</value> + </param> + <param> + <key>center_freq22</key> + <value>0</value> + </param> + <param> + <key>gain22</key> + <value>0</value> + </param> + <param> + <key>ant22</key> + <value></value> + </param> + <param> + <key>bw22</key> + <value>0</value> + </param> + <param> + <key>center_freq23</key> + <value>0</value> + </param> + <param> + <key>gain23</key> + <value>0</value> + </param> + <param> + <key>ant23</key> + <value></value> + </param> + <param> + <key>bw23</key> + <value>0</value> + </param> + <param> + <key>center_freq24</key> + <value>0</value> + </param> + <param> + <key>gain24</key> + <value>0</value> + </param> + <param> + <key>ant24</key> + <value></value> + </param> + <param> + <key>bw24</key> + <value>0</value> + </param> + <param> + <key>center_freq25</key> + <value>0</value> + </param> + <param> + <key>gain25</key> + <value>0</value> + </param> + <param> + <key>ant25</key> + <value></value> + </param> + <param> + <key>bw25</key> + <value>0</value> + </param> + <param> + <key>center_freq26</key> + <value>0</value> + </param> + <param> + <key>gain26</key> + <value>0</value> + </param> + <param> + <key>ant26</key> + <value></value> + </param> + <param> + <key>bw26</key> + <value>0</value> + </param> + <param> + <key>center_freq27</key> + <value>0</value> + </param> + <param> + <key>gain27</key> + <value>0</value> + </param> + <param> + <key>ant27</key> + <value></value> + </param> + <param> + <key>bw27</key> + <value>0</value> + </param> + <param> + <key>center_freq28</key> + <value>0</value> + </param> + <param> + <key>gain28</key> + <value>0</value> + </param> + <param> + <key>ant28</key> + <value></value> + </param> + <param> + <key>bw28</key> + <value>0</value> + </param> + <param> + <key>center_freq29</key> + <value>0</value> + </param> + <param> + <key>gain29</key> + <value>0</value> + </param> + <param> + <key>ant29</key> + <value></value> + </param> + <param> + <key>bw29</key> + <value>0</value> + </param> + <param> + <key>center_freq30</key> + <value>0</value> + </param> + <param> + <key>gain30</key> + <value>0</value> + </param> + <param> + <key>ant30</key> + <value></value> + </param> + <param> + <key>bw30</key> + <value>0</value> + </param> + <param> + <key>center_freq31</key> + <value>0</value> + </param> + <param> + <key>gain31</key> + <value>0</value> + </param> + <param> + <key>ant31</key> + <value></value> + </param> + <param> + <key>bw31</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(212, 216)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tun_freq</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>UHD Freq (Hz)</value> + </param> + <param> + <key>value</key> + <value>freq</value> + </param> + <param> + <key>min</key> + <value>2.4e9</value> + </param> + <param> + <key>max</key> + <value>2.5e9</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(36, 376)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tun_gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>UHD Gain</value> + </param> + <param> + <key>value</key> + <value>gain</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>20</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(177, 377)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <connection> + <source_block_id>uhd_usrp_source_0</source_block_id> + <sink_block_id>wxgui_fftsink2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> +</flow_graph> diff --git a/gr-uhd/examples/grc/uhd_rx_dpsk.grc b/gr-uhd/examples/grc/uhd_rx_dpsk.grc new file mode 100644 index 000000000..73848ff3c --- /dev/null +++ b/gr-uhd/examples/grc/uhd_rx_dpsk.grc @@ -0,0 +1,1431 @@ +<?xml version='1.0' encoding='ASCII'?> +<flow_graph> + <timestamp>Sat Oct 8 15:08:55 2011</timestamp> + <block> + <key>options</key> + <param> + <key>id</key> + <value>uhd_rx_dpsk</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value>UHD RX DPSK</value> + </param> + <param> + <key>author</key> + <value></value> + </param> + <param> + <key>description</key> + <value></value> + </param> + <param> + <key>window_size</key> + <value>1280, 1024</value> + </param> + <param> + <key>generate_options</key> + <value>wx_gui</value> + </param> + <param> + <key>category</key> + <value>Custom</value> + </param> + <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> + <key>realtime_scheduling</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(12, 9)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>samps_per_sym</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>4</value> + </param> + <param> + <key>_coordinate</key> + <value>(12, 88)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>samp_rate</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Sample Rate</value> + </param> + <param> + <key>value</key> + <value>1e6</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>s</value> + </param> + <param> + <key>_coordinate</key> + <value>(339, 11)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>freq</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Default Frequency</value> + </param> + <param> + <key>value</key> + <value>2.45e9</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>f</value> + </param> + <param> + <key>_coordinate</key> + <value>(466, 11)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Default Gain</value> + </param> + <param> + <key>value</key> + <value>0</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>g</value> + </param> + <param> + <key>_coordinate</key> + <value>(624, 14)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>address</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>IP Address</value> + </param> + <param> + <key>value</key> + <value>addr=192.168.10.2</value> + </param> + <param> + <key>type</key> + <value>string</value> + </param> + <param> + <key>short_id</key> + <value>a</value> + </param> + <param> + <key>_coordinate</key> + <value>(186, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>freq_offset</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Rx Frequency Offset</value> + </param> + <param> + <key>value</key> + <value>0</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>o</value> + </param> + <param> + <key>_coordinate</key> + <value>(748, 15)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tun_freq</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Freq (Hz)</value> + </param> + <param> + <key>value</key> + <value>freq</value> + </param> + <param> + <key>min</key> + <value>2.4e9</value> + </param> + <param> + <key>max</key> + <value>2.5e9</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(12, 436)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_null_sink</key> + <param> + <key>id</key> + <value>gr_null_sink_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>byte</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(615, 144)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>timing_bw</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Timing Loop BW</value> + </param> + <param> + <key>value</key> + <value>6.28/100.0</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>1</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(604, 436)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>phase_bw</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Phase Loop BW</value> + </param> + <param> + <key>value</key> + <value>6.28/100.0</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>1.0</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(461, 436)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_constellationsink2</key> + <param> + <key>id</key> + <value>wxgui_constellationsink2_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value>Constellation Plot</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>frame_rate</key> + <value>5</value> + </param> + <param> + <key>const_size</key> + <value>2048</value> + </param> + <param> + <key>M</key> + <value>4</value> + </param> + <param> + <key>theta</key> + <value>0</value> + </param> + <param> + <key>loop_bw</key> + <value>6.28/100.0</value> + </param> + <param> + <key>fmax</key> + <value>0.06</value> + </param> + <param> + <key>mu</key> + <value>0.5</value> + </param> + <param> + <key>gain_mu</key> + <value>0.005</value> + </param> + <param> + <key>symbol_rate</key> + <value>samp_rate/samps_per_sym</value> + </param> + <param> + <key>omega_limit</key> + <value>0.005</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(931, 313)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>wxgui_fftsink2_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>FFT Plot</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>baseband_freq</key> + <value>tun_freq</value> + </param> + <param> + <key>y_per_div</key> + <value>10</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>10</value> + </param> + <param> + <key>ref_scale</key> + <value>2.0</value> + </param> + <param> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>30</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>win</key> + <value>None</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(710, 236)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>digital_dxpsk_demod</key> + <param> + <key>id</key> + <value>digital_dxpsk_demod_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>dqpsk</value> + </param> + <param> + <key>samples_per_symbol</key> + <value>samps_per_sym</value> + </param> + <param> + <key>excess_bw</key> + <value>0.35</value> + </param> + <param> + <key>phase_bw</key> + <value>6.28/100.0</value> + </param> + <param> + <key>timing_bw</key> + <value>6.28/100.0</value> + </param> + <param> + <key>omega_relative_limit</key> + <value>0.005</value> + </param> + <param> + <key>gray_coded</key> + <value>True</value> + </param> + <param> + <key>verbose</key> + <value>False</value> + </param> + <param> + <key>log</key> + <value>False</value> + </param> + <param> + <key>sync_out</key> + <value>False</value> + </param> + <param> + <key>_coordinate</key> + <value>(303, 154)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>rx_freq_off</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>RX Freq Offset (Hz)</value> + </param> + <param> + <key>value</key> + <value>freq_offset</value> + </param> + <param> + <key>min</key> + <value>-100e3</value> + </param> + <param> + <key>max</key> + <value>+100e3</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(149, 437)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tun_gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>UHD Gain</value> + </param> + <param> + <key>value</key> + <value>gain</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>20</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(306, 438)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>uhd_usrp_source</key> + <param> + <key>id</key> + <value>uhd_usrp_source_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>dev_addr</key> + <value>address</value> + </param> + <param> + <key>sync</key> + <value></value> + </param> + <param> + <key>clock_rate</key> + <value>0.0</value> + </param> + <param> + <key>num_mboards</key> + <value>1</value> + </param> + <param> + <key>ref_source0</key> + <value></value> + </param> + <param> + <key>sd_spec0</key> + <value></value> + </param> + <param> + <key>ref_source1</key> + <value></value> + </param> + <param> + <key>sd_spec1</key> + <value></value> + </param> + <param> + <key>ref_source2</key> + <value></value> + </param> + <param> + <key>sd_spec2</key> + <value></value> + </param> + <param> + <key>ref_source3</key> + <value></value> + </param> + <param> + <key>sd_spec3</key> + <value></value> + </param> + <param> + <key>ref_source4</key> + <value></value> + </param> + <param> + <key>sd_spec4</key> + <value></value> + </param> + <param> + <key>ref_source5</key> + <value></value> + </param> + <param> + <key>sd_spec5</key> + <value></value> + </param> + <param> + <key>ref_source6</key> + <value></value> + </param> + <param> + <key>sd_spec6</key> + <value></value> + </param> + <param> + <key>ref_source7</key> + <value></value> + </param> + <param> + <key>sd_spec7</key> + <value></value> + </param> + <param> + <key>nchan</key> + <value>1</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>center_freq0</key> + <value>tun_freq+rx_freq_off</value> + </param> + <param> + <key>gain0</key> + <value>tun_gain</value> + </param> + <param> + <key>ant0</key> + <value></value> + </param> + <param> + <key>bw0</key> + <value>0</value> + </param> + <param> + <key>center_freq1</key> + <value>0</value> + </param> + <param> + <key>gain1</key> + <value>0</value> + </param> + <param> + <key>ant1</key> + <value></value> + </param> + <param> + <key>bw1</key> + <value>0</value> + </param> + <param> + <key>center_freq2</key> + <value>0</value> + </param> + <param> + <key>gain2</key> + <value>0</value> + </param> + <param> + <key>ant2</key> + <value></value> + </param> + <param> + <key>bw2</key> + <value>0</value> + </param> + <param> + <key>center_freq3</key> + <value>0</value> + </param> + <param> + <key>gain3</key> + <value>0</value> + </param> + <param> + <key>ant3</key> + <value></value> + </param> + <param> + <key>bw3</key> + <value>0</value> + </param> + <param> + <key>center_freq4</key> + <value>0</value> + </param> + <param> + <key>gain4</key> + <value>0</value> + </param> + <param> + <key>ant4</key> + <value></value> + </param> + <param> + <key>bw4</key> + <value>0</value> + </param> + <param> + <key>center_freq5</key> + <value>0</value> + </param> + <param> + <key>gain5</key> + <value>0</value> + </param> + <param> + <key>ant5</key> + <value></value> + </param> + <param> + <key>bw5</key> + <value>0</value> + </param> + <param> + <key>center_freq6</key> + <value>0</value> + </param> + <param> + <key>gain6</key> + <value>0</value> + </param> + <param> + <key>ant6</key> + <value></value> + </param> + <param> + <key>bw6</key> + <value>0</value> + </param> + <param> + <key>center_freq7</key> + <value>0</value> + </param> + <param> + <key>gain7</key> + <value>0</value> + </param> + <param> + <key>ant7</key> + <value></value> + </param> + <param> + <key>bw7</key> + <value>0</value> + </param> + <param> + <key>center_freq8</key> + <value>0</value> + </param> + <param> + <key>gain8</key> + <value>0</value> + </param> + <param> + <key>ant8</key> + <value></value> + </param> + <param> + <key>bw8</key> + <value>0</value> + </param> + <param> + <key>center_freq9</key> + <value>0</value> + </param> + <param> + <key>gain9</key> + <value>0</value> + </param> + <param> + <key>ant9</key> + <value></value> + </param> + <param> + <key>bw9</key> + <value>0</value> + </param> + <param> + <key>center_freq10</key> + <value>0</value> + </param> + <param> + <key>gain10</key> + <value>0</value> + </param> + <param> + <key>ant10</key> + <value></value> + </param> + <param> + <key>bw10</key> + <value>0</value> + </param> + <param> + <key>center_freq11</key> + <value>0</value> + </param> + <param> + <key>gain11</key> + <value>0</value> + </param> + <param> + <key>ant11</key> + <value></value> + </param> + <param> + <key>bw11</key> + <value>0</value> + </param> + <param> + <key>center_freq12</key> + <value>0</value> + </param> + <param> + <key>gain12</key> + <value>0</value> + </param> + <param> + <key>ant12</key> + <value></value> + </param> + <param> + <key>bw12</key> + <value>0</value> + </param> + <param> + <key>center_freq13</key> + <value>0</value> + </param> + <param> + <key>gain13</key> + <value>0</value> + </param> + <param> + <key>ant13</key> + <value></value> + </param> + <param> + <key>bw13</key> + <value>0</value> + </param> + <param> + <key>center_freq14</key> + <value>0</value> + </param> + <param> + <key>gain14</key> + <value>0</value> + </param> + <param> + <key>ant14</key> + <value></value> + </param> + <param> + <key>bw14</key> + <value>0</value> + </param> + <param> + <key>center_freq15</key> + <value>0</value> + </param> + <param> + <key>gain15</key> + <value>0</value> + </param> + <param> + <key>ant15</key> + <value></value> + </param> + <param> + <key>bw15</key> + <value>0</value> + </param> + <param> + <key>center_freq16</key> + <value>0</value> + </param> + <param> + <key>gain16</key> + <value>0</value> + </param> + <param> + <key>ant16</key> + <value></value> + </param> + <param> + <key>bw16</key> + <value>0</value> + </param> + <param> + <key>center_freq17</key> + <value>0</value> + </param> + <param> + <key>gain17</key> + <value>0</value> + </param> + <param> + <key>ant17</key> + <value></value> + </param> + <param> + <key>bw17</key> + <value>0</value> + </param> + <param> + <key>center_freq18</key> + <value>0</value> + </param> + <param> + <key>gain18</key> + <value>0</value> + </param> + <param> + <key>ant18</key> + <value></value> + </param> + <param> + <key>bw18</key> + <value>0</value> + </param> + <param> + <key>center_freq19</key> + <value>0</value> + </param> + <param> + <key>gain19</key> + <value>0</value> + </param> + <param> + <key>ant19</key> + <value></value> + </param> + <param> + <key>bw19</key> + <value>0</value> + </param> + <param> + <key>center_freq20</key> + <value>0</value> + </param> + <param> + <key>gain20</key> + <value>0</value> + </param> + <param> + <key>ant20</key> + <value></value> + </param> + <param> + <key>bw20</key> + <value>0</value> + </param> + <param> + <key>center_freq21</key> + <value>0</value> + </param> + <param> + <key>gain21</key> + <value>0</value> + </param> + <param> + <key>ant21</key> + <value></value> + </param> + <param> + <key>bw21</key> + <value>0</value> + </param> + <param> + <key>center_freq22</key> + <value>0</value> + </param> + <param> + <key>gain22</key> + <value>0</value> + </param> + <param> + <key>ant22</key> + <value></value> + </param> + <param> + <key>bw22</key> + <value>0</value> + </param> + <param> + <key>center_freq23</key> + <value>0</value> + </param> + <param> + <key>gain23</key> + <value>0</value> + </param> + <param> + <key>ant23</key> + <value></value> + </param> + <param> + <key>bw23</key> + <value>0</value> + </param> + <param> + <key>center_freq24</key> + <value>0</value> + </param> + <param> + <key>gain24</key> + <value>0</value> + </param> + <param> + <key>ant24</key> + <value></value> + </param> + <param> + <key>bw24</key> + <value>0</value> + </param> + <param> + <key>center_freq25</key> + <value>0</value> + </param> + <param> + <key>gain25</key> + <value>0</value> + </param> + <param> + <key>ant25</key> + <value></value> + </param> + <param> + <key>bw25</key> + <value>0</value> + </param> + <param> + <key>center_freq26</key> + <value>0</value> + </param> + <param> + <key>gain26</key> + <value>0</value> + </param> + <param> + <key>ant26</key> + <value></value> + </param> + <param> + <key>bw26</key> + <value>0</value> + </param> + <param> + <key>center_freq27</key> + <value>0</value> + </param> + <param> + <key>gain27</key> + <value>0</value> + </param> + <param> + <key>ant27</key> + <value></value> + </param> + <param> + <key>bw27</key> + <value>0</value> + </param> + <param> + <key>center_freq28</key> + <value>0</value> + </param> + <param> + <key>gain28</key> + <value>0</value> + </param> + <param> + <key>ant28</key> + <value></value> + </param> + <param> + <key>bw28</key> + <value>0</value> + </param> + <param> + <key>center_freq29</key> + <value>0</value> + </param> + <param> + <key>gain29</key> + <value>0</value> + </param> + <param> + <key>ant29</key> + <value></value> + </param> + <param> + <key>bw29</key> + <value>0</value> + </param> + <param> + <key>center_freq30</key> + <value>0</value> + </param> + <param> + <key>gain30</key> + <value>0</value> + </param> + <param> + <key>ant30</key> + <value></value> + </param> + <param> + <key>bw30</key> + <value>0</value> + </param> + <param> + <key>center_freq31</key> + <value>0</value> + </param> + <param> + <key>gain31</key> + <value>0</value> + </param> + <param> + <key>ant31</key> + <value></value> + </param> + <param> + <key>bw31</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(18, 276)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <connection> + <source_block_id>digital_dxpsk_demod_0</source_block_id> + <sink_block_id>gr_null_sink_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>uhd_usrp_source_0</source_block_id> + <sink_block_id>digital_dxpsk_demod_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>uhd_usrp_source_0</source_block_id> + <sink_block_id>wxgui_constellationsink2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>uhd_usrp_source_0</source_block_id> + <sink_block_id>wxgui_fftsink2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> +</flow_graph> diff --git a/gr-uhd/examples/grc/uhd_two_tone_loopback.grc b/gr-uhd/examples/grc/uhd_two_tone_loopback.grc new file mode 100644 index 000000000..8bcbc0792 --- /dev/null +++ b/gr-uhd/examples/grc/uhd_two_tone_loopback.grc @@ -0,0 +1,2204 @@ +<?xml version='1.0' encoding='ASCII'?> +<flow_graph> + <timestamp>Sat Oct 8 15:27:04 2011</timestamp> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>tx_gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Default TX Gain</value> + </param> + <param> + <key>value</key> + <value>0</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(999, 11)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>freq</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Default Frequency</value> + </param> + <param> + <key>value</key> + <value>2.45e9</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>f</value> + </param> + <param> + <key>_coordinate</key> + <value>(665, 11)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>freq_offset</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Rx Frequency Offset</value> + </param> + <param> + <key>value</key> + <value>0</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>o</value> + </param> + <param> + <key>_coordinate</key> + <value>(820, 11)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>address1</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>IP Address, Dev 1</value> + </param> + <param> + <key>value</key> + <value>addr=192.168.11.2</value> + </param> + <param> + <key>type</key> + <value>string</value> + </param> + <param> + <key>short_id</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(353, 14)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>address0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>IP Address, Dev 0</value> + </param> + <param> + <key>value</key> + <value>addr=192.168.10.2</value> + </param> + <param> + <key>type</key> + <value>string</value> + </param> + <param> + <key>short_id</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(193, 14)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_sig_source_x</key> + <param> + <key>id</key> + <value>gr_sig_source_x</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>waveform</key> + <value>gr.GR_COS_WAVE</value> + </param> + <param> + <key>freq</key> + <value>tone1</value> + </param> + <param> + <key>amp</key> + <value>tone_ampl</value> + </param> + <param> + <key>offset</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(258, 136)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_sig_source_x</key> + <param> + <key>id</key> + <value>gr_sig_source_x0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>waveform</key> + <value>gr.GR_COS_WAVE</value> + </param> + <param> + <key>freq</key> + <value>tone2</value> + </param> + <param> + <key>amp</key> + <value>tone_ampl</value> + </param> + <param> + <key>offset</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(259, 248)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_noise_source_x</key> + <param> + <key>id</key> + <value>gr_noise_source_x</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>noise_type</key> + <value>gr.GR_GAUSSIAN</value> + </param> + <param> + <key>amp</key> + <value>noise_ampl</value> + </param> + <param> + <key>seed</key> + <value>42</value> + </param> + <param> + <key>_coordinate</key> + <value>(279, 364)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>uhd_usrp_sink</key> + <param> + <key>id</key> + <value>uhd_usrp_sink_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>dev_addr</key> + <value>address0</value> + </param> + <param> + <key>sync</key> + <value></value> + </param> + <param> + <key>clock_rate</key> + <value>0.0</value> + </param> + <param> + <key>num_mboards</key> + <value>1</value> + </param> + <param> + <key>ref_source0</key> + <value></value> + </param> + <param> + <key>sd_spec0</key> + <value></value> + </param> + <param> + <key>ref_source1</key> + <value></value> + </param> + <param> + <key>sd_spec1</key> + <value></value> + </param> + <param> + <key>ref_source2</key> + <value></value> + </param> + <param> + <key>sd_spec2</key> + <value></value> + </param> + <param> + <key>ref_source3</key> + <value></value> + </param> + <param> + <key>sd_spec3</key> + <value></value> + </param> + <param> + <key>ref_source4</key> + <value></value> + </param> + <param> + <key>sd_spec4</key> + <value></value> + </param> + <param> + <key>ref_source5</key> + <value></value> + </param> + <param> + <key>sd_spec5</key> + <value></value> + </param> + <param> + <key>ref_source6</key> + <value></value> + </param> + <param> + <key>sd_spec6</key> + <value></value> + </param> + <param> + <key>ref_source7</key> + <value></value> + </param> + <param> + <key>sd_spec7</key> + <value></value> + </param> + <param> + <key>nchan</key> + <value>1</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>center_freq0</key> + <value>tun_freq</value> + </param> + <param> + <key>gain0</key> + <value>tun_rx_gain</value> + </param> + <param> + <key>ant0</key> + <value></value> + </param> + <param> + <key>bw0</key> + <value>0</value> + </param> + <param> + <key>center_freq1</key> + <value>0</value> + </param> + <param> + <key>gain1</key> + <value>0</value> + </param> + <param> + <key>ant1</key> + <value></value> + </param> + <param> + <key>bw1</key> + <value>0</value> + </param> + <param> + <key>center_freq2</key> + <value>0</value> + </param> + <param> + <key>gain2</key> + <value>0</value> + </param> + <param> + <key>ant2</key> + <value></value> + </param> + <param> + <key>bw2</key> + <value>0</value> + </param> + <param> + <key>center_freq3</key> + <value>0</value> + </param> + <param> + <key>gain3</key> + <value>0</value> + </param> + <param> + <key>ant3</key> + <value></value> + </param> + <param> + <key>bw3</key> + <value>0</value> + </param> + <param> + <key>center_freq4</key> + <value>0</value> + </param> + <param> + <key>gain4</key> + <value>0</value> + </param> + <param> + <key>ant4</key> + <value></value> + </param> + <param> + <key>bw4</key> + <value>0</value> + </param> + <param> + <key>center_freq5</key> + <value>0</value> + </param> + <param> + <key>gain5</key> + <value>0</value> + </param> + <param> + <key>ant5</key> + <value></value> + </param> + <param> + <key>bw5</key> + <value>0</value> + </param> + <param> + <key>center_freq6</key> + <value>0</value> + </param> + <param> + <key>gain6</key> + <value>0</value> + </param> + <param> + <key>ant6</key> + <value></value> + </param> + <param> + <key>bw6</key> + <value>0</value> + </param> + <param> + <key>center_freq7</key> + <value>0</value> + </param> + <param> + <key>gain7</key> + <value>0</value> + </param> + <param> + <key>ant7</key> + <value></value> + </param> + <param> + <key>bw7</key> + <value>0</value> + </param> + <param> + <key>center_freq8</key> + <value>0</value> + </param> + <param> + <key>gain8</key> + <value>0</value> + </param> + <param> + <key>ant8</key> + <value></value> + </param> + <param> + <key>bw8</key> + <value>0</value> + </param> + <param> + <key>center_freq9</key> + <value>0</value> + </param> + <param> + <key>gain9</key> + <value>0</value> + </param> + <param> + <key>ant9</key> + <value></value> + </param> + <param> + <key>bw9</key> + <value>0</value> + </param> + <param> + <key>center_freq10</key> + <value>0</value> + </param> + <param> + <key>gain10</key> + <value>0</value> + </param> + <param> + <key>ant10</key> + <value></value> + </param> + <param> + <key>bw10</key> + <value>0</value> + </param> + <param> + <key>center_freq11</key> + <value>0</value> + </param> + <param> + <key>gain11</key> + <value>0</value> + </param> + <param> + <key>ant11</key> + <value></value> + </param> + <param> + <key>bw11</key> + <value>0</value> + </param> + <param> + <key>center_freq12</key> + <value>0</value> + </param> + <param> + <key>gain12</key> + <value>0</value> + </param> + <param> + <key>ant12</key> + <value></value> + </param> + <param> + <key>bw12</key> + <value>0</value> + </param> + <param> + <key>center_freq13</key> + <value>0</value> + </param> + <param> + <key>gain13</key> + <value>0</value> + </param> + <param> + <key>ant13</key> + <value></value> + </param> + <param> + <key>bw13</key> + <value>0</value> + </param> + <param> + <key>center_freq14</key> + <value>0</value> + </param> + <param> + <key>gain14</key> + <value>0</value> + </param> + <param> + <key>ant14</key> + <value></value> + </param> + <param> + <key>bw14</key> + <value>0</value> + </param> + <param> + <key>center_freq15</key> + <value>0</value> + </param> + <param> + <key>gain15</key> + <value>0</value> + </param> + <param> + <key>ant15</key> + <value></value> + </param> + <param> + <key>bw15</key> + <value>0</value> + </param> + <param> + <key>center_freq16</key> + <value>0</value> + </param> + <param> + <key>gain16</key> + <value>0</value> + </param> + <param> + <key>ant16</key> + <value></value> + </param> + <param> + <key>bw16</key> + <value>0</value> + </param> + <param> + <key>center_freq17</key> + <value>0</value> + </param> + <param> + <key>gain17</key> + <value>0</value> + </param> + <param> + <key>ant17</key> + <value></value> + </param> + <param> + <key>bw17</key> + <value>0</value> + </param> + <param> + <key>center_freq18</key> + <value>0</value> + </param> + <param> + <key>gain18</key> + <value>0</value> + </param> + <param> + <key>ant18</key> + <value></value> + </param> + <param> + <key>bw18</key> + <value>0</value> + </param> + <param> + <key>center_freq19</key> + <value>0</value> + </param> + <param> + <key>gain19</key> + <value>0</value> + </param> + <param> + <key>ant19</key> + <value></value> + </param> + <param> + <key>bw19</key> + <value>0</value> + </param> + <param> + <key>center_freq20</key> + <value>0</value> + </param> + <param> + <key>gain20</key> + <value>0</value> + </param> + <param> + <key>ant20</key> + <value></value> + </param> + <param> + <key>bw20</key> + <value>0</value> + </param> + <param> + <key>center_freq21</key> + <value>0</value> + </param> + <param> + <key>gain21</key> + <value>0</value> + </param> + <param> + <key>ant21</key> + <value></value> + </param> + <param> + <key>bw21</key> + <value>0</value> + </param> + <param> + <key>center_freq22</key> + <value>0</value> + </param> + <param> + <key>gain22</key> + <value>0</value> + </param> + <param> + <key>ant22</key> + <value></value> + </param> + <param> + <key>bw22</key> + <value>0</value> + </param> + <param> + <key>center_freq23</key> + <value>0</value> + </param> + <param> + <key>gain23</key> + <value>0</value> + </param> + <param> + <key>ant23</key> + <value></value> + </param> + <param> + <key>bw23</key> + <value>0</value> + </param> + <param> + <key>center_freq24</key> + <value>0</value> + </param> + <param> + <key>gain24</key> + <value>0</value> + </param> + <param> + <key>ant24</key> + <value></value> + </param> + <param> + <key>bw24</key> + <value>0</value> + </param> + <param> + <key>center_freq25</key> + <value>0</value> + </param> + <param> + <key>gain25</key> + <value>0</value> + </param> + <param> + <key>ant25</key> + <value></value> + </param> + <param> + <key>bw25</key> + <value>0</value> + </param> + <param> + <key>center_freq26</key> + <value>0</value> + </param> + <param> + <key>gain26</key> + <value>0</value> + </param> + <param> + <key>ant26</key> + <value></value> + </param> + <param> + <key>bw26</key> + <value>0</value> + </param> + <param> + <key>center_freq27</key> + <value>0</value> + </param> + <param> + <key>gain27</key> + <value>0</value> + </param> + <param> + <key>ant27</key> + <value></value> + </param> + <param> + <key>bw27</key> + <value>0</value> + </param> + <param> + <key>center_freq28</key> + <value>0</value> + </param> + <param> + <key>gain28</key> + <value>0</value> + </param> + <param> + <key>ant28</key> + <value></value> + </param> + <param> + <key>bw28</key> + <value>0</value> + </param> + <param> + <key>center_freq29</key> + <value>0</value> + </param> + <param> + <key>gain29</key> + <value>0</value> + </param> + <param> + <key>ant29</key> + <value></value> + </param> + <param> + <key>bw29</key> + <value>0</value> + </param> + <param> + <key>center_freq30</key> + <value>0</value> + </param> + <param> + <key>gain30</key> + <value>0</value> + </param> + <param> + <key>ant30</key> + <value></value> + </param> + <param> + <key>bw30</key> + <value>0</value> + </param> + <param> + <key>center_freq31</key> + <value>0</value> + </param> + <param> + <key>gain31</key> + <value>0</value> + </param> + <param> + <key>ant31</key> + <value></value> + </param> + <param> + <key>bw31</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(669, 178)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>rx_gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Default RX Gain</value> + </param> + <param> + <key>value</key> + <value>0</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(1139, 12)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tone1</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Tone 1</value> + </param> + <param> + <key>value</key> + <value>50e3</value> + </param> + <param> + <key>min</key> + <value>-samp_rate/2</value> + </param> + <param> + <key>max</key> + <value>samp_rate/2</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value>0, 0, 1, 4</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(161, 484)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tone2</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Tone 2</value> + </param> + <param> + <key>value</key> + <value>75e3</value> + </param> + <param> + <key>min</key> + <value>-samp_rate/2</value> + </param> + <param> + <key>max</key> + <value>samp_rate/2</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value>0, 4, 1, 4</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(308, 483)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tun_tx_gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>UHD TX Gain</value> + </param> + <param> + <key>value</key> + <value>tx_gain</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>20</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(655, 486)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tun_freq</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Freq (Hz)</value> + </param> + <param> + <key>value</key> + <value>freq</value> + </param> + <param> + <key>min</key> + <value>2.4e9</value> + </param> + <param> + <key>max</key> + <value>2.5e9</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(514, 487)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tun_rx_gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>UHD RX Gain</value> + </param> + <param> + <key>value</key> + <value>rx_gain</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>20</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(781, 487)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>uhd_usrp_source</key> + <param> + <key>id</key> + <value>uhd_usrp_source_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>dev_addr</key> + <value>address1</value> + </param> + <param> + <key>sync</key> + <value></value> + </param> + <param> + <key>clock_rate</key> + <value>0.0</value> + </param> + <param> + <key>num_mboards</key> + <value>1</value> + </param> + <param> + <key>ref_source0</key> + <value></value> + </param> + <param> + <key>sd_spec0</key> + <value></value> + </param> + <param> + <key>ref_source1</key> + <value></value> + </param> + <param> + <key>sd_spec1</key> + <value></value> + </param> + <param> + <key>ref_source2</key> + <value></value> + </param> + <param> + <key>sd_spec2</key> + <value></value> + </param> + <param> + <key>ref_source3</key> + <value></value> + </param> + <param> + <key>sd_spec3</key> + <value></value> + </param> + <param> + <key>ref_source4</key> + <value></value> + </param> + <param> + <key>sd_spec4</key> + <value></value> + </param> + <param> + <key>ref_source5</key> + <value></value> + </param> + <param> + <key>sd_spec5</key> + <value></value> + </param> + <param> + <key>ref_source6</key> + <value></value> + </param> + <param> + <key>sd_spec6</key> + <value></value> + </param> + <param> + <key>ref_source7</key> + <value></value> + </param> + <param> + <key>sd_spec7</key> + <value></value> + </param> + <param> + <key>nchan</key> + <value>1</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>center_freq0</key> + <value>tun_freq</value> + </param> + <param> + <key>gain0</key> + <value>tun_rx_gain</value> + </param> + <param> + <key>ant0</key> + <value></value> + </param> + <param> + <key>bw0</key> + <value>0</value> + </param> + <param> + <key>center_freq1</key> + <value>0</value> + </param> + <param> + <key>gain1</key> + <value>0</value> + </param> + <param> + <key>ant1</key> + <value></value> + </param> + <param> + <key>bw1</key> + <value>0</value> + </param> + <param> + <key>center_freq2</key> + <value>0</value> + </param> + <param> + <key>gain2</key> + <value>0</value> + </param> + <param> + <key>ant2</key> + <value></value> + </param> + <param> + <key>bw2</key> + <value>0</value> + </param> + <param> + <key>center_freq3</key> + <value>0</value> + </param> + <param> + <key>gain3</key> + <value>0</value> + </param> + <param> + <key>ant3</key> + <value></value> + </param> + <param> + <key>bw3</key> + <value>0</value> + </param> + <param> + <key>center_freq4</key> + <value>0</value> + </param> + <param> + <key>gain4</key> + <value>0</value> + </param> + <param> + <key>ant4</key> + <value></value> + </param> + <param> + <key>bw4</key> + <value>0</value> + </param> + <param> + <key>center_freq5</key> + <value>0</value> + </param> + <param> + <key>gain5</key> + <value>0</value> + </param> + <param> + <key>ant5</key> + <value></value> + </param> + <param> + <key>bw5</key> + <value>0</value> + </param> + <param> + <key>center_freq6</key> + <value>0</value> + </param> + <param> + <key>gain6</key> + <value>0</value> + </param> + <param> + <key>ant6</key> + <value></value> + </param> + <param> + <key>bw6</key> + <value>0</value> + </param> + <param> + <key>center_freq7</key> + <value>0</value> + </param> + <param> + <key>gain7</key> + <value>0</value> + </param> + <param> + <key>ant7</key> + <value></value> + </param> + <param> + <key>bw7</key> + <value>0</value> + </param> + <param> + <key>center_freq8</key> + <value>0</value> + </param> + <param> + <key>gain8</key> + <value>0</value> + </param> + <param> + <key>ant8</key> + <value></value> + </param> + <param> + <key>bw8</key> + <value>0</value> + </param> + <param> + <key>center_freq9</key> + <value>0</value> + </param> + <param> + <key>gain9</key> + <value>0</value> + </param> + <param> + <key>ant9</key> + <value></value> + </param> + <param> + <key>bw9</key> + <value>0</value> + </param> + <param> + <key>center_freq10</key> + <value>0</value> + </param> + <param> + <key>gain10</key> + <value>0</value> + </param> + <param> + <key>ant10</key> + <value></value> + </param> + <param> + <key>bw10</key> + <value>0</value> + </param> + <param> + <key>center_freq11</key> + <value>0</value> + </param> + <param> + <key>gain11</key> + <value>0</value> + </param> + <param> + <key>ant11</key> + <value></value> + </param> + <param> + <key>bw11</key> + <value>0</value> + </param> + <param> + <key>center_freq12</key> + <value>0</value> + </param> + <param> + <key>gain12</key> + <value>0</value> + </param> + <param> + <key>ant12</key> + <value></value> + </param> + <param> + <key>bw12</key> + <value>0</value> + </param> + <param> + <key>center_freq13</key> + <value>0</value> + </param> + <param> + <key>gain13</key> + <value>0</value> + </param> + <param> + <key>ant13</key> + <value></value> + </param> + <param> + <key>bw13</key> + <value>0</value> + </param> + <param> + <key>center_freq14</key> + <value>0</value> + </param> + <param> + <key>gain14</key> + <value>0</value> + </param> + <param> + <key>ant14</key> + <value></value> + </param> + <param> + <key>bw14</key> + <value>0</value> + </param> + <param> + <key>center_freq15</key> + <value>0</value> + </param> + <param> + <key>gain15</key> + <value>0</value> + </param> + <param> + <key>ant15</key> + <value></value> + </param> + <param> + <key>bw15</key> + <value>0</value> + </param> + <param> + <key>center_freq16</key> + <value>0</value> + </param> + <param> + <key>gain16</key> + <value>0</value> + </param> + <param> + <key>ant16</key> + <value></value> + </param> + <param> + <key>bw16</key> + <value>0</value> + </param> + <param> + <key>center_freq17</key> + <value>0</value> + </param> + <param> + <key>gain17</key> + <value>0</value> + </param> + <param> + <key>ant17</key> + <value></value> + </param> + <param> + <key>bw17</key> + <value>0</value> + </param> + <param> + <key>center_freq18</key> + <value>0</value> + </param> + <param> + <key>gain18</key> + <value>0</value> + </param> + <param> + <key>ant18</key> + <value></value> + </param> + <param> + <key>bw18</key> + <value>0</value> + </param> + <param> + <key>center_freq19</key> + <value>0</value> + </param> + <param> + <key>gain19</key> + <value>0</value> + </param> + <param> + <key>ant19</key> + <value></value> + </param> + <param> + <key>bw19</key> + <value>0</value> + </param> + <param> + <key>center_freq20</key> + <value>0</value> + </param> + <param> + <key>gain20</key> + <value>0</value> + </param> + <param> + <key>ant20</key> + <value></value> + </param> + <param> + <key>bw20</key> + <value>0</value> + </param> + <param> + <key>center_freq21</key> + <value>0</value> + </param> + <param> + <key>gain21</key> + <value>0</value> + </param> + <param> + <key>ant21</key> + <value></value> + </param> + <param> + <key>bw21</key> + <value>0</value> + </param> + <param> + <key>center_freq22</key> + <value>0</value> + </param> + <param> + <key>gain22</key> + <value>0</value> + </param> + <param> + <key>ant22</key> + <value></value> + </param> + <param> + <key>bw22</key> + <value>0</value> + </param> + <param> + <key>center_freq23</key> + <value>0</value> + </param> + <param> + <key>gain23</key> + <value>0</value> + </param> + <param> + <key>ant23</key> + <value></value> + </param> + <param> + <key>bw23</key> + <value>0</value> + </param> + <param> + <key>center_freq24</key> + <value>0</value> + </param> + <param> + <key>gain24</key> + <value>0</value> + </param> + <param> + <key>ant24</key> + <value></value> + </param> + <param> + <key>bw24</key> + <value>0</value> + </param> + <param> + <key>center_freq25</key> + <value>0</value> + </param> + <param> + <key>gain25</key> + <value>0</value> + </param> + <param> + <key>ant25</key> + <value></value> + </param> + <param> + <key>bw25</key> + <value>0</value> + </param> + <param> + <key>center_freq26</key> + <value>0</value> + </param> + <param> + <key>gain26</key> + <value>0</value> + </param> + <param> + <key>ant26</key> + <value></value> + </param> + <param> + <key>bw26</key> + <value>0</value> + </param> + <param> + <key>center_freq27</key> + <value>0</value> + </param> + <param> + <key>gain27</key> + <value>0</value> + </param> + <param> + <key>ant27</key> + <value></value> + </param> + <param> + <key>bw27</key> + <value>0</value> + </param> + <param> + <key>center_freq28</key> + <value>0</value> + </param> + <param> + <key>gain28</key> + <value>0</value> + </param> + <param> + <key>ant28</key> + <value></value> + </param> + <param> + <key>bw28</key> + <value>0</value> + </param> + <param> + <key>center_freq29</key> + <value>0</value> + </param> + <param> + <key>gain29</key> + <value>0</value> + </param> + <param> + <key>ant29</key> + <value></value> + </param> + <param> + <key>bw29</key> + <value>0</value> + </param> + <param> + <key>center_freq30</key> + <value>0</value> + </param> + <param> + <key>gain30</key> + <value>0</value> + </param> + <param> + <key>ant30</key> + <value></value> + </param> + <param> + <key>bw30</key> + <value>0</value> + </param> + <param> + <key>center_freq31</key> + <value>0</value> + </param> + <param> + <key>gain31</key> + <value>0</value> + </param> + <param> + <key>ant31</key> + <value></value> + </param> + <param> + <key>bw31</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(672, 320)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tone_ampl</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Tone Ampl</value> + </param> + <param> + <key>value</key> + <value>0.15</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>1</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_VERTICAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value>1, 0, 2, 1</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(14, 485)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>noise_ampl</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Noise Ampl</value> + </param> + <param> + <key>value</key> + <value>0.1</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>1</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_VERTICAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value>1, 1, 2, 1</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(15, 335)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_add_xx</key> + <param> + <key>id</key> + <value>gr_add_xx</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>num_inputs</key> + <value>3</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(529, 172)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>options</key> + <param> + <key>id</key> + <value>uhd_two_tone_loopback</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value>UHD Loopback - 2 Tone</value> + </param> + <param> + <key>author</key> + <value>Example</value> + </param> + <param> + <key>description</key> + <value>Loopback test</value> + </param> + <param> + <key>window_size</key> + <value>1280, 1024</value> + </param> + <param> + <key>generate_options</key> + <value>wx_gui</value> + </param> + <param> + <key>category</key> + <value>Custom</value> + </param> + <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> + <key>realtime_scheduling</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(10, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>wxgui_fftsink2</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>FFT Plot</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>baseband_freq</key> + <value>0</value> + </param> + <param> + <key>y_per_div</key> + <value>10</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>0</value> + </param> + <param> + <key>ref_scale</key> + <value>2.0</value> + </param> + <param> + <key>fft_size</key> + <value>512*2</value> + </param> + <param> + <key>fft_rate</key> + <value>15</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>win</key> + <value>window.blackmanharris</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>1, 2, 2, 4</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(1114, 264)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>samp_rate</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Sample Rate</value> + </param> + <param> + <key>value</key> + <value>500e3</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>s</value> + </param> + <param> + <key>_coordinate</key> + <value>(539, 11)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <connection> + <source_block_id>gr_noise_source_x</source_block_id> + <sink_block_id>gr_add_xx</sink_block_id> + <source_key>0</source_key> + <sink_key>2</sink_key> + </connection> + <connection> + <source_block_id>gr_sig_source_x0</source_block_id> + <sink_block_id>gr_add_xx</sink_block_id> + <source_key>0</source_key> + <sink_key>1</sink_key> + </connection> + <connection> + <source_block_id>gr_sig_source_x</source_block_id> + <sink_block_id>gr_add_xx</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_add_xx</source_block_id> + <sink_block_id>uhd_usrp_sink_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>uhd_usrp_source_0</source_block_id> + <sink_block_id>wxgui_fftsink2</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> +</flow_graph> diff --git a/gr-uhd/examples/grc/uhd_tx_dpsk.grc b/gr-uhd/examples/grc/uhd_tx_dpsk.grc new file mode 100644 index 000000000..281ba8429 --- /dev/null +++ b/gr-uhd/examples/grc/uhd_tx_dpsk.grc @@ -0,0 +1,1234 @@ +<?xml version='1.0' encoding='ASCII'?> +<flow_graph> + <timestamp>Sat Oct 8 14:55:39 2011</timestamp> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>samps_per_sym</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>4</value> + </param> + <param> + <key>_coordinate</key> + <value>(10, 100)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>ampl</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Amplitude</value> + </param> + <param> + <key>value</key> + <value>.1</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>1</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(7, 299)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>samp_rate</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Sample Rate</value> + </param> + <param> + <key>value</key> + <value>1e6</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>s</value> + </param> + <param> + <key>_coordinate</key> + <value>(334, 15)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>freq</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Default Frequency</value> + </param> + <param> + <key>value</key> + <value>2.45e9</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>f</value> + </param> + <param> + <key>_coordinate</key> + <value>(463, 17)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tun_gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>UHD Gain</value> + </param> + <param> + <key>value</key> + <value>gain</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>20</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(151, 441)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tun_freq</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Freq (Hz)</value> + </param> + <param> + <key>value</key> + <value>freq</value> + </param> + <param> + <key>min</key> + <value>2.4e9</value> + </param> + <param> + <key>max</key> + <value>2.5e9</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(7, 441)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>random_source_x</key> + <param> + <key>id</key> + <value>random_source_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>byte</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>2**8</value> + </param> + <param> + <key>num_samps</key> + <value>1000</value> + </param> + <param> + <key>repeat</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(177, 162)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>digital_dxpsk_mod</key> + <param> + <key>id</key> + <value>digital_dxpsk_mod_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>dqpsk</value> + </param> + <param> + <key>samples_per_symbol</key> + <value>samps_per_sym</value> + </param> + <param> + <key>excess_bw</key> + <value>0.35</value> + </param> + <param> + <key>gray_coded</key> + <value>True</value> + </param> + <param> + <key>verbose</key> + <value>False</value> + </param> + <param> + <key>log</key> + <value>False</value> + </param> + <param> + <key>_coordinate</key> + <value>(366, 162)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Default Gain</value> + </param> + <param> + <key>value</key> + <value>0</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>g</value> + </param> + <param> + <key>_coordinate</key> + <value>(619, 15)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>address</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>IP Address</value> + </param> + <param> + <key>value</key> + <value>addr=192.168.10.2</value> + </param> + <param> + <key>type</key> + <value>string</value> + </param> + <param> + <key>short_id</key> + <value>a</value> + </param> + <param> + <key>_coordinate</key> + <value>(177, 14)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>uhd_usrp_sink</key> + <param> + <key>id</key> + <value>uhd_usrp_sink_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>dev_addr</key> + <value>address</value> + </param> + <param> + <key>sync</key> + <value></value> + </param> + <param> + <key>clock_rate</key> + <value>0.0</value> + </param> + <param> + <key>num_mboards</key> + <value>1</value> + </param> + <param> + <key>ref_source0</key> + <value></value> + </param> + <param> + <key>sd_spec0</key> + <value></value> + </param> + <param> + <key>ref_source1</key> + <value></value> + </param> + <param> + <key>sd_spec1</key> + <value></value> + </param> + <param> + <key>ref_source2</key> + <value></value> + </param> + <param> + <key>sd_spec2</key> + <value></value> + </param> + <param> + <key>ref_source3</key> + <value></value> + </param> + <param> + <key>sd_spec3</key> + <value></value> + </param> + <param> + <key>ref_source4</key> + <value></value> + </param> + <param> + <key>sd_spec4</key> + <value></value> + </param> + <param> + <key>ref_source5</key> + <value></value> + </param> + <param> + <key>sd_spec5</key> + <value></value> + </param> + <param> + <key>ref_source6</key> + <value></value> + </param> + <param> + <key>sd_spec6</key> + <value></value> + </param> + <param> + <key>ref_source7</key> + <value></value> + </param> + <param> + <key>sd_spec7</key> + <value></value> + </param> + <param> + <key>nchan</key> + <value>1</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>center_freq0</key> + <value>tun_freq</value> + </param> + <param> + <key>gain0</key> + <value>tun_gain</value> + </param> + <param> + <key>ant0</key> + <value></value> + </param> + <param> + <key>bw0</key> + <value>0</value> + </param> + <param> + <key>center_freq1</key> + <value>0</value> + </param> + <param> + <key>gain1</key> + <value>0</value> + </param> + <param> + <key>ant1</key> + <value></value> + </param> + <param> + <key>bw1</key> + <value>0</value> + </param> + <param> + <key>center_freq2</key> + <value>0</value> + </param> + <param> + <key>gain2</key> + <value>0</value> + </param> + <param> + <key>ant2</key> + <value></value> + </param> + <param> + <key>bw2</key> + <value>0</value> + </param> + <param> + <key>center_freq3</key> + <value>0</value> + </param> + <param> + <key>gain3</key> + <value>0</value> + </param> + <param> + <key>ant3</key> + <value></value> + </param> + <param> + <key>bw3</key> + <value>0</value> + </param> + <param> + <key>center_freq4</key> + <value>0</value> + </param> + <param> + <key>gain4</key> + <value>0</value> + </param> + <param> + <key>ant4</key> + <value></value> + </param> + <param> + <key>bw4</key> + <value>0</value> + </param> + <param> + <key>center_freq5</key> + <value>0</value> + </param> + <param> + <key>gain5</key> + <value>0</value> + </param> + <param> + <key>ant5</key> + <value></value> + </param> + <param> + <key>bw5</key> + <value>0</value> + </param> + <param> + <key>center_freq6</key> + <value>0</value> + </param> + <param> + <key>gain6</key> + <value>0</value> + </param> + <param> + <key>ant6</key> + <value></value> + </param> + <param> + <key>bw6</key> + <value>0</value> + </param> + <param> + <key>center_freq7</key> + <value>0</value> + </param> + <param> + <key>gain7</key> + <value>0</value> + </param> + <param> + <key>ant7</key> + <value></value> + </param> + <param> + <key>bw7</key> + <value>0</value> + </param> + <param> + <key>center_freq8</key> + <value>0</value> + </param> + <param> + <key>gain8</key> + <value>0</value> + </param> + <param> + <key>ant8</key> + <value></value> + </param> + <param> + <key>bw8</key> + <value>0</value> + </param> + <param> + <key>center_freq9</key> + <value>0</value> + </param> + <param> + <key>gain9</key> + <value>0</value> + </param> + <param> + <key>ant9</key> + <value></value> + </param> + <param> + <key>bw9</key> + <value>0</value> + </param> + <param> + <key>center_freq10</key> + <value>0</value> + </param> + <param> + <key>gain10</key> + <value>0</value> + </param> + <param> + <key>ant10</key> + <value></value> + </param> + <param> + <key>bw10</key> + <value>0</value> + </param> + <param> + <key>center_freq11</key> + <value>0</value> + </param> + <param> + <key>gain11</key> + <value>0</value> + </param> + <param> + <key>ant11</key> + <value></value> + </param> + <param> + <key>bw11</key> + <value>0</value> + </param> + <param> + <key>center_freq12</key> + <value>0</value> + </param> + <param> + <key>gain12</key> + <value>0</value> + </param> + <param> + <key>ant12</key> + <value></value> + </param> + <param> + <key>bw12</key> + <value>0</value> + </param> + <param> + <key>center_freq13</key> + <value>0</value> + </param> + <param> + <key>gain13</key> + <value>0</value> + </param> + <param> + <key>ant13</key> + <value></value> + </param> + <param> + <key>bw13</key> + <value>0</value> + </param> + <param> + <key>center_freq14</key> + <value>0</value> + </param> + <param> + <key>gain14</key> + <value>0</value> + </param> + <param> + <key>ant14</key> + <value></value> + </param> + <param> + <key>bw14</key> + <value>0</value> + </param> + <param> + <key>center_freq15</key> + <value>0</value> + </param> + <param> + <key>gain15</key> + <value>0</value> + </param> + <param> + <key>ant15</key> + <value></value> + </param> + <param> + <key>bw15</key> + <value>0</value> + </param> + <param> + <key>center_freq16</key> + <value>0</value> + </param> + <param> + <key>gain16</key> + <value>0</value> + </param> + <param> + <key>ant16</key> + <value></value> + </param> + <param> + <key>bw16</key> + <value>0</value> + </param> + <param> + <key>center_freq17</key> + <value>0</value> + </param> + <param> + <key>gain17</key> + <value>0</value> + </param> + <param> + <key>ant17</key> + <value></value> + </param> + <param> + <key>bw17</key> + <value>0</value> + </param> + <param> + <key>center_freq18</key> + <value>0</value> + </param> + <param> + <key>gain18</key> + <value>0</value> + </param> + <param> + <key>ant18</key> + <value></value> + </param> + <param> + <key>bw18</key> + <value>0</value> + </param> + <param> + <key>center_freq19</key> + <value>0</value> + </param> + <param> + <key>gain19</key> + <value>0</value> + </param> + <param> + <key>ant19</key> + <value></value> + </param> + <param> + <key>bw19</key> + <value>0</value> + </param> + <param> + <key>center_freq20</key> + <value>0</value> + </param> + <param> + <key>gain20</key> + <value>0</value> + </param> + <param> + <key>ant20</key> + <value></value> + </param> + <param> + <key>bw20</key> + <value>0</value> + </param> + <param> + <key>center_freq21</key> + <value>0</value> + </param> + <param> + <key>gain21</key> + <value>0</value> + </param> + <param> + <key>ant21</key> + <value></value> + </param> + <param> + <key>bw21</key> + <value>0</value> + </param> + <param> + <key>center_freq22</key> + <value>0</value> + </param> + <param> + <key>gain22</key> + <value>0</value> + </param> + <param> + <key>ant22</key> + <value></value> + </param> + <param> + <key>bw22</key> + <value>0</value> + </param> + <param> + <key>center_freq23</key> + <value>0</value> + </param> + <param> + <key>gain23</key> + <value>0</value> + </param> + <param> + <key>ant23</key> + <value></value> + </param> + <param> + <key>bw23</key> + <value>0</value> + </param> + <param> + <key>center_freq24</key> + <value>0</value> + </param> + <param> + <key>gain24</key> + <value>0</value> + </param> + <param> + <key>ant24</key> + <value></value> + </param> + <param> + <key>bw24</key> + <value>0</value> + </param> + <param> + <key>center_freq25</key> + <value>0</value> + </param> + <param> + <key>gain25</key> + <value>0</value> + </param> + <param> + <key>ant25</key> + <value></value> + </param> + <param> + <key>bw25</key> + <value>0</value> + </param> + <param> + <key>center_freq26</key> + <value>0</value> + </param> + <param> + <key>gain26</key> + <value>0</value> + </param> + <param> + <key>ant26</key> + <value></value> + </param> + <param> + <key>bw26</key> + <value>0</value> + </param> + <param> + <key>center_freq27</key> + <value>0</value> + </param> + <param> + <key>gain27</key> + <value>0</value> + </param> + <param> + <key>ant27</key> + <value></value> + </param> + <param> + <key>bw27</key> + <value>0</value> + </param> + <param> + <key>center_freq28</key> + <value>0</value> + </param> + <param> + <key>gain28</key> + <value>0</value> + </param> + <param> + <key>ant28</key> + <value></value> + </param> + <param> + <key>bw28</key> + <value>0</value> + </param> + <param> + <key>center_freq29</key> + <value>0</value> + </param> + <param> + <key>gain29</key> + <value>0</value> + </param> + <param> + <key>ant29</key> + <value></value> + </param> + <param> + <key>bw29</key> + <value>0</value> + </param> + <param> + <key>center_freq30</key> + <value>0</value> + </param> + <param> + <key>gain30</key> + <value>0</value> + </param> + <param> + <key>ant30</key> + <value></value> + </param> + <param> + <key>bw30</key> + <value>0</value> + </param> + <param> + <key>center_freq31</key> + <value>0</value> + </param> + <param> + <key>gain31</key> + <value>0</value> + </param> + <param> + <key>ant31</key> + <value></value> + </param> + <param> + <key>bw31</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(783, 162)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_multiply_const_vxx</key> + <param> + <key>id</key> + <value>gr_multiply_const_vxx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>const</key> + <value>ampl</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(566, 186)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>wxgui_fftsink2_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>Transmit Spectrum</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>baseband_freq</key> + <value>tun_freq</value> + </param> + <param> + <key>y_per_div</key> + <value>10</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>0</value> + </param> + <param> + <key>ref_scale</key> + <value>2</value> + </param> + <param> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>20</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>win</key> + <value>None</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(827, 299)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>options</key> + <param> + <key>id</key> + <value>uhd_tx_dpsk</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value>UHD TX DPSK</value> + </param> + <param> + <key>author</key> + <value></value> + </param> + <param> + <key>description</key> + <value></value> + </param> + <param> + <key>window_size</key> + <value>1280, 1024</value> + </param> + <param> + <key>generate_options</key> + <value>wx_gui</value> + </param> + <param> + <key>category</key> + <value>Custom</value> + </param> + <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> + <key>realtime_scheduling</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(10, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <connection> + <source_block_id>random_source_x_0</source_block_id> + <sink_block_id>digital_dxpsk_mod_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_multiply_const_vxx_0</source_block_id> + <sink_block_id>wxgui_fftsink2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_multiply_const_vxx_0</source_block_id> + <sink_block_id>uhd_usrp_sink_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>digital_dxpsk_mod_0</source_block_id> + <sink_block_id>gr_multiply_const_vxx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> +</flow_graph> diff --git a/gr-uhd/examples/grc/uhd_wbfm_receive.grc b/gr-uhd/examples/grc/uhd_wbfm_receive.grc new file mode 100644 index 000000000..62658a2eb --- /dev/null +++ b/gr-uhd/examples/grc/uhd_wbfm_receive.grc @@ -0,0 +1,1365 @@ +<?xml version='1.0' encoding='ASCII'?> +<flow_graph> + <timestamp>Sat Oct 8 15:18:49 2011</timestamp> + <block> + <key>options</key> + <param> + <key>id</key> + <value>uhd_wbfm_receive</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value>UHD WBFM Receive</value> + </param> + <param> + <key>author</key> + <value>Example</value> + </param> + <param> + <key>description</key> + <value>WBFM Receive</value> + </param> + <param> + <key>window_size</key> + <value>1280, 1024</value> + </param> + <param> + <key>generate_options</key> + <value>wx_gui</value> + </param> + <param> + <key>category</key> + <value>Custom</value> + </param> + <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> + <key>realtime_scheduling</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(10, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Default Gain</value> + </param> + <param> + <key>value</key> + <value>0</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>g</value> + </param> + <param> + <key>_coordinate</key> + <value>(631, 15)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>freq</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Default Frequency</value> + </param> + <param> + <key>value</key> + <value>93.3e6</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>f</value> + </param> + <param> + <key>_coordinate</key> + <value>(479, 15)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tun_freq</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Freq (Hz)</value> + </param> + <param> + <key>value</key> + <value>freq</value> + </param> + <param> + <key>min</key> + <value>87.9e6</value> + </param> + <param> + <key>max</key> + <value>108.1e6</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(15, 441)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>fine</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Fine Freq (MHz)</value> + </param> + <param> + <key>value</key> + <value>0</value> + </param> + <param> + <key>min</key> + <value>-.1</value> + </param> + <param> + <key>max</key> + <value>.1</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value>0, 2, 1, 2</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(277, 444)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>tun_gain</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>UHD Gain</value> + </param> + <param> + <key>value</key> + <value>gain</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>20</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(158, 440)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>volume</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Volume</value> + </param> + <param> + <key>value</key> + <value>1</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>10</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value>1, 0, 1, 4</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(436, 446)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_multiply_const_vxx</key> + <param> + <key>id</key> + <value>gr_multiply_const_vxx</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>const</key> + <value>volume</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(836, 161)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>uhd_usrp_source</key> + <param> + <key>id</key> + <value>uhd_usrp_source_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>dev_addr</key> + <value>address</value> + </param> + <param> + <key>sync</key> + <value></value> + </param> + <param> + <key>clock_rate</key> + <value>0.0</value> + </param> + <param> + <key>num_mboards</key> + <value>1</value> + </param> + <param> + <key>ref_source0</key> + <value></value> + </param> + <param> + <key>sd_spec0</key> + <value></value> + </param> + <param> + <key>ref_source1</key> + <value></value> + </param> + <param> + <key>sd_spec1</key> + <value></value> + </param> + <param> + <key>ref_source2</key> + <value></value> + </param> + <param> + <key>sd_spec2</key> + <value></value> + </param> + <param> + <key>ref_source3</key> + <value></value> + </param> + <param> + <key>sd_spec3</key> + <value></value> + </param> + <param> + <key>ref_source4</key> + <value></value> + </param> + <param> + <key>sd_spec4</key> + <value></value> + </param> + <param> + <key>ref_source5</key> + <value></value> + </param> + <param> + <key>sd_spec5</key> + <value></value> + </param> + <param> + <key>ref_source6</key> + <value></value> + </param> + <param> + <key>sd_spec6</key> + <value></value> + </param> + <param> + <key>ref_source7</key> + <value></value> + </param> + <param> + <key>sd_spec7</key> + <value></value> + </param> + <param> + <key>nchan</key> + <value>1</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>center_freq0</key> + <value>tun_freq+fine</value> + </param> + <param> + <key>gain0</key> + <value>tun_gain</value> + </param> + <param> + <key>ant0</key> + <value></value> + </param> + <param> + <key>bw0</key> + <value>0</value> + </param> + <param> + <key>center_freq1</key> + <value>0</value> + </param> + <param> + <key>gain1</key> + <value>0</value> + </param> + <param> + <key>ant1</key> + <value></value> + </param> + <param> + <key>bw1</key> + <value>0</value> + </param> + <param> + <key>center_freq2</key> + <value>0</value> + </param> + <param> + <key>gain2</key> + <value>0</value> + </param> + <param> + <key>ant2</key> + <value></value> + </param> + <param> + <key>bw2</key> + <value>0</value> + </param> + <param> + <key>center_freq3</key> + <value>0</value> + </param> + <param> + <key>gain3</key> + <value>0</value> + </param> + <param> + <key>ant3</key> + <value></value> + </param> + <param> + <key>bw3</key> + <value>0</value> + </param> + <param> + <key>center_freq4</key> + <value>0</value> + </param> + <param> + <key>gain4</key> + <value>0</value> + </param> + <param> + <key>ant4</key> + <value></value> + </param> + <param> + <key>bw4</key> + <value>0</value> + </param> + <param> + <key>center_freq5</key> + <value>0</value> + </param> + <param> + <key>gain5</key> + <value>0</value> + </param> + <param> + <key>ant5</key> + <value></value> + </param> + <param> + <key>bw5</key> + <value>0</value> + </param> + <param> + <key>center_freq6</key> + <value>0</value> + </param> + <param> + <key>gain6</key> + <value>0</value> + </param> + <param> + <key>ant6</key> + <value></value> + </param> + <param> + <key>bw6</key> + <value>0</value> + </param> + <param> + <key>center_freq7</key> + <value>0</value> + </param> + <param> + <key>gain7</key> + <value>0</value> + </param> + <param> + <key>ant7</key> + <value></value> + </param> + <param> + <key>bw7</key> + <value>0</value> + </param> + <param> + <key>center_freq8</key> + <value>0</value> + </param> + <param> + <key>gain8</key> + <value>0</value> + </param> + <param> + <key>ant8</key> + <value></value> + </param> + <param> + <key>bw8</key> + <value>0</value> + </param> + <param> + <key>center_freq9</key> + <value>0</value> + </param> + <param> + <key>gain9</key> + <value>0</value> + </param> + <param> + <key>ant9</key> + <value></value> + </param> + <param> + <key>bw9</key> + <value>0</value> + </param> + <param> + <key>center_freq10</key> + <value>0</value> + </param> + <param> + <key>gain10</key> + <value>0</value> + </param> + <param> + <key>ant10</key> + <value></value> + </param> + <param> + <key>bw10</key> + <value>0</value> + </param> + <param> + <key>center_freq11</key> + <value>0</value> + </param> + <param> + <key>gain11</key> + <value>0</value> + </param> + <param> + <key>ant11</key> + <value></value> + </param> + <param> + <key>bw11</key> + <value>0</value> + </param> + <param> + <key>center_freq12</key> + <value>0</value> + </param> + <param> + <key>gain12</key> + <value>0</value> + </param> + <param> + <key>ant12</key> + <value></value> + </param> + <param> + <key>bw12</key> + <value>0</value> + </param> + <param> + <key>center_freq13</key> + <value>0</value> + </param> + <param> + <key>gain13</key> + <value>0</value> + </param> + <param> + <key>ant13</key> + <value></value> + </param> + <param> + <key>bw13</key> + <value>0</value> + </param> + <param> + <key>center_freq14</key> + <value>0</value> + </param> + <param> + <key>gain14</key> + <value>0</value> + </param> + <param> + <key>ant14</key> + <value></value> + </param> + <param> + <key>bw14</key> + <value>0</value> + </param> + <param> + <key>center_freq15</key> + <value>0</value> + </param> + <param> + <key>gain15</key> + <value>0</value> + </param> + <param> + <key>ant15</key> + <value></value> + </param> + <param> + <key>bw15</key> + <value>0</value> + </param> + <param> + <key>center_freq16</key> + <value>0</value> + </param> + <param> + <key>gain16</key> + <value>0</value> + </param> + <param> + <key>ant16</key> + <value></value> + </param> + <param> + <key>bw16</key> + <value>0</value> + </param> + <param> + <key>center_freq17</key> + <value>0</value> + </param> + <param> + <key>gain17</key> + <value>0</value> + </param> + <param> + <key>ant17</key> + <value></value> + </param> + <param> + <key>bw17</key> + <value>0</value> + </param> + <param> + <key>center_freq18</key> + <value>0</value> + </param> + <param> + <key>gain18</key> + <value>0</value> + </param> + <param> + <key>ant18</key> + <value></value> + </param> + <param> + <key>bw18</key> + <value>0</value> + </param> + <param> + <key>center_freq19</key> + <value>0</value> + </param> + <param> + <key>gain19</key> + <value>0</value> + </param> + <param> + <key>ant19</key> + <value></value> + </param> + <param> + <key>bw19</key> + <value>0</value> + </param> + <param> + <key>center_freq20</key> + <value>0</value> + </param> + <param> + <key>gain20</key> + <value>0</value> + </param> + <param> + <key>ant20</key> + <value></value> + </param> + <param> + <key>bw20</key> + <value>0</value> + </param> + <param> + <key>center_freq21</key> + <value>0</value> + </param> + <param> + <key>gain21</key> + <value>0</value> + </param> + <param> + <key>ant21</key> + <value></value> + </param> + <param> + <key>bw21</key> + <value>0</value> + </param> + <param> + <key>center_freq22</key> + <value>0</value> + </param> + <param> + <key>gain22</key> + <value>0</value> + </param> + <param> + <key>ant22</key> + <value></value> + </param> + <param> + <key>bw22</key> + <value>0</value> + </param> + <param> + <key>center_freq23</key> + <value>0</value> + </param> + <param> + <key>gain23</key> + <value>0</value> + </param> + <param> + <key>ant23</key> + <value></value> + </param> + <param> + <key>bw23</key> + <value>0</value> + </param> + <param> + <key>center_freq24</key> + <value>0</value> + </param> + <param> + <key>gain24</key> + <value>0</value> + </param> + <param> + <key>ant24</key> + <value></value> + </param> + <param> + <key>bw24</key> + <value>0</value> + </param> + <param> + <key>center_freq25</key> + <value>0</value> + </param> + <param> + <key>gain25</key> + <value>0</value> + </param> + <param> + <key>ant25</key> + <value></value> + </param> + <param> + <key>bw25</key> + <value>0</value> + </param> + <param> + <key>center_freq26</key> + <value>0</value> + </param> + <param> + <key>gain26</key> + <value>0</value> + </param> + <param> + <key>ant26</key> + <value></value> + </param> + <param> + <key>bw26</key> + <value>0</value> + </param> + <param> + <key>center_freq27</key> + <value>0</value> + </param> + <param> + <key>gain27</key> + <value>0</value> + </param> + <param> + <key>ant27</key> + <value></value> + </param> + <param> + <key>bw27</key> + <value>0</value> + </param> + <param> + <key>center_freq28</key> + <value>0</value> + </param> + <param> + <key>gain28</key> + <value>0</value> + </param> + <param> + <key>ant28</key> + <value></value> + </param> + <param> + <key>bw28</key> + <value>0</value> + </param> + <param> + <key>center_freq29</key> + <value>0</value> + </param> + <param> + <key>gain29</key> + <value>0</value> + </param> + <param> + <key>ant29</key> + <value></value> + </param> + <param> + <key>bw29</key> + <value>0</value> + </param> + <param> + <key>center_freq30</key> + <value>0</value> + </param> + <param> + <key>gain30</key> + <value>0</value> + </param> + <param> + <key>ant30</key> + <value></value> + </param> + <param> + <key>bw30</key> + <value>0</value> + </param> + <param> + <key>center_freq31</key> + <value>0</value> + </param> + <param> + <key>gain31</key> + <value>0</value> + </param> + <param> + <key>ant31</key> + <value></value> + </param> + <param> + <key>bw31</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(14, 165)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>address</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>IP Address</value> + </param> + <param> + <key>value</key> + <value>addr=192.168.10.2</value> + </param> + <param> + <key>type</key> + <value>string</value> + </param> + <param> + <key>short_id</key> + <value>a</value> + </param> + <param> + <key>_coordinate</key> + <value>(199, 14)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>wxgui_fftsink2</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>FFT Plot</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>baseband_freq</key> + <value>(freq+fine)*1e6</value> + </param> + <param> + <key>y_per_div</key> + <value>10</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>0</value> + </param> + <param> + <key>ref_scale</key> + <value>2.0</value> + </param> + <param> + <key>fft_size</key> + <value>512</value> + </param> + <param> + <key>fft_rate</key> + <value>15</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>win</key> + <value>None</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>2, 0, 2, 4</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(624, 278)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>samp_rate</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Sample Rate</value> + </param> + <param> + <key>value</key> + <value>400e3</value> + </param> + <param> + <key>type</key> + <value>eng_float</value> + </param> + <param> + <key>short_id</key> + <value>s</value> + </param> + <param> + <key>_coordinate</key> + <value>(352, 15)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>audio_output</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Audio Output Device</value> + </param> + <param> + <key>value</key> + <value></value> + </param> + <param> + <key>type</key> + <value>string</value> + </param> + <param> + <key>short_id</key> + <value>O</value> + </param> + <param> + <key>_coordinate</key> + <value>(769, 13)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>audio_sink</key> + <param> + <key>id</key> + <value>audio_sink</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>samp_rate</key> + <value>int(samp_rate/audio_decim)</value> + </param> + <param> + <key>device_name</key> + <value>audio_output</value> + </param> + <param> + <key>ok_to_block</key> + <value>True</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(1023, 161)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>blks2_wfm_rcv</key> + <param> + <key>id</key> + <value>blks2_wfm_rcv</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>quad_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>audio_decimation</key> + <value>audio_decim</value> + </param> + <param> + <key>_coordinate</key> + <value>(626, 153)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>low_pass_filter</key> + <param> + <key>id</key> + <value>low_pass_filter_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>fir_filter_ccf</value> + </param> + <param> + <key>decim</key> + <value>1</value> + </param> + <param> + <key>interp</key> + <value>1</value> + </param> + <param> + <key>gain</key> + <value>1</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>cutoff_freq</key> + <value>115e3</value> + </param> + <param> + <key>width</key> + <value>30e3</value> + </param> + <param> + <key>win</key> + <value>firdes.WIN_HANN</value> + </param> + <param> + <key>beta</key> + <value>6.76</value> + </param> + <param> + <key>_coordinate</key> + <value>(326, 141)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>audio_decim</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>10</value> + </param> + <param> + <key>_coordinate</key> + <value>(19, 351)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <connection> + <source_block_id>gr_multiply_const_vxx</source_block_id> + <sink_block_id>audio_sink</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>blks2_wfm_rcv</source_block_id> + <sink_block_id>gr_multiply_const_vxx</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>low_pass_filter_0</source_block_id> + <sink_block_id>blks2_wfm_rcv</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>uhd_usrp_source_0</source_block_id> + <sink_block_id>low_pass_filter_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>low_pass_filter_0</source_block_id> + <sink_block_id>wxgui_fftsink2</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> +</flow_graph> diff --git a/gr-uhd/include/Makefile.am b/gr-uhd/examples/python/CMakeLists.txt index 70b80681b..7642b536b 100644 --- a/gr-uhd/include/Makefile.am +++ b/gr-uhd/examples/python/CMakeLists.txt @@ -1,28 +1,42 @@ -# # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# -include $(top_srcdir)/Makefile.common +include(GrPython) -grinclude_HEADERS = \ - gr_uhd_api.h \ - gr_uhd_usrp_source.h \ - gr_uhd_usrp_sink.h \ - gr_uhd_amsg_source.h +GR_PYTHON_INSTALL( + PROGRAMS + fm_tx4.py + fm_tx_2_daughterboards.py + max_power.py + usrp_am_mw_rcv.py + usrp_nbfm_ptt.py + usrp_nbfm_rcv.py + usrp_spectrum_sense.py + usrp_tv_rcv_nogui.py + usrp_tv_rcv.py + usrp_wfm_rcv2_nogui.py + usrp_wfm_rcv_fmdet.py + usrp_wfm_rcv_nogui.py + usrp_wfm_rcv_pll.py + usrp_wfm_rcv.py + usrp_wfm_rcv_sca.py + usrp_wxapt_rcv.py + DESTINATION ${GR_PKG_UHD_EXAMPLES_DIR} + COMPONENT "uhd_python" +) diff --git a/gr-uhd/examples/fm_tx4.py b/gr-uhd/examples/python/fm_tx4.py index aecb35b54..f412ffb5d 100755 --- a/gr-uhd/examples/fm_tx4.py +++ b/gr-uhd/examples/python/fm_tx4.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# """ Transmit N simultaneous narrow band FM signals. @@ -60,10 +60,10 @@ class pipeline(gr.hier_block2): sys.stderr.write(("\nError: Could not open file '%s'\n\n" % \ filename)) sys.exit(1) - + print audio_rate, if_rate fmtx = blks2.nbfm_tx (audio_rate, if_rate, max_dev=5e3, tau=75e-6) - + # Local oscillator lo = gr.sig_source_c (if_rate, # sample rate gr.GR_SIN_WAVE, # waveform type @@ -71,7 +71,7 @@ class pipeline(gr.hier_block2): 1.0, # amplitude 0) # DC Offset mixer = gr.multiply_cc () - + self.connect (src, fmtx, (mixer, 0)) self.connect (lo, (mixer, 1)) self.connect (mixer, self) @@ -107,7 +107,7 @@ class fm_tx_block(stdgui2.std_top_block): if options.nchannels < 1 or options.nchannels > MAX_CHANNELS: sys.stderr.write ("fm_tx4: nchannels out of range. Must be in [1,%d]\n" % MAX_CHANNELS) sys.exit(1) - + if options.freq is None: sys.stderr.write("fm_tx4: must specify frequency with -f FREQ\n") parser.print_help() @@ -168,7 +168,7 @@ class fm_tx_block(stdgui2.std_top_block): ref_level=40) self.connect (self.gain, post_mod) vbox.Add (post_mod.win, 1, wx.EXPAND) - + #if options.debug: # self.debugger = tx_debug_gui.tx_debug_gui(self.subdev) diff --git a/gr-uhd/examples/fm_tx_2_daughterboards.py b/gr-uhd/examples/python/fm_tx_2_daughterboards.py index c0a7112de..b5763e8e1 100755 --- a/gr-uhd/examples/fm_tx_2_daughterboards.py +++ b/gr-uhd/examples/python/fm_tx_2_daughterboards.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# """ Transmit 2 signals, one out each daughterboard. @@ -52,7 +52,7 @@ class example_signal_0(gr.hier_block2): 600, # frequency 1.0, # amplitude 0) # DC Offset - + self.connect(src, self) @@ -179,7 +179,7 @@ class my_top_block(gr.top_block): if(options.antenna): self.u.set_antenna(options.antenna, 0) self.u.set_antenna(options.antenna, 1) - + def set_freq(self, target_freq, chan): """ Set the center frequency we're interested in. @@ -199,7 +199,7 @@ class my_top_block(gr.top_block): else: print " Set Frequency Failed!" - + return False def set_gain(self, gain, chan): diff --git a/gr-uhd/examples/max_power.py b/gr-uhd/examples/python/max_power.py index a849432ee..5d23f16af 100755 --- a/gr-uhd/examples/max_power.py +++ b/gr-uhd/examples/python/max_power.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# """ Setup USRP for maximum power consumption. @@ -56,7 +56,7 @@ class build_block(gr.top_block): else: tx_nchan = 1 rx_nchan = 1 - + if tx_enable: print "\nTRANSMIT CHAIN" stream_args = uhd.stream_args('fc32', channels=range(tx_nchan)) diff --git a/gr-uhd/examples/usrp_am_mw_rcv.py b/gr-uhd/examples/python/usrp_am_mw_rcv.py index 85ffd7632..28262f2bd 100755 --- a/gr-uhd/examples/usrp_am_mw_rcv.py +++ b/gr-uhd/examples/python/usrp_am_mw_rcv.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, eng_notation, optfir from gnuradio import audio @@ -60,15 +60,15 @@ class wfm_rx_block (stdgui2.std_top_block): if len(args) != 0: parser.print_help() sys.exit(1) - + self.frame = frame self.panel = panel self.use_IF=options.use_if_freq if self.use_IF: - self.IF_freq=64000.0 + self.IF_freq=64000.0 else: self.IF_freq=0.0 - + self.vol = 0 self.state = "FREQ" self.freq = 0 @@ -89,7 +89,7 @@ class wfm_rx_block (stdgui2.std_top_block): audio_rate = 32e3 chanfilt_decim = int(usrp_rate // demod_rate) audio_decim = int(demod_rate // audio_rate) - + self.u.set_samp_rate(usrp_rate) dev_rate = self.u.get_samp_rate() @@ -97,7 +97,7 @@ class wfm_rx_block (stdgui2.std_top_block): # FIXME: make one of the follow-on filters an arb resampler rrate = usrp_rate / dev_rate self.resamp = blks2.pfb_arb_resampler_ccf(rrate) - + chan_filt_coeffs = gr.firdes.low_pass_2 (1, # gain usrp_rate, # sampling rate 8e3, # passband cutoff @@ -128,10 +128,10 @@ class wfm_rx_block (stdgui2.std_top_block): self.audio_sink = audio.sink (int (audio_rate), options.audio_output, False) # ok_to_block - + # now wire it all together self.connect (self.u, self.resamp, self.chan_filt, self.agc, - self.am_demod, self.audio_filt, + self.am_demod, self.audio_filt, self.volume_control, self.audio_sink) self._build_gui(vbox, usrp_rate, demod_rate, audio_rate) @@ -146,7 +146,7 @@ class wfm_rx_block (stdgui2.std_top_block): if options.volume is None: v = self.volume_range() options.volume = float(v[0]*3+v[1])/4.0 - + if abs(options.freq) < 1e3: options.freq *= 1e3 @@ -181,7 +181,7 @@ class wfm_rx_block (stdgui2.std_top_block): vbox.Add (self.post_filt_fft.win, 4, wx.EXPAND) if 0: - post_demod_fft = fftsink2.fft_sink_f(self.panel, title="Post Demod", + post_demod_fft = fftsink2.fft_sink_f(self.panel, title="Post Demod", fft_size=1024, sample_rate=demod_rate, y_per_div=10, ref_level=0) self.connect (self.am_demod, post_demod_fft) @@ -194,7 +194,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.connect (self.audio_filt, audio_fft) vbox.Add (audio_fft.win, 4, wx.EXPAND) - + # control area form at bottom self.myform = myform = form.form() @@ -255,7 +255,7 @@ class wfm_rx_block (stdgui2.std_top_block): elif self.rot <=-3: self.set_vol(self.vol - step) self.rot += 3 - + def on_button (self, event): if event.value == 0: # button up return @@ -265,7 +265,7 @@ class wfm_rx_block (stdgui2.std_top_block): else: self.state = "FREQ" self.update_status_bar () - + def set_vol (self, vol): g = self.volume_range() @@ -273,7 +273,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.volume_control.set_k(10**(self.vol/10)) self.myform['volume'].set_value(self.vol) self.update_status_bar () - + def set_freq(self, target_freq): """ Set the center frequency we're interested in. @@ -282,7 +282,7 @@ class wfm_rx_block (stdgui2.std_top_block): @rypte: bool """ r = self.u.set_center_freq(target_freq + self.IF_freq, 0) - + if r: self.freq = target_freq self.myform['freq'].set_value(target_freq) # update displayed value @@ -305,10 +305,10 @@ class wfm_rx_block (stdgui2.std_top_block): self.src_fft.set_baseband_freq(self.freq) except: None - + def volume_range(self): return (-40.0, 0.0, 0.5) - + if __name__ == '__main__': app = stdgui2.stdapp (wfm_rx_block, "USRP Broadcast AM MW RX") diff --git a/gr-uhd/examples/usrp_nbfm_ptt.py b/gr-uhd/examples/python/usrp_nbfm_ptt.py index 075604af3..8d26e656e 100755 --- a/gr-uhd/examples/usrp_nbfm_ptt.py +++ b/gr-uhd/examples/python/usrp_nbfm_ptt.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# import math import sys @@ -45,7 +45,7 @@ class ptt_block(stdgui2.std_top_block): self.frame = frame self.space_bar_pressed = False - + parser = OptionParser (option_class=eng_option) parser.add_option("-a", "--args", type="string", default="", help="UHD device address args [default=%default]") @@ -72,7 +72,7 @@ class ptt_block(stdgui2.std_top_block): if options.freq < 1e6: options.freq *= 1e6 - + self.txpath = transmit_path(options.args, options.spec, options.antenna, options.tx_gain, options.audio_input) @@ -103,7 +103,7 @@ class ptt_block(stdgui2.std_top_block): def set_rx_gain(self, gain): self.myform['rx_gain'].set_value(gain) # update displayed value self.rxpath.set_gain(gain) - + def set_tx_gain(self, gain): self.txpath.set_gain(gain) @@ -129,9 +129,9 @@ class ptt_block(stdgui2.std_top_block): def _form_set_freq(kv): return self.set_freq(kv['freq']) - + self.panel = panel - + # FIXME This REALLY needs to be replaced with a hand-crafted button # that sends both button down and button up events hbox = wx.BoxSizer(wx.HORIZONTAL) @@ -203,7 +203,7 @@ class ptt_block(stdgui2.std_top_block): form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Squelch", weight=3, range=self.rxpath.squelch_range(), callback=self.set_squelch) - + g = self.rxpath.u.get_gain_range() hbox.Add((5,0), 0) myform['rx_gain'] = \ @@ -221,7 +221,7 @@ class ptt_block(stdgui2.std_top_block): # FIXME figure out how to have this be a subpanel that is always # created, but has its visibility controlled by foo.Show(True/False) - + #if not(self.show_debug_info): # return @@ -268,7 +268,7 @@ class ptt_block(stdgui2.std_top_block): # if we lose the keyboard focus, turn off the transmitter self.space_bar_pressed = False self.set_transmit(False) - + # //////////////////////////////////////////////////////////////////////// # Transmit Path @@ -279,7 +279,7 @@ class transmit_path(gr.hier_block2): gr.hier_block2.__init__(self, "transmit_path", gr.io_signature(0, 0, 0), # Input signature gr.io_signature(0, 0, 0)) # Output signature - + self.u = uhd.usrp_sink(device_addr=args, stream_args=uhd.stream_args('fc32')) # Set the subdevice spec @@ -306,13 +306,13 @@ class transmit_path(gr.hier_block2): self.audio_rate, # sampling rate 3800, # low pass cutoff freq 300, # width of trans. band - gr.firdes.WIN_HANN) # filter type + gr.firdes.WIN_HANN) # filter type hpf = gr.firdes.high_pass (1, # gain self.audio_rate, # sampling rate 325, # low pass cutoff freq 50, # width of trans. band - gr.firdes.WIN_HANN) # filter type + gr.firdes.WIN_HANN) # filter type audio_taps = convolve(array(lpf),array(hpf)) self.audio_filt = gr.fir_filter_fff(1,audio_taps) @@ -391,7 +391,7 @@ class receive_path(gr.hier_block2): nfilts*dev_rate, # sampling rate 13e3, # low pass cutoff freq 4e3, # width of trans. band - gr.firdes.WIN_HANN) # filter type + gr.firdes.WIN_HANN) # filter type rrate = self.quad_rate / dev_rate self.resamp = blks2.pfb_arb_resampler_ccf(rrate, chan_coeffs, nfilts) @@ -407,7 +407,7 @@ class receive_path(gr.hier_block2): # sound card as final sink audio_sink = audio.sink (int(self.audio_rate), audio_output) - + # now wire it all together self.connect (self.u, self.resamp, self.fmrx, self.squelch, self._audio_gain, audio_sink) @@ -423,7 +423,7 @@ class receive_path(gr.hier_block2): self.set_volume((v[0]+v[1])/2) s = self.squelch_range() self.set_squelch((s[0]+s[1])/2) - + # Set the subdevice spec if(spec): self.u.set_subdev_spec(spec, 0) @@ -452,14 +452,14 @@ class receive_path(gr.hier_block2): def squelch_range(self): return self.squelch.squelch_range() - + def set_squelch(self, threshold): print "SQL =", threshold self.squelch.set_threshold(threshold) def threshold(self): return self.squelch.threshold() - + def set_freq(self, target_freq): """ Set the center frequency we're interested in. diff --git a/gr-uhd/examples/usrp_nbfm_rcv.py b/gr-uhd/examples/python/usrp_nbfm_rcv.py index 6fdf95a30..571abe8c9 100755 --- a/gr-uhd/examples/usrp_nbfm_rcv.py +++ b/gr-uhd/examples/python/usrp_nbfm_rcv.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, audio, blks2, uhd from gnuradio.eng_option import eng_option @@ -58,13 +58,13 @@ class my_top_block (stdgui2.std_top_block): if len(args) != 0: parser.print_help() sys.exit(1) - + if options.freq < 1e6: options.freq *= 1e6 - + self.frame = frame self.panel = panel - + self.state = "FREQ" self.freq = 0 self.freq_step = 25e3 @@ -72,7 +72,7 @@ class my_top_block (stdgui2.std_top_block): self.rxpath = receive_path(options.args, options.spec, options.antenna, options.gain, options.audio_output) self.connect(self.rxpath) - + self._build_gui(vbox, options.no_gui) # set initial values @@ -119,7 +119,7 @@ class my_top_block (stdgui2.std_top_block): y_per_div=20) self.connect (self.rxpath.resamp, rx_fft) vbox.Add (rx_fft.win, 4, wx.EXPAND) - + if 1 and not(no_gui): post_deemph_fft = fftsink2.fft_sink_f(self.panel, title="Post Deemph", @@ -132,7 +132,7 @@ class my_top_block (stdgui2.std_top_block): if 0: post_filt_fft = fftsink2.fft_sink_f(self.panel, - title="Post Filter", + title="Post Filter", fft_size=512, sample_rate=audio_rate, y_per_div=10, @@ -206,7 +206,7 @@ class my_top_block (stdgui2.std_top_block): elif self.rot <=-3: self.set_volume(self.rxpath.volume - step) self.rot += 3 - + def on_button (self, event): if event.value == 0: # button up return @@ -216,7 +216,7 @@ class my_top_block (stdgui2.std_top_block): else: self.state = "FREQ" self.update_status_bar () - + def set_squelch(self, threshold_in_db): self.rxpath.set_squelch(threshold_in_db) @@ -226,7 +226,7 @@ class my_top_block (stdgui2.std_top_block): self.rxpath.set_volume(vol) self.myform['volume'].set_value(self.rxpath.volume) self.update_status_bar () - + def set_freq(self, target_freq): r = self.rxpath.set_freq(target_freq) if r: @@ -252,7 +252,7 @@ class my_top_block (stdgui2.std_top_block): def volume_range(self): return (-20.0, 0.0, 0.5) - + #//////////////////////////////////////////////////////////////////////// # Receive Path @@ -289,7 +289,7 @@ class receive_path(gr.hier_block2): nfilts*dev_rate, # sampling rate 8e3, # low pass cutoff freq 2e3, # width of trans. band - gr.firdes.WIN_HANN) # filter type + gr.firdes.WIN_HANN) # filter type rrate = self.quad_rate / dev_rate self.resamp = blks2.pfb_arb_resampler_ccf(rrate, chan_coeffs, nfilts) @@ -306,7 +306,7 @@ class receive_path(gr.hier_block2): # sound card as final sink audio_sink = audio.sink (int(self.audio_rate), audio_output) - + # now wire it all together if USE_SIMPLE_SQUELCH: self.connect (self.u, self.resamp, self.squelch, self.fmrx, @@ -338,12 +338,12 @@ class receive_path(gr.hier_block2): def _update_audio_gain(self): self._audio_gain.set_k(10**(self.volume/10)) - + def squelch_range(self): r = self.squelch.squelch_range() #print "squelch_range: ", r return r - + def set_squelch(self, threshold): #print "SQL =", threshold self.squelch.set_threshold(threshold) diff --git a/gr-uhd/examples/usrp_spectrum_sense.py b/gr-uhd/examples/python/usrp_spectrum_sense.py index 355a55a98..32980adbf 100755 --- a/gr-uhd/examples/usrp_spectrum_sense.py +++ b/gr-uhd/examples/python/usrp_spectrum_sense.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, eng_notation, window from gnuradio import audio @@ -35,7 +35,7 @@ sys.stderr.write("Warning: this may have issues on some machines+Python version class ThreadClass(threading.Thread): def run(self): return - + class tune(gr.feval_dd): """ This class allows C++ code to callback into python. @@ -158,13 +158,13 @@ class my_top_block(gr.top_block): power = 0 for tap in mywindow: power += tap*tap - + c2mag = gr.complex_to_mag_squared(self.fft_size) # FIXME the log10 primitive is dog slow log = gr.nlog10_ff(10, self.fft_size, -20*math.log10(self.fft_size)-10*math.log10(power/self.fft_size)) - + # Set the freq_step to 75% of the actual data throughput. # This allows us to discard the bins on both ends of the spectrum. @@ -174,7 +174,7 @@ class my_top_block(gr.top_block): self.max_center_freq = self.min_center_freq + (nsteps * self.freq_step) self.next_freq = self.min_center_freq - + tune_delay = max(0, int(round(options.tune_delay * usrp_rate / self.fft_size))) # in fft_frames dwell_delay = max(1, int(round(options.dwell_delay * usrp_rate / self.fft_size))) # in fft_frames @@ -207,7 +207,7 @@ class my_top_block(gr.top_block): sys.exit(1) return target_freq - + def set_freq(self, target_freq): """ @@ -237,14 +237,14 @@ def main_loop(tb): print m.center_freq # FIXME do something useful with the data... - + # m.data are the mag_squared of the fft output (they are in the # standard order. I.e., bin 0 == DC.) # You'll probably want to do the equivalent of "fftshift" on them # m.raw_data is a string that contains the binary floats. # You could write this as binary to a file. - + if __name__ == '__main__': t = ThreadClass() t.start() @@ -253,6 +253,6 @@ if __name__ == '__main__': try: tb.start() main_loop(tb) - + except KeyboardInterrupt: pass diff --git a/gr-uhd/examples/usrp_tv_rcv.py b/gr-uhd/examples/python/usrp_tv_rcv.py index 700915bf8..b49a5ea71 100755 --- a/gr-uhd/examples/usrp_tv_rcv.py +++ b/gr-uhd/examples/python/usrp_tv_rcv.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# """ Realtime capture and display of analog Tv stations. @@ -95,7 +95,7 @@ class tv_rx_block (stdgui2.std_top_block): if not ((len(args) == 1) or (len(args) == 0)): parser.print_help() sys.exit(1) - + if len(args) == 1: filename = args[0] else: @@ -103,7 +103,7 @@ class tv_rx_block (stdgui2.std_top_block): self.frame = frame self.panel = panel - + self.contrast = options.contrast self.brightness = options.brightness self.state = "FREQ" @@ -136,7 +136,7 @@ class tv_rx_block (stdgui2.std_top_block): # Set the subdevice spec if(options.spec): self.u.set_subdev_spec(options.spec, 0) - + # Set the antenna if(options.antenna): self.u.set_antenna(options.antenna, 0) @@ -151,7 +151,7 @@ class tv_rx_block (stdgui2.std_top_block): self.src=self.u - self.gain = options.gain + self.gain = options.gain f2uc=gr.float_to_uchar() @@ -189,10 +189,10 @@ class tv_rx_block (stdgui2.std_top_block): print "use the following line to show the demodulated TV-signal:" print "display -depth 8 -size " +str(width)+ "x" + str(height) \ + " gray:" + options.out_filename - print "(Use the spacebar to advance to next frames)" + print "(Use the spacebar to advance to next frames)" options.repeat=False file_sink=gr.file_sink(gr.sizeof_char, options.out_filename) - self.dst =file_sink + self.dst =file_sink self.agc=gr.agc_cc(1e-7,1.0,1.0) #1e-7 self.am_demod = gr.complex_to_mag () @@ -219,7 +219,7 @@ class tv_rx_block (stdgui2.std_top_block): self.tv_sync_adv=gr.tv_sync_adv(usrp_rate, 0, False, False, 0.0, 255.0, 0.01, 1.0, 0.0, False) self.connect (self.src, self.am_demod, self.invert_and_scale, - self.tv_sync_adv, s2f, f2uc, self.dst) + self.tv_sync_adv, s2f, f2uc, self.dst) elif process_type=='do_nullsink': #self.connect (self.src, self.am_demod,self.invert_and_scale,f2uc,video_sink) @@ -229,16 +229,16 @@ class tv_rx_block (stdgui2.std_top_block): elif process_type=='do_tv_sync_corr': frame_size=width*height #int(usrp_rate/25.0) nframes=10# 32 - search_window=20*nframes + search_window=20*nframes debug=False video_alpha=0.3 #0.1 corr_alpha=0.3 - + #Note: this block is not yet in cvs tv_corr=gr.tv_correlator_ff(frame_size,nframes, search_window, - video_alpha, corr_alpha,debug) + video_alpha, corr_alpha,debug) shift=gr.add_const_ff(-0.7) - + self.connect (self.src, self.agc, self.am_demod, tv_corr, self.invert_and_scale, self.set_blacklevel, f2uc, self.dst) @@ -248,7 +248,7 @@ class tv_rx_block (stdgui2.std_top_block): self.connect(src_vertical_bars, f2uc, self.dst) self._build_gui(vbox, usrp_rate, usrp_rate, usrp_rate) - + frange = self.u.get_freq_range() if(frange.start() > self.tv_freq_max or frange.stop() < self.tv_freq_min): @@ -290,13 +290,13 @@ class tv_rx_block (stdgui2.std_top_block): vbox.Add (post_demod_fft.win, 4, wx.EXPAND) if 0: - post_filt_fft = fftsink.fft_sink_f (self, self.panel, title="Post Filter", + post_filt_fft = fftsink.fft_sink_f (self, self.panel, title="Post Filter", fft_size=512, sample_rate=audio_rate, y_per_div=10, ref_level=-40) self.connect (self.set_blacklevel, post_filt) vbox.Add (fft_win4, 4, wx.EXPAND) - + # control area form at bottom self.myform = myform = form.form() @@ -373,7 +373,7 @@ class tv_rx_block (stdgui2.std_top_block): elif self.rot <=-3: self.set_brightness(self.brightness - step) self.rot += 3 - + def on_button (self, event): if event.value == 0: # button up return @@ -385,7 +385,7 @@ class tv_rx_block (stdgui2.std_top_block): else: self.state = "FREQ" self.update_status_bar () - + def set_contrast (self, contrast): self.contrast = contrast @@ -398,7 +398,7 @@ class tv_rx_block (stdgui2.std_top_block): self.set_blacklevel.set_k(self.brightness +255.0) self.myform['brightness'].set_value(self.brightness) self.update_status_bar () - + def set_freq(self, target_freq): """ Set the center frequency we're interested in. @@ -430,13 +430,13 @@ class tv_rx_block (stdgui2.std_top_block): self.myform['gain'].set_value(gain) # update displayed value self.u.set_gain(gain) self.update_status_bar() - + def update_status_bar (self): msg = "Setting:%s Contrast:%r Brightness:%r Gain: %r" % \ (self.state, self.contrast,self.brightness,self.gain) self._set_status_msg(msg, 1) #self.src_fft.set_baseband_freq(self.freq) - + if __name__ == '__main__': app = stdgui2.stdapp (tv_rx_block, "USRP TV RX black-and-white") diff --git a/gr-uhd/examples/usrp_tv_rcv_nogui.py b/gr-uhd/examples/python/usrp_tv_rcv_nogui.py index 870e65b27..cfb36222c 100755 --- a/gr-uhd/examples/usrp_tv_rcv_nogui.py +++ b/gr-uhd/examples/python/usrp_tv_rcv_nogui.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# """ Reads from a file and generates PAL TV pictures in black and white @@ -99,7 +99,7 @@ class my_top_block(gr.top_block): parser.print_help() sys.stderr.write('You must specify the output. FILENAME or sdl \n'); sys.exit(1) - + filename = args[0] self.tv_freq_min = options.freq_min @@ -120,7 +120,7 @@ class my_top_block(gr.top_block): # file is data source, capture with usr_rx_csfile.py self.filesource = gr.file_source(gr.sizeof_short, options.in_filename, - options.repeat) + options.repeat) self.istoc = gr.interleaved_short_to_complex() self.connect(self.filesource,self.istoc) self.src=self.istoc @@ -140,7 +140,7 @@ class my_top_block(gr.top_block): # Set the antenna if(options.antenna): self.u.set_antenna(options.antenna, 0) - + self.u.set_samp_rate(input_rate) dev_rate = self.u.get_samp_rate() @@ -156,7 +156,7 @@ class my_top_block(gr.top_block): if not r: sys.stderr.write('Failed to set frequency\n') raise SystemExit, 1 - + self.agc = gr.agc_cc(1e-7,1.0,1.0) #1e-7 self.am_demod = gr.complex_to_mag () @@ -194,9 +194,9 @@ class my_top_block(gr.top_block): print "You can use the imagemagick display tool to show the resulting imagesequence" print "use the following line to show the demodulated TV-signal:" print "display -depth 8 -size " +str(width)+ "x" + str(height) + " gray:" +filename - print "(Use the spacebar to advance to next frames)" + print "(Use the spacebar to advance to next frames)" file_sink=gr.file_sink(gr.sizeof_char, filename) - self.dst =file_sink + self.dst =file_sink if options.nframes is None: self.connect(self.src, self.agc) diff --git a/gr-uhd/examples/usrp_wfm_rcv.py b/gr-uhd/examples/python/usrp_wfm_rcv.py index f6c5cf853..bbb599033 100755 --- a/gr-uhd/examples/usrp_wfm_rcv.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2009,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, optfir, audio, blks2, uhd from gnuradio.eng_option import eng_option @@ -57,10 +57,10 @@ class wfm_rx_block (stdgui2.std_top_block): if len(args) != 0: parser.print_help() sys.exit(1) - + self.frame = frame self.panel = panel - + self.vol = 0 self.state = "FREQ" self.freq = 0 @@ -105,7 +105,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.audio_sink = audio.sink (int (audio_rate), options.audio_output, False) # ok_to_block - + # now wire it all together self.connect (self.u, self.chan_filt, self.guts, self.volume_control, self.audio_sink) @@ -120,7 +120,7 @@ class wfm_rx_block (stdgui2.std_top_block): if options.volume is None: g = self.volume_range() options.volume = float(g[0]+g[1])/2 - + frange = self.u.get_freq_range() if(frange.start() > self.fm_freq_max or frange.stop() < self.fm_freq_min): sys.stderr.write("Radio does not support required frequency range.\n") @@ -128,7 +128,7 @@ class wfm_rx_block (stdgui2.std_top_block): if(options.freq < self.fm_freq_min or options.freq > self.fm_freq_max): sys.stderr.write("Requested frequency is outside of required frequency range.\n") sys.exit(1) - + # set initial values @@ -155,7 +155,7 @@ class wfm_rx_block (stdgui2.std_top_block): vbox.Add (self.src_fft.win, 4, wx.EXPAND) if 1: - post_filt_fft = fftsink2.fft_sink_f(self.panel, title="Post Demod", + post_filt_fft = fftsink2.fft_sink_f(self.panel, title="Post Demod", fft_size=1024, sample_rate=usrp_rate, y_per_div=10, ref_level=0) self.connect (self.guts.fm_demod, post_filt_fft) @@ -168,7 +168,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.connect (self.guts.deemph, post_deemph_fft) vbox.Add (post_deemph_fft.win, 4, wx.EXPAND) - + # control area form at bottom self.myform = myform = form.form() @@ -195,7 +195,7 @@ class wfm_rx_block (stdgui2.std_top_block): callback=self.set_vol) hbox.Add((5,0), 1) - g = self.u.get_gain_range() + g = self.u.get_gain_range() myform['gain'] = \ form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Gain", weight=3, range=(g.start(), g.stop(), g.step()), @@ -229,7 +229,7 @@ class wfm_rx_block (stdgui2.std_top_block): elif self.rot <=-3: self.set_vol(self.vol - step) self.rot += 3 - + def on_button (self, event): if event.value == 0: # button up return @@ -239,7 +239,7 @@ class wfm_rx_block (stdgui2.std_top_block): else: self.state = "FREQ" self.update_status_bar () - + def set_vol (self, vol): g = self.volume_range() @@ -247,7 +247,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.volume_control.set_k(10**(self.vol/10)) self.myform['volume'].set_value(self.vol) self.update_status_bar () - + def set_freq(self, target_freq): """ Set the center frequency we're interested in. @@ -279,7 +279,7 @@ class wfm_rx_block (stdgui2.std_top_block): def volume_range(self): return (-20.0, 0.0, 0.5) - + if __name__ == '__main__': app = stdgui2.stdapp (wfm_rx_block, "USRP WFM RX") diff --git a/gr-uhd/examples/usrp_wfm_rcv2_nogui.py b/gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py index b70334f30..f7e72ae6f 100755 --- a/gr-uhd/examples/usrp_wfm_rcv2_nogui.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, optfir, audio, blks2, uhd from gnuradio.eng_option import eng_option @@ -55,13 +55,13 @@ class wfm_rx_block (gr.top_block): if len(args) != 0: parser.print_help() sys.exit(1) - + if abs(options.f1 - options.f2) > 5.5e6: print "Sorry, two stations must be within 5.5MHz of each other" raise SystemExit f = (options.f1, options.f2) - + self.vol = .1 self.state = "FREQ" @@ -130,7 +130,7 @@ class wfm_rx_block (gr.top_block): tr = uhd.tune_request(f[n], rf_freq=mid_freq, rf_freq_policy=uhd.tune_request.POLICY_MANUAL) self.u.set_center_freq(tr, n) - + # Set gain for each channel self.set_gain(options.gain, n) diff --git a/gr-uhd/examples/usrp_wfm_rcv_fmdet.py b/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py index 9649857c0..514bd4faf 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_fmdet.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, optfir, audio, blks2, uhd from gnuradio.eng_option import eng_option @@ -59,10 +59,10 @@ class wfm_rx_block (stdgui2.std_top_block): if len(args) != 0: parser.print_help() sys.exit(1) - + self.frame = frame self.panel = panel - + self.vol = 0 self.state = "FREQ" self.freq = 0 @@ -112,7 +112,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.audio_sink = audio.sink (int (audio_rate), options.audio_output, False) # ok_to_block - + # now wire it all together self.connect (self.u, self.chan_filt, self.guts) self.connect((self.guts, 0), self.lchan_filt, @@ -206,7 +206,7 @@ class wfm_rx_block (stdgui2.std_top_block): if 0: - LmR_fft = fftsink2.fft_sink_f(self.panel, title="LmR", + LmR_fft = fftsink2.fft_sink_f(self.panel, title="LmR", fft_size=512, sample_rate=audio_rate, y_per_div=10, ref_level=-20) self.connect (self.guts.LmR_real,LmR_fft) @@ -216,7 +216,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.scope = scopesink2.scope_sink_f(self.panel, sample_rate=demod_rate) self.connect (self.guts.fm_demod,self.scope) vbox.Add (self.scope.win,4,wx.EXPAND) - + # control area form at bottom self.myform = myform = form.form() @@ -243,7 +243,7 @@ class wfm_rx_block (stdgui2.std_top_block): callback=self.set_vol) hbox.Add((5,0), 1) - g = self.u.get_gain_range() + g = self.u.get_gain_range() myform['gain'] = \ form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Gain", weight=3, range=(g.start(), g.stop(), g.step()), @@ -283,7 +283,7 @@ class wfm_rx_block (stdgui2.std_top_block): elif self.rot <=-3: self.set_vol(self.vol - step) self.rot += 3 - + def on_button (self, event): if event.value == 0: # button up return @@ -293,7 +293,7 @@ class wfm_rx_block (stdgui2.std_top_block): else: self.state = "FREQ" self.update_status_bar () - + def set_vol (self, vol): g = self.volume_range() @@ -308,7 +308,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.guts.stereo_carrier_pll_recovery.set_lock_threshold(squelch_threshold); except: print "FYI: This implementation of the stereo_carrier_pll_recovery has no squelch implementation yet" - + def set_freq(self, target_freq): """ @@ -317,7 +317,7 @@ class wfm_rx_block (stdgui2.std_top_block): @param target_freq: frequency in Hz @rypte: bool """ - + r = self.u.set_center_freq(target_freq) if r: @@ -330,7 +330,7 @@ class wfm_rx_block (stdgui2.std_top_block): self._set_status_msg("Failed", 0) return False - + def set_gain(self, gain): self.myform['gain'].set_value(gain) # update displayed value self.u.set_gain(gain) @@ -342,7 +342,7 @@ class wfm_rx_block (stdgui2.std_top_block): def volume_range(self): return (-20.0, 0.0, 0.5) - + if __name__ == '__main__': app = stdgui2.stdapp (wfm_rx_block, "USRP WFM RX") diff --git a/gr-uhd/examples/usrp_wfm_rcv_nogui.py b/gr-uhd/examples/python/usrp_wfm_rcv_nogui.py index f0195bcb5..7d042983e 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_nogui.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv_nogui.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, optfir, audio, blks2, uhd from gnuradio import eng_notation @@ -55,7 +55,7 @@ class wfm_rx_block (gr.top_block): if len(args) != 0: parser.print_help() sys.exit(1) - + self.state = "FREQ" self.freq = 0 @@ -99,7 +99,7 @@ class wfm_rx_block (gr.top_block): self.audio_sink = audio.sink(int(audio_rate), options.audio_output, False) # ok_to_block - + # now wire it all together self.connect (self.u, self.chan_filt, self.guts, self.volume_control, self.audio_sink) @@ -140,7 +140,7 @@ class wfm_rx_block (gr.top_block): @param target_freq: frequency in Hz @rypte: bool """ - + r = self.u.set_center_freq(target_freq) if r: @@ -159,14 +159,14 @@ class wfm_rx_block (gr.top_block): msg = "Freq: %s Volume:%f Setting:%s" % ( eng_notation.num_to_str(self.freq), self.vol, self.state) self._set_status_msg(msg, 1) - + def _set_status_msg(self, msg, which=0): print msg def volume_range(self): return (-20.0, 0.0, 0.5) - + if __name__ == '__main__': tb = wfm_rx_block() try: diff --git a/gr-uhd/examples/usrp_wfm_rcv_pll.py b/gr-uhd/examples/python/usrp_wfm_rcv_pll.py index b0744b00b..53b1e6fea 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_pll.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv_pll.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, optfir, audio, blks2, uhd from gnuradio import eng_notation @@ -59,10 +59,10 @@ class wfm_rx_block (stdgui2.std_top_block): if len(args) != 0: parser.print_help() sys.exit(1) - + self.frame = frame self.panel = panel - + self.vol = 0 self.state = "FREQ" self.freq = 0 @@ -97,7 +97,7 @@ class wfm_rx_block (stdgui2.std_top_block): 70) # stopband attenuation rrate = usrp_rate / dev_rate self.chan_filt = blks2.pfb_arb_resampler_ccf(rrate, chan_coeffs, nfilts) - + self.guts = blks2.wfm_rcv_pll (demod_rate, audio_decim) @@ -113,7 +113,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.audio_sink = audio.sink (int (audio_rate), options.audio_output, False) # ok_to_block - + # now wire it all together self.connect (self.u, self.chan_filt, self.guts) self.connect((self.guts, 0), self.lchan_filt, @@ -204,7 +204,7 @@ class wfm_rx_block (stdgui2.std_top_block): if 0: - LmR_fft = fftsink2.fft_sink_f(self.panel, title="LmR", + LmR_fft = fftsink2.fft_sink_f(self.panel, title="LmR", fft_size=512, sample_rate=audio_rate, y_per_div=10, ref_level=-20) self.connect (self.guts.LmR_real,LmR_fft) @@ -214,7 +214,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.scope = scopesink2.scope_sink_f(self.panel, sample_rate=demod_rate) self.connect (self.guts.fm_demod,self.scope) vbox.Add (self.scope.win,4,wx.EXPAND) - + # control area form at bottom self.myform = myform = form.form() @@ -241,7 +241,7 @@ class wfm_rx_block (stdgui2.std_top_block): callback=self.set_vol) hbox.Add((5,0), 1) - g = self.u.get_gain_range() + g = self.u.get_gain_range() myform['gain'] = \ form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Gain", weight=3, range=(g.start(), g.stop(), g.step()), @@ -281,7 +281,7 @@ class wfm_rx_block (stdgui2.std_top_block): elif self.rot <=-3: self.set_vol(self.vol - step) self.rot += 3 - + def on_button (self, event): if event.value == 0: # button up return @@ -291,7 +291,7 @@ class wfm_rx_block (stdgui2.std_top_block): else: self.state = "FREQ" self.update_status_bar () - + def set_vol (self, vol): g = self.volume_range() @@ -306,7 +306,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.guts.stereo_carrier_pll_recovery.set_lock_threshold(squelch_threshold); except: print "FYI: This implementation of the stereo_carrier_pll_recovery has no squelch implementation yet" - + def set_freq(self, target_freq): """ Set the center frequency we're interested in. @@ -314,7 +314,7 @@ class wfm_rx_block (stdgui2.std_top_block): @param target_freq: frequency in Hz @rypte: bool """ - + r = self.u.set_center_freq(target_freq) if r: @@ -327,7 +327,7 @@ class wfm_rx_block (stdgui2.std_top_block): self._set_status_msg("Failed", 0) return False - + def set_gain(self, gain): self.myform['gain'].set_value(gain) # update displayed value self.u.set_gain(gain) @@ -339,7 +339,7 @@ class wfm_rx_block (stdgui2.std_top_block): def volume_range(self): return (-20.0, 0.0, 0.5) - + if __name__ == '__main__': app = stdgui2.stdapp (wfm_rx_block, "USRP WFM RX") diff --git a/gr-uhd/examples/usrp_wfm_rcv_sca.py b/gr-uhd/examples/python/usrp_wfm_rcv_sca.py index 224f30cf8..646fe8587 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_sca.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv_sca.py @@ -1,19 +1,19 @@ #!/usr/bin/env python # # Copyright 2006,2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -109,7 +109,7 @@ class wfm_rx_sca_block (stdgui2.std_top_block): # Set the antenna if(options.antenna): self.u.set_antenna(options.antenna, 0) - + usrp_rate = 320e3 demod_rate = 320e3 audio_rate = 32e3 @@ -218,7 +218,7 @@ class wfm_rx_sca_block (stdgui2.std_top_block): if not(self.set_freq(options.freq)): self._set_status_msg("Failed to set initial frequency") self.set_sca_freq(67000) # A common SCA Frequency - + def _set_status_msg(self, msg, which=0): self.frame.GetStatusBar().SetStatusText(msg, which) @@ -300,7 +300,7 @@ class wfm_rx_sca_block (stdgui2.std_top_block): callback=self.set_vol) hbox.Add((5,0), 1) - g = self.u.get_gain_range() + g = self.u.get_gain_range() myform['gain'] = \ form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Gain", weight=3, range=(g.start(), g.stop(), g.step()), diff --git a/gr-uhd/examples/usrp_wxapt_rcv.py b/gr-uhd/examples/python/usrp_wxapt_rcv.py index d9b1a0188..6b57de3bc 100755 --- a/gr-uhd/examples/usrp_wxapt_rcv.py +++ b/gr-uhd/examples/python/usrp_wxapt_rcv.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, audio, blks2, uhd from gnuradio.eng_option import eng_option @@ -57,10 +57,10 @@ class wxapt_rx_block (stdgui2.std_top_block): if len(args) != 0: parser.print_help() sys.exit(1) - + self.frame = frame self.panel = panel - + self.vol = 0 self.state = "FREQ" self.freq = 0 @@ -102,7 +102,7 @@ class wxapt_rx_block (stdgui2.std_top_block): # sound card as final sink self.audio_sink = audio.sink (int (audio_rate), options.audio_output) - + # now wire it all together self.connect (self.u, self.chan_filt, self.guts, self.volume_control, self.audio_sink) @@ -157,13 +157,13 @@ class wxapt_rx_block (stdgui2.std_top_block): vbox.Add (post_deemph_fft.win, 4, wx.EXPAND) if 1: - post_filt_fft = fftsink2.fft_sink_f (self.panel, title="Post Filter", + post_filt_fft = fftsink2.fft_sink_f (self.panel, title="Post Filter", fft_size=512, sample_rate=audio_rate, y_per_div=10, ref_level=0) self.connect (self.guts.audio_filter, post_filt_fft) vbox.Add (post_filt_fft.win, 4, wx.EXPAND) - + # control area form at bottom self.myform = myform = form.form() @@ -224,7 +224,7 @@ class wxapt_rx_block (stdgui2.std_top_block): elif self.rot <=-3: self.set_vol(self.vol - step) self.rot += 3 - + def on_button (self, event): if event.value == 0: # button up return @@ -234,7 +234,7 @@ class wxapt_rx_block (stdgui2.std_top_block): else: self.state = "FREQ" self.update_status_bar () - + def set_vol (self, vol): g = self.volume_range() @@ -242,7 +242,7 @@ class wxapt_rx_block (stdgui2.std_top_block): self.volume_control.set_k(10**(self.vol/10)) self.myform['volume'].set_value(self.vol) self.update_status_bar () - + def set_freq(self, target_freq): """ Set the center frequency we're interested in. @@ -275,7 +275,7 @@ class wxapt_rx_block (stdgui2.std_top_block): def volume_range(self): return (-20.0, 0.0, 0.5) - + if __name__ == '__main__': app = stdgui2.stdapp (wxapt_rx_block, "USRP WXAPT RX") diff --git a/gr-uhd/grc/.gitignore b/gr-uhd/grc/.gitignore deleted file mode 100644 index 797c54ae7..000000000 --- a/gr-uhd/grc/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/uhd_usrp*.xml -/Makefile -/Makefile.in diff --git a/gr-uhd/grc/CMakeLists.txt b/gr-uhd/grc/CMakeLists.txt index 3297db8d7..2d8f24aa3 100644 --- a/gr-uhd/grc/CMakeLists.txt +++ b/gr-uhd/grc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/grc/Makefile.am b/gr-uhd/grc/Makefile.am deleted file mode 100644 index 42a35b1c1..000000000 --- a/gr-uhd/grc/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright 2010-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -grcblocksdir = $(grc_blocksdir) - -generated_uhd_usrp_blocks = \ - uhd_usrp_source.xml \ - uhd_usrp_sink.xml - -BUILT_SOURCES += $(generated_uhd_usrp_blocks) - -dist_grcblocks_DATA = \ - uhd_block_tree.xml \ - uhd_amsg_source.xml \ - $(BUILT_SOURCES) - -######################################################################## -# Rules for generating the source and sink xml wrappers -######################################################################## -EXTRA_DIST += $(srcdir)/gen_uhd_usrp_blocks.py - -$(generated_uhd_usrp_blocks): $(srcdir)/gen_uhd_usrp_blocks.py - @echo "generating $@..." - $(PYTHON) $< $@ diff --git a/gr-uhd/include/.gitignore b/gr-uhd/include/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-uhd/include/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-uhd/include/CMakeLists.txt b/gr-uhd/include/CMakeLists.txt index fdd384d58..27d3d1d36 100644 --- a/gr-uhd/include/CMakeLists.txt +++ b/gr-uhd/include/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/include/gr_uhd_amsg_source.h b/gr-uhd/include/gr_uhd_amsg_source.h index 3c1b59fa7..f2f21c99f 100644 --- a/gr-uhd/include/gr_uhd_amsg_source.h +++ b/gr-uhd/include/gr_uhd_amsg_source.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/include/gr_uhd_api.h b/gr-uhd/include/gr_uhd_api.h index d20b82c99..106acd8c7 100644 --- a/gr-uhd/include/gr_uhd_api.h +++ b/gr-uhd/include/gr_uhd_api.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/include/gr_uhd_usrp_sink.h b/gr-uhd/include/gr_uhd_usrp_sink.h index dffdf810f..0b05363f7 100644 --- a/gr-uhd/include/gr_uhd_usrp_sink.h +++ b/gr-uhd/include/gr_uhd_usrp_sink.h @@ -1,18 +1,18 @@ /* * Copyright 2010-2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/include/gr_uhd_usrp_source.h b/gr-uhd/include/gr_uhd_usrp_source.h index 64e9fb098..2611c5e07 100644 --- a/gr-uhd/include/gr_uhd_usrp_source.h +++ b/gr-uhd/include/gr_uhd_usrp_source.h @@ -1,18 +1,18 @@ /* * Copyright 2010-2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/lib/.gitignore b/gr-uhd/lib/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-uhd/lib/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-uhd/lib/CMakeLists.txt b/gr-uhd/lib/CMakeLists.txt index 1f44b0630..810d1446a 100644 --- a/gr-uhd/lib/CMakeLists.txt +++ b/gr-uhd/lib/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011-2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/lib/Makefile.am b/gr-uhd/lib/Makefile.am deleted file mode 100644 index 41ce79d87..000000000 --- a/gr-uhd/lib/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright 2010-2012 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -AM_CPPFLAGS = \ - $(STD_DEFINES_AND_INCLUDES) \ - $(WITH_INCLUDES) \ - $(UHD_CPPFLAGS) \ - -I$(srcdir) \ - -Dgnuradio_uhd_EXPORTS - -lib_LTLIBRARIES = libgnuradio-uhd.la - -libgnuradio_uhd_la_SOURCES = \ - gr_uhd_usrp_source.cc \ - gr_uhd_usrp_sink.cc \ - gr_uhd_amsg_source.cc - -libgnuradio_uhd_la_LIBADD = \ - $(GNURADIO_CORE_LA) \ - $(UHD_LIBS) - -libgnuradio_uhd_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) - -noinst_HEADERS = gr_uhd_common.h diff --git a/gr-uhd/lib/gr_uhd_amsg_source.cc b/gr-uhd/lib/gr_uhd_amsg_source.cc index 67e402f6b..d2e2dd0bf 100644 --- a/gr-uhd/lib/gr_uhd_amsg_source.cc +++ b/gr-uhd/lib/gr_uhd_amsg_source.cc @@ -1,18 +1,18 @@ /* * Copyright 2011-2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/lib/gr_uhd_common.h b/gr-uhd/lib/gr_uhd_common.h index 940f17692..f2433b288 100644 --- a/gr-uhd/lib/gr_uhd_common.h +++ b/gr-uhd/lib/gr_uhd_common.h @@ -1,18 +1,18 @@ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/lib/gr_uhd_usrp_sink.cc b/gr-uhd/lib/gr_uhd_usrp_sink.cc index 752817664..6c1688ea0 100644 --- a/gr-uhd/lib/gr_uhd_usrp_sink.cc +++ b/gr-uhd/lib/gr_uhd_usrp_sink.cc @@ -1,18 +1,18 @@ /* * Copyright 2010-2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc index d06983cd3..8aa965401 100644 --- a/gr-uhd/lib/gr_uhd_usrp_source.cc +++ b/gr-uhd/lib/gr_uhd_usrp_source.cc @@ -1,18 +1,18 @@ /* * Copyright 2010-2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/swig/.gitignore b/gr-uhd/swig/.gitignore deleted file mode 100644 index 8afaca254..000000000 --- a/gr-uhd/swig/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/uhd_swig.cc -/uhd_swig.py -/Makefile -/Makefile.in -/guile -/python -/run_guile_tests -/run_tests diff --git a/gr-uhd/swig/Makefile.am b/gr-uhd/swig/Makefile.am deleted file mode 100644 index dbecd8573..000000000 --- a/gr-uhd/swig/Makefile.am +++ /dev/null @@ -1,96 +0,0 @@ -# -# Copyright 2010-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common -include $(top_srcdir)/Makefile.swig - -TESTS = -EXTRA_DIST += run_tests.in run_guile_tests.in $(nobase_guile_DATA) -DISTCLEANFILES += run_tests run_guile_tests - -noinst_PYTHON = qa_uhd.py -noinst_GUILE = uhd.test - -AM_CPPFLAGS = \ - $(STD_DEFINES_AND_INCLUDES) \ - $(PYTHON_CPPFLAGS) \ - $(UHD_CPPFLAGS) \ - $(WITH_INCLUDES) - -uhd_swig_swig_args = $(UHD_CPPFLAGS) - -if GUILE -nobase_guile_DATA = \ - gnuradio/uhd.scm -endif - -# ---------------------------------------------------------------- -# The SWIG library - -TOP_SWIG_DOC_IFILES = \ - uhd_swig_doc.i - -TOP_SWIG_IFILES = \ - $(TOP_SWIG_DOC_IFILES) \ - uhd_swig.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -# Install so that they end up available as: -# import gnuradio.uhd -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio/uhd -uhd_swig_pythondir_category = \ - gnuradio/uhd - -# additional libraries for linking with the SWIG-generated library -uhd_swig_la_swig_libadd = \ - $(top_builddir)/gr-uhd/lib/libgnuradio-uhd.la - -# additional Python files to be installed along with the SWIG-generated one -uhd_swig_python = \ - __init__.py - -# additional SWIG files to be installed -uhd_swig_swiginclude_headers = \ - $(TOP_SWIG_DOC_IFILES) - -uhd_swig_swig_args = $(UHD_CPPFLAGS) - -## If UHD was installed, defined GR_HAVE_UHD for swigging headers -if GR_DEFINE_HAVE_UHD - uhd_swig_swig_args += -DGR_HAVE_UHD -endif - -if PYTHON -TESTS += run_tests -endif - -if GUILE -TESTS += run_guile_tests -endif diff --git a/gr-uhd/swig/Makefile.swig.gen b/gr-uhd/swig/Makefile.swig.gen deleted file mode 100644 index 62adf8958..000000000 --- a/gr-uhd/swig/Makefile.swig.gen +++ /dev/null @@ -1,145 +0,0 @@ -# -*- Makefile -*- -# -# Copyright 2009 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -# Makefile.swig.gen for uhd_swig.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/uhd_swig -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/uhd_swig -## -## The following can be overloaded to change the install location, but -## this has to be done in the including Makefile.am -before- -## Makefile.swig is included. - -uhd_swig_pythondir_category ?= gnuradio/uhd_swig -uhd_swig_pylibdir_category ?= $(uhd_swig_pythondir_category) -uhd_swig_pythondir = $(pythondir)/$(uhd_swig_pythondir_category) -uhd_swig_pylibdir = $(pyexecdir)/$(uhd_swig_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -uhd_swig_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/uhd_swig -# FIXME: determince whether these should be installed with gnuradio. -uhd_swig_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -uhd_swig_swigincludedir = $(swigincludedir) - -## This is a template file for a "generated" Makefile addition (in -## this case, "Makefile.swig.gen"). By including the top-level -## Makefile.swig, this file will be used to generate the SWIG -## dependencies. Assign the variable TOP_SWIG_FILES to be the list of -## SWIG .i files to generated wrappings for; there can be more than 1 -## so long as the names are unique (no sorting is done on the -## TOP_SWIG_FILES list). This file explicitly assumes that a SWIG .i -## file will generate .cc, .py, and possibly .h files -- meaning that -## all of these files will have the same base name (that provided for -## the SWIG .i file). -## -## This code is setup to ensure parallel MAKE ("-j" or "-jN") does the -## right thing. For more info, see < -## http://sources.redhat.com/automake/automake.html#Multiple-Outputs > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -uhd_swig_swiginclude_HEADERS = \ - uhd_swig.i \ - $(uhd_swig_swiginclude_headers) - -if PYTHON -uhd_swig_pylib_LTLIBRARIES = \ - _uhd_swig.la - -_uhd_swig_la_SOURCES = \ - python/uhd_swig.cc \ - $(uhd_swig_la_swig_sources) - -uhd_swig_python_PYTHON = \ - uhd_swig.py \ - $(uhd_swig_python) - -_uhd_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(uhd_swig_la_swig_libadd) - -_uhd_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(uhd_swig_la_swig_ldflags) - -_uhd_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(uhd_swig_la_swig_cxxflags) - -python/uhd_swig.cc: uhd_swig.py -uhd_swig.py: uhd_swig.i - -# Include the python dependencies for this file --include python/uhd_swig.d - -endif # end of if python - -if GUILE - -uhd_swig_scmlib_LTLIBRARIES = \ - libguile-gnuradio-uhd_swig.la -libguile_gnuradio_uhd_swig_la_SOURCES = \ - guile/uhd_swig.cc \ - $(uhd_swig_la_swig_sources) -nobase_uhd_swig_scm_DATA = \ - gnuradio/uhd_swig.scm \ - gnuradio/uhd_swig-primitive.scm -libguile_gnuradio_uhd_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(uhd_swig_la_swig_libadd) -libguile_gnuradio_uhd_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(uhd_swig_la_swig_ldflags) -libguile_gnuradio_uhd_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(uhd_swig_la_swig_cxxflags) - -guile/uhd_swig.cc: gnuradio/uhd_swig.scm -gnuradio/uhd_swig.scm: uhd_swig.i -gnuradio/uhd_swig-primitive.scm: gnuradio/uhd_swig.scm - -# Include the guile dependencies for this file --include guile/uhd_swig.d - -endif # end of GUILE - - diff --git a/gr-uhd/swig/__init__.py b/gr-uhd/swig/__init__.py index b4045e77f..54a058c45 100644 --- a/gr-uhd/swig/__init__.py +++ b/gr-uhd/swig/__init__.py @@ -1,18 +1,18 @@ # # Copyright 2010-2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/swig/gnuradio/.gitignore b/gr-uhd/swig/gnuradio/.gitignore deleted file mode 100644 index 820cedd8c..000000000 --- a/gr-uhd/swig/gnuradio/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -uhd_swig-primitive.scm -uhd_swig.scm diff --git a/gr-uhd/swig/qa_uhd.py b/gr-uhd/swig/qa_uhd.py index 2973d04cd..00757369f 100755 --- a/gr-uhd/swig/qa_uhd.py +++ b/gr-uhd/swig/qa_uhd.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2008,2010 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest import uhd_swig @@ -35,6 +35,6 @@ class test_uhd(gr_unittest.TestCase): """Just see if we can import the module... They may not have a UHD device connected, etc. Don't try to run anything""" pass - + if __name__ == '__main__': gr_unittest.run(test_uhd, "test_uhd.xml") diff --git a/gr-uhd/swig/run_guile_tests.in b/gr-uhd/swig/run_guile_tests.in deleted file mode 100644 index 5d08b0dd5..000000000 --- a/gr-uhd/swig/run_guile_tests.in +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -. @top_builddir@/setup_guile_test_env - -# 1st argument is absolute path to hand coded guile source directory -# 2nd argument is absolute path to component C++ shared library build directory -# 3nd argument is absolute path to component SWIG build directory - -add_local_paths \ - @srcdir@ \ - @abs_builddir@ \ - @abs_builddir@ - -@GUILE@ -e main -c '(use-modules (gnuradio test-suite guile-test))' -t @srcdir@ diff --git a/gr-uhd/swig/run_tests.in b/gr-uhd/swig/run_tests.in deleted file mode 100644 index 195e71316..000000000 --- a/gr-uhd/swig/run_tests.in +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# 1st parameter is absolute path to component source directory -# 2nd parameter is absolute path to component build directory -# 3rd parameter is path to Python QA directory - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-uhd \ - @abs_top_builddir@/gr-uhd \ - @srcdir@ diff --git a/gr-uhd/swig/uhd.test b/gr-uhd/swig/uhd.test deleted file mode 100644 index adc51c884..000000000 --- a/gr-uhd/swig/uhd.test +++ /dev/null @@ -1,37 +0,0 @@ -;;; -*- Scheme -*- -;;; -;;; Copyright 2010 Free Software Foundation, Inc. -;;; -;;; This file is part of GNU Radio -;;; -;;; GNU Radio is free software; you can redistribute it and/or modify -;;; it under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3, or (at your option) -;;; any later version. -;;; -;;; GNU Radio is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with this program. If not, see <http://www.gnu.org/licenses/>. -;;; - -;;; If you're using Emacs's Scheme mode: -;;; (put 'with-test-prefix 'scheme-indent-function 1) - -;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests. -;;; See also the very end of the file, where the test-equal, test-eqv -;;; and test-eq macros are defined. - -(define-module (test-module) - #:use-module (oop goops) - #:use-module (gnuradio core) - #:use-module (gnuradio test-suite lib) - #:duplicates (merge-generics replace check)) - -;;; Just see if we can import the module... -;;; They may not have a UHD device attached, powered up etc. - -(use-modules (gnuradio uhd)) diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 729719dcb..513c1da7e 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010-2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -133,14 +133,4 @@ std::string get_version_string(void){ %} std::string get_version_string(void); -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-uhd_swig" "scm_init_gnuradio_uhd_swig_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif /* SWIGGUILE */ - #endif /* GR_HAVE_UHD */ |