From f0537a7da4571bd6aaab273a0588eaef04121648 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 21 Jan 2011 15:20:45 -0800 Subject: grc: moved wxgui blocks and python into gr-wxgui/grc Prefixed wxgui blocks with WX GUI in the block names. Added category to wxgui variables blocks (not in the main block tree.xml) --- gr-wxgui/Makefile.am | 2 +- gr-wxgui/grc/.gitignore | 2 + gr-wxgui/grc/Makefile.am | 44 ++++++ gr-wxgui/grc/__init__.py | 22 +++ gr-wxgui/grc/panel.py | 49 +++++++ gr-wxgui/grc/top_block_gui.py | 74 ++++++++++ gr-wxgui/grc/variable_check_box.xml | 85 +++++++++++ gr-wxgui/grc/variable_chooser.xml | 123 ++++++++++++++++ gr-wxgui/grc/variable_slider.xml | 139 ++++++++++++++++++ gr-wxgui/grc/variable_static_text.xml | 98 +++++++++++++ gr-wxgui/grc/variable_text_box.xml | 102 +++++++++++++ gr-wxgui/grc/wxgui_constellationsink2.xml | 139 ++++++++++++++++++ gr-wxgui/grc/wxgui_fftsink2.xml | 232 ++++++++++++++++++++++++++++++ gr-wxgui/grc/wxgui_histosink2.xml | 77 ++++++++++ gr-wxgui/grc/wxgui_numbersink2.xml | 192 +++++++++++++++++++++++++ gr-wxgui/grc/wxgui_scopesink2.xml | 186 ++++++++++++++++++++++++ gr-wxgui/grc/wxgui_termsink.xml | 55 +++++++ gr-wxgui/grc/wxgui_waterfallsink2.xml | 189 ++++++++++++++++++++++++ 18 files changed, 1809 insertions(+), 1 deletion(-) create mode 100644 gr-wxgui/grc/.gitignore create mode 100644 gr-wxgui/grc/Makefile.am create mode 100644 gr-wxgui/grc/__init__.py create mode 100644 gr-wxgui/grc/panel.py create mode 100644 gr-wxgui/grc/top_block_gui.py create mode 100644 gr-wxgui/grc/variable_check_box.xml create mode 100644 gr-wxgui/grc/variable_chooser.xml create mode 100644 gr-wxgui/grc/variable_slider.xml create mode 100644 gr-wxgui/grc/variable_static_text.xml create mode 100644 gr-wxgui/grc/variable_text_box.xml create mode 100644 gr-wxgui/grc/wxgui_constellationsink2.xml create mode 100644 gr-wxgui/grc/wxgui_fftsink2.xml create mode 100644 gr-wxgui/grc/wxgui_histosink2.xml create mode 100644 gr-wxgui/grc/wxgui_numbersink2.xml create mode 100644 gr-wxgui/grc/wxgui_scopesink2.xml create mode 100644 gr-wxgui/grc/wxgui_termsink.xml create mode 100644 gr-wxgui/grc/wxgui_waterfallsink2.xml (limited to 'gr-wxgui') diff --git a/gr-wxgui/Makefile.am b/gr-wxgui/Makefile.am index cee66e587..cfc7a429c 100644 --- a/gr-wxgui/Makefile.am +++ b/gr-wxgui/Makefile.am @@ -27,7 +27,7 @@ EXTRA_DIST += \ README.gl if PYTHON -SUBDIRS = src +SUBDIRS = src grc etcdir = $(gr_prefsdir) dist_etc_DATA = gr-wxgui.conf diff --git a/gr-wxgui/grc/.gitignore b/gr-wxgui/grc/.gitignore new file mode 100644 index 000000000..b336cc7ce --- /dev/null +++ b/gr-wxgui/grc/.gitignore @@ -0,0 +1,2 @@ +/Makefile +/Makefile.in diff --git a/gr-wxgui/grc/Makefile.am b/gr-wxgui/grc/Makefile.am new file mode 100644 index 000000000..26217077a --- /dev/null +++ b/gr-wxgui/grc/Makefile.am @@ -0,0 +1,44 @@ +# +# 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 + +grcblocksdir = $(grc_blocksdir) +dist_grcblocks_DATA = \ + variable_check_box.xml \ + variable_chooser.xml \ + variable_slider.xml \ + variable_static_text.xml \ + variable_text_box.xml \ + wxgui_constellationsink2.xml \ + wxgui_fftsink2.xml \ + wxgui_histosink2.xml \ + wxgui_numbersink2.xml \ + wxgui_scopesink2.xml \ + wxgui_termsink.xml \ + wxgui_waterfallsink2.xml + +#The wxgui module contains a top_block + wxgui frame. +wxgui_pythondir = $(pythondir)/grc_gnuradio/wxgui +wxgui_python_PYTHON = \ + __init__.py \ + panel.py \ + top_block_gui.py diff --git a/gr-wxgui/grc/__init__.py b/gr-wxgui/grc/__init__.py new file mode 100644 index 000000000..81427253b --- /dev/null +++ b/gr-wxgui/grc/__init__.py @@ -0,0 +1,22 @@ +# Copyright 2008, 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. +# + +from top_block_gui import top_block_gui +from panel import Panel diff --git a/gr-wxgui/grc/panel.py b/gr-wxgui/grc/panel.py new file mode 100644 index 000000000..e62133cac --- /dev/null +++ b/gr-wxgui/grc/panel.py @@ -0,0 +1,49 @@ +# 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. +# + +import wx + +class Panel(wx.Panel): + def __init__(self, parent, orient=wx.VERTICAL): + wx.Panel.__init__(self, parent) + self._box = wx.BoxSizer(orient) + self._grid = wx.GridBagSizer(5, 5) + self.Add(self._grid) + self.SetSizer(self._box) + + def GetWin(self): return self + + def Add(self, win): + """ + Add a window to the wx vbox. + @param win the wx window + """ + self._box.Add(win, 0, wx.EXPAND) + + def GridAdd(self, win, row, col, row_span=1, col_span=1): + """ + Add a window to the wx grid at the given position. + @param win the wx window + @param row the row specification (integer >= 0) + @param col the column specification (integer >= 0) + @param row_span the row span specification (integer >= 1) + @param col_span the column span specification (integer >= 1) + """ + self._grid.Add(win, wx.GBPosition(row, col), wx.GBSpan(row_span, col_span), wx.EXPAND) diff --git a/gr-wxgui/grc/top_block_gui.py b/gr-wxgui/grc/top_block_gui.py new file mode 100644 index 000000000..333ccf1c1 --- /dev/null +++ b/gr-wxgui/grc/top_block_gui.py @@ -0,0 +1,74 @@ +# Copyright 2008, 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. +# + +import wx +from gnuradio import gr +import panel + +default_gui_size = (200, 100) + +class top_block_gui(gr.top_block): + """gr top block with wx gui app and grid sizer.""" + + def __init__(self, title='', size=default_gui_size): + """ + Initialize the gr top block. + Create the wx gui elements. + @param title the main window title + @param size the main window size tuple in pixels + @param icon the file path to an icon or None + """ + #initialize + gr.top_block.__init__(self) + self._size = size + #create gui elements + self._app = wx.App() + self._frame = wx.Frame(None, title=title) + self._panel = panel.Panel(self._frame) + self.Add = self._panel.Add + self.GridAdd = self._panel.GridAdd + self.GetWin = self._panel.GetWin + + def SetIcon(self, *args, **kwargs): self._frame.SetIcon(*args, **kwargs) + + def Run(self, start=True): + """ + Setup the wx gui elements. + Start the gr top block. + Block with the wx main loop. + """ + #set minimal window size + self._frame.SetSizeHints(*self._size) + #create callback for quit + def _quit(event): + self.stop(); self.wait() + self._frame.Destroy() + #setup app + self._frame.Bind(wx.EVT_CLOSE, _quit) + self._sizer = wx.BoxSizer(wx.VERTICAL) + self._sizer.Add(self._panel, 0, wx.EXPAND) + self._frame.SetSizerAndFit(self._sizer) + self._frame.SetAutoLayout(True) + self._frame.Show(True) + self._app.SetTopWindow(self._frame) + #start flow graph + if start: self.start() + #blocking main loop + self._app.MainLoop() diff --git a/gr-wxgui/grc/variable_check_box.xml b/gr-wxgui/grc/variable_check_box.xml new file mode 100644 index 000000000..d1e4d990c --- /dev/null +++ b/gr-wxgui/grc/variable_check_box.xml @@ -0,0 +1,85 @@ + + + + WX GUI Check Box + variable_check_box + Variables + from gnuradio.wxgui import forms + self.$(id) = $(id) = $value + #set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self' +#set $win = 'self._%s_check_box'%$id +$win = forms.check_box( + parent=$(parent).GetWin(), + value=self.$id, + callback=self.set_$(id), + #if $label() + label=$label, + #else + label='$id', + #end if + true=$true, + false=$false, +) +#if not $grid_pos() +$(parent).Add($win) +#else +$(parent).GridAdd($win, $(', '.join(map(str, $grid_pos())))) +#end if + self.set_$(id)($value) + self._$(id)_check_box.set_value($id) + + Label + label + + string + #if $label() then 'none' else 'part'# + + + Default Value + value + True + raw + + + True + true + True + raw + + + False + false + False + raw + + + Grid Position + grid_pos + + grid_pos + + + Notebook + notebook + + notebook + + $value in ($true, $false) + +This block creates a variable with a check box form. \ +Leave the label blank to use the variable id as the label. + +A check box form can switch between two states; \ +the default being True and False. \ +Override True and False to use alternative states. + +Use the Grid Position (row, column, row span, column span) to position the graphical element in the window. + +Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page. + + diff --git a/gr-wxgui/grc/variable_chooser.xml b/gr-wxgui/grc/variable_chooser.xml new file mode 100644 index 000000000..99bf4389c --- /dev/null +++ b/gr-wxgui/grc/variable_chooser.xml @@ -0,0 +1,123 @@ + + + + WX GUI Chooser + variable_chooser + Variables + from gnuradio.wxgui import forms + self.$(id) = $(id) = $value + #set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self' +#set $win = 'self._%s_chooser'%$id +$win = forms.$(type)( + parent=$(parent).GetWin(), + value=self.$id, + callback=self.set_$(id), + #if $label() + label=$label, + #else + label='$id', + #end if + choices=$choices, + labels=$labels, +#if $type() == 'radio_buttons' + style=$style, +#end if +) +#if not $grid_pos() +$(parent).Add($win) +#else +$(parent).GridAdd($win, $(', '.join(map(str, $grid_pos())))) +#end if + self.set_$(id)($value) + self._$(id)_chooser.set_value($id) + + Label + label + + string + #if $label() then 'none' else 'part'# + + + Default Value + value + 1 + raw + + + Choices + choices + [1, 2, 3] + raw + + + Labels + labels + [] + raw + + + Type + type + drop_down + enum + + + + + + Style + style + wx.RA_HORIZONTAL + enum + #if $type() == 'radio_buttons' then 'part' else 'all'# + + + + + Grid Position + grid_pos + + grid_pos + + + Notebook + notebook + + notebook + + $value in $choices + not $labels or len($labels) == len($choices) + +This block creates a variable with a drop down, radio buttons, or a button. \ +Leave the label blank to use the variable id as the label. \ +The value index is the index of a particular choice, \ +which defines the default choice when the flow graph starts. \ +The choices must be a list of possible values. \ +Leave labels empty to use the choices as the labels. + +Use the Grid Position (row, column, row span, column span) to position the graphical element in the window. + +Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page. + + diff --git a/gr-wxgui/grc/variable_slider.xml b/gr-wxgui/grc/variable_slider.xml new file mode 100644 index 000000000..09aa4d3d7 --- /dev/null +++ b/gr-wxgui/grc/variable_slider.xml @@ -0,0 +1,139 @@ + + + + WX GUI Slider + variable_slider + Variables + from gnuradio.wxgui import forms + self.$(id) = $(id) = $value + #set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self' +#set $win = '_%s_sizer'%$id +$win = wx.BoxSizer(wx.VERTICAL) +self._$(id)_text_box = forms.text_box( + parent=$(parent).GetWin(), + sizer=$win, + value=self.$id, + callback=self.set_$(id), + #if $label() + label=$label, + #else + label='$id', + #end if + converter=forms.$(converver)(), + proportion=0, +) +self._$(id)_slider = forms.slider( + parent=$(parent).GetWin(), + sizer=$win, + value=self.$id, + callback=self.set_$(id), + minimum=$min, + maximum=$max, + num_steps=$num_steps, + style=$style, + cast=$(converver.slider_cast), + proportion=1, +) +#if not $grid_pos() +$(parent).Add($win) +#else +$(parent).GridAdd($win, $(', '.join(map(str, $grid_pos())))) +#end if + self.set_$(id)($value) + self._$(id)_slider.set_value($id) + self._$(id)_text_box.set_value($id) + + Label + label + + string + #if $label() then 'none' else 'part'# + + + Default Value + value + 50 + real + + + Minimum + min + 0 + real + + + Maximum + max + 100 + real + + + Num Steps + num_steps + 100 + int + part + + + Style + style + wx.SL_HORIZONTAL + enum + part + + + + + Converter + converver + float_converter + enum + + + + + Grid Position + grid_pos + + grid_pos + + + Notebook + notebook + + notebook + + $min <= $value <= $max + $min < $max + 0 < $num_steps <= 1000 + +This block creates a variable with a slider. \ +Leave the label blank to use the variable id as the label. \ +The value must be a real number. \ +The value must be between the minimum and the maximum. \ +The number of steps must be between 0 and 1000. + +Use the Grid Position (row, column, row span, column span) to position the graphical element in the window. + +Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page. + + diff --git a/gr-wxgui/grc/variable_static_text.xml b/gr-wxgui/grc/variable_static_text.xml new file mode 100644 index 000000000..d7bb30eea --- /dev/null +++ b/gr-wxgui/grc/variable_static_text.xml @@ -0,0 +1,98 @@ + + + + WX GUI Static Text + variable_static_text + Variables + from gnuradio.wxgui import forms + self.$(id) = $(id) = $value + #set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self' +#set $win = 'self._%s_static_text'%$id +$win = forms.static_text( + parent=$(parent).GetWin(), + value=self.$id, + callback=self.set_$(id), + #if $label() + label=$label, + #else + label='$id', + #end if + #if $formatter() + converter=forms.$(converver)(formatter=$formatter), + #else + converter=forms.$(converver)(), + #end if +) +#if not $grid_pos() +$(parent).Add($win) +#else +$(parent).GridAdd($win, $(', '.join(map(str, $grid_pos())))) +#end if + self.set_$(id)($value) + self._$(id)_static_text.set_value($id) + + Label + label + + string + #if $label() then 'none' else 'part'# + + + Default Value + value + 0 + raw + + + Converter + converver + float_converter + enum + + + + + + Formatter + formatter + None + raw + part + + + Grid Position + grid_pos + + grid_pos + + + Notebook + notebook + + notebook + + +This block creates a variable with a static text form. \ +Leave the label blank to use the variable id as the label. + +Format should be a function/lambda that converts a value into a string or None for the default formatter. + +Use the Grid Position (row, column, row span, column span) to position the graphical element in the window. + +Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page. + + diff --git a/gr-wxgui/grc/variable_text_box.xml b/gr-wxgui/grc/variable_text_box.xml new file mode 100644 index 000000000..c5416aee7 --- /dev/null +++ b/gr-wxgui/grc/variable_text_box.xml @@ -0,0 +1,102 @@ + + + + WX GUI Text Box + variable_text_box + Variables + from gnuradio.wxgui import forms + self.$(id) = $(id) = $value + #set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self' +#set $win = 'self._%s_text_box'%$id +$win = forms.text_box( + parent=$(parent).GetWin(), + value=self.$id, + callback=self.set_$(id), + #if $label() + label=$label, + #else + label='$id', + #end if + #if $formatter() + converter=forms.$(converver)(formatter=$formatter), + #else + converter=forms.$(converver)(), + #end if +) +#if not $grid_pos() +$(parent).Add($win) +#else +$(parent).GridAdd($win, $(', '.join(map(str, $grid_pos())))) +#end if + self.set_$(id)($value) + self._$(id)_text_box.set_value($id) + + Label + label + + string + #if $label() then 'none' else 'part'# + + + Default Value + value + 0 + raw + + + Converter + converver + float_converter + enum + + + + + + + Formatter + formatter + None + raw + part + + + Grid Position + grid_pos + + grid_pos + + + Notebook + notebook + + notebook + + +This block creates a variable with a text box. \ +Leave the label blank to use the variable id as the label. + +Format should be a function/lambda that converts a value into a string or None for the default formatter. + +Use the Grid Position (row, column, row span, column span) to position the graphical element in the window. + +Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page. + + diff --git a/gr-wxgui/grc/wxgui_constellationsink2.xml b/gr-wxgui/grc/wxgui_constellationsink2.xml new file mode 100644 index 000000000..881c6eba3 --- /dev/null +++ b/gr-wxgui/grc/wxgui_constellationsink2.xml @@ -0,0 +1,139 @@ + + + + WX GUI Constellation Sink + wxgui_constellationsink2 + from gnuradio.wxgui import constsink_gl + #set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self' +constsink_gl.const_sink_c( + $(parent).GetWin(), + title=$title, + sample_rate=$samp_rate, + frame_rate=$frame_rate, + const_size=$const_size, + M=$M, + theta=$theta, + alpha=$alpha, + fmax=$fmax, + mu=$mu, + gain_mu=$gain_mu, + symbol_rate=$symbol_rate, + omega_limit=$omega_limit, +#if $win_size() + size=$win_size, +#end if +) +#if not $grid_pos() +$(parent).Add(self.$(id).win) +#else +$(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos())))) +#end if + set_sample_rate($samp_rate) + + Title + title + Constellation Plot + string + + + Sample Rate + samp_rate + samp_rate + real + + + Frame Rate + frame_rate + 5 + real + + + Constellation Size + const_size + 2048 + real + + + M + M + 4 + int + + + Theta + theta + 0 + real + + + Alpha + alpha + 0.005 + real + + + Max Freq + fmax + 0.06 + real + + + Mu + mu + 0.5 + real + + + Gain Mu + gain_mu + 0.005 + real + + + Symbol Rate + symbol_rate + samp_rate/4. + real + + + Omega Limit + omega_limit + 0.005 + real + + + Window Size + win_size + + int_vector + #if $win_size() then 'none' else 'part'# + + + Grid Position + grid_pos + + grid_pos + + + Notebook + notebook + + notebook + + not $win_size or len($win_size) == 2 + + in + complex + + +Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels. + +Use the Grid Position (row, column, row span, column span) to position the graphical element in the window. + +Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page. + + diff --git a/gr-wxgui/grc/wxgui_fftsink2.xml b/gr-wxgui/grc/wxgui_fftsink2.xml new file mode 100644 index 000000000..b06220d1e --- /dev/null +++ b/gr-wxgui/grc/wxgui_fftsink2.xml @@ -0,0 +1,232 @@ + + + + WX GUI FFT Sink + wxgui_fftsink2 + from gnuradio import window + from gnuradio.wxgui import fftsink2 + #set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self' +fftsink2.$(type.fcn)( + $(parent).GetWin(), + baseband_freq=$baseband_freq, + y_per_div=$y_per_div, + y_divs=$y_divs, + ref_level=$ref_level, + ref_scale=$ref_scale, + sample_rate=$samp_rate, + fft_size=$fft_size, + fft_rate=$fft_rate, + average=$average, + avg_alpha=#if $avg_alpha() then $avg_alpha else 'None'#, + title=$title, + peak_hold=$peak_hold, +#if $win() + win=$win, +#end if +#if $win_size() + size=$win_size, +#end if +) +#if not $grid_pos() +$(parent).Add(self.$(id).win) +#else +$(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos())))) +#end if + set_baseband_freq($baseband_freq) + set_sample_rate($samp_rate) + + Type + type + complex + enum + + + + + Title + title + FFT Plot + string + + + Sample Rate + samp_rate + samp_rate + real + + + Baseband Freq + baseband_freq + 0 + real + + + Y per Div + y_per_div + 10 + enum + + + + + + + + Y Divs + y_divs + 10 + int + + + Ref Level (dB) + ref_level + 50 + real + + + Ref Scale (p2p) + ref_scale + 2.0 + real + + + FFT Size + fft_size + 1024 + int + + + Refresh Rate + fft_rate + 30 + int + + + Peak Hold + peak_hold + False + enum + #if $peak_hold() == 'True' then 'none' else 'part'# + + + + + Average + average + False + enum + part + + + + + Average Alpha + avg_alpha + 0 + real + #if $average() == 'True' then 'none' else 'all'# + + + Window + win + None + raw + #if $win() is None then 'part' else 'none'# + + + + + + + + + Window Size + win_size + + int_vector + #if $win_size() then 'none' else 'part'# + + + Grid Position + grid_pos + + grid_pos + + + Notebook + notebook + + notebook + + not $win_size or len($win_size) == 2 + + in + $type + + +Set Average Alpha to 0 for automatic setting. + +Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels. + +Use the Grid Position (row, column, row span, column span) to position the graphical element in the window. + +Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page. + + diff --git a/gr-wxgui/grc/wxgui_histosink2.xml b/gr-wxgui/grc/wxgui_histosink2.xml new file mode 100644 index 000000000..2f475fe2e --- /dev/null +++ b/gr-wxgui/grc/wxgui_histosink2.xml @@ -0,0 +1,77 @@ + + + + WX GUI Histo Sink + wxgui_histosink2 + from gnuradio.wxgui import histosink_gl + #set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self' +histosink_gl.histo_sink_f( + $(parent).GetWin(), + title=$title, + num_bins=$num_bins, + frame_size=$frame_size, +#if $win_size() + size=$win_size, +#end if +) +#if not $grid_pos() +$(parent).Add(self.$(id).win) +#else +$(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos())))) +#end if + set_num_bins($num_bins) + set_frame_size($frame_size) + + Title + title + Histogram Plot + string + + + Num Bins + num_bins + 27 + int + + + Frame Size + frame_size + 1000 + int + + + Window Size + win_size + + int_vector + #if $win_size() then 'none' else 'part'# + + + Grid Position + grid_pos + + grid_pos + + + Notebook + notebook + + notebook + + not $win_size or len($win_size) == 2 + + in + float + + +Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels. + +Use the Grid Position (row, column, row span, column span) to position the graphical element in the window. + +Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page. + + diff --git a/gr-wxgui/grc/wxgui_numbersink2.xml b/gr-wxgui/grc/wxgui_numbersink2.xml new file mode 100644 index 000000000..b3b4cb254 --- /dev/null +++ b/gr-wxgui/grc/wxgui_numbersink2.xml @@ -0,0 +1,192 @@ + + + + WX GUI Number Sink + wxgui_numbersink2 + from gnuradio.wxgui import numbersink2 + #set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self' +numbersink2.$(type.fcn)( + $(parent).GetWin(), + unit=$units, + minval=$min_value, + maxval=$max_value, + factor=$factor, + decimal_places=$decimal_places, + ref_level=$ref_level, + sample_rate=$samp_rate, + number_rate=$number_rate, + average=$average, + avg_alpha=#if $avg_alpha() then $avg_alpha else 'None'#, + label=$title, + peak_hold=$peak_hold, + show_gauge=$show_gauge, +#if $win_size() + size=$win_size, +#end if +) +#if not $grid_pos() +$(parent).Add(self.$(id).win) +#else +$(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos())))) +#end if + + Type + type + complex + enum + + + + + Title + title + Number Plot + string + + + Units + units + Units + string + + + Sample Rate + samp_rate + samp_rate + real + + + Min Value + min_value + -100 + real + + + Max Value + max_value + 100 + real + + + Factor + factor + 1.0 + real + + + Decimal Places + decimal_places + 10 + int + + + Reference Level + ref_level + 0 + real + + + Number Rate + number_rate + 15 + int + + + Peak Hold + peak_hold + False + enum + #if $peak_hold() == 'True' then 'none' else 'part'# + + + + + Average + average + False + enum + part + + + + + Average Alpha + avg_alpha + 0 + real + #if $average() == 'True' then 'none' else 'all'# + + + Show Gauge + show_gauge + True + enum + + + + + Window Size + win_size + + int_vector + #if $win_size() then 'none' else 'part'# + + + Grid Position + grid_pos + + grid_pos + + + Notebook + notebook + + notebook + + not $win_size or len($win_size) == 2 + + in + $type + + +Set Average Alpha to 0 for automatic setting. + +Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels. + +Use the Grid Position (row, column, row span, column span) to position the graphical element in the window. + +Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page. + +Incoming numbers are multiplied by the factor, and then added-to by the reference level. + + diff --git a/gr-wxgui/grc/wxgui_scopesink2.xml b/gr-wxgui/grc/wxgui_scopesink2.xml new file mode 100644 index 000000000..43922f45e --- /dev/null +++ b/gr-wxgui/grc/wxgui_scopesink2.xml @@ -0,0 +1,186 @@ + + + + WX GUI Scope Sink + wxgui_scopesink2 + from gnuradio.wxgui import scopesink2 + from gnuradio import gr + #set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self' +scopesink2.$(type.fcn)( + $(parent).GetWin(), + title=$title, + sample_rate=$samp_rate, + v_scale=$v_scale, + v_offset=$v_offset, + t_scale=$t_scale, + ac_couple=$ac_couple, + xy_mode=$xy_mode, + num_inputs=$num_inputs, + trig_mode=$trig_mode, + y_axis_label=$y_axis_label, +#if $win_size() + size=$win_size, +#end if +) +#if not $grid_pos() +$(parent).Add(self.$(id).win) +#else +$(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos())))) +#end if + set_sample_rate($samp_rate) + + Type + type + complex + enum + + + + + Title + title + Scope Plot + string + + + Sample Rate + samp_rate + samp_rate + real + + + V Scale + v_scale + 0 + real + #if $v_scale() then 'none' else 'part'# + + + V Offset + v_offset + 0 + real + #if $v_offset() then 'none' else 'part'# + + + T Scale + t_scale + 0 + real + #if $t_scale() then 'none' else 'part'# + + + AC Couple + ac_couple + False + bool + #if $ac_couple() then 'none' else 'part'# + + + + + XY Mode + xy_mode + False + enum + #if $xy_mode() == 'True' then 'none' else 'part'# + + + + + Num Inputs + num_inputs + 1 + int + + + Window Size + win_size + + int_vector + #if $win_size() then 'none' else 'part'# + + + Grid Position + grid_pos + + grid_pos + + + Notebook + notebook + + notebook + + + Trigger Mode + trig_mode + enum + + + + + + + Y Axis Label + y_axis_label + Counts + string + + not $win_size or len($win_size) == 2 + not $xy_mode or '$type' == 'complex' or $num_inputs != 1 + + in + $type + $num_inputs + + +Set the V Scale to 0 for the scope to auto-scale. + +Set the T Scale to 0 for automatic setting. + +XY Mode allows the scope to initialize as an XY plotter. + +Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels. + +Use the Grid Position (row, column, row span, column span) to position the graphical element in the window. + +Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page. + + diff --git a/gr-wxgui/grc/wxgui_termsink.xml b/gr-wxgui/grc/wxgui_termsink.xml new file mode 100644 index 000000000..ae15b98a6 --- /dev/null +++ b/gr-wxgui/grc/wxgui_termsink.xml @@ -0,0 +1,55 @@ + + + + WX GUI Terminal Sink + wxgui_termsink + + from gnuradio.wxgui import termsink + + #set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self' +termsink.termsink( + parent=$(parent).GetWin(), +#if $win_size() + size=$win_size, +#end if + msgq=$(id)_msgq_in, +) +#if not $grid_pos() +$(parent).Add(self.$(id)) +#else +$(parent).GridAdd(self.$(id), $(', '.join(map(str, $grid_pos())))) +#end if + + + Window Size + win_size + + int_vector + #if $win_size() then 'none' else 'part'# + + + Grid Position + grid_pos + + grid_pos + + + + Notebook + notebook + + notebook + + + not $win_size or len($win_size) == 2 + + + in + msg + + + diff --git a/gr-wxgui/grc/wxgui_waterfallsink2.xml b/gr-wxgui/grc/wxgui_waterfallsink2.xml new file mode 100644 index 000000000..9789994be --- /dev/null +++ b/gr-wxgui/grc/wxgui_waterfallsink2.xml @@ -0,0 +1,189 @@ + + + + WX GUI Waterfall Sink + wxgui_waterfallsink2 + from gnuradio import window + from gnuradio.wxgui import waterfallsink2 + #set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self' +waterfallsink2.$(type.fcn)( + $(parent).GetWin(), + baseband_freq=$baseband_freq, + dynamic_range=$dynamic_range, + ref_level=$ref_level, + ref_scale=$ref_scale, + sample_rate=$samp_rate, + fft_size=$fft_size, + fft_rate=$fft_rate, + average=$average, + avg_alpha=#if $avg_alpha() then $avg_alpha else 'None'#, + title=$title, +#if $win() + win=$win, +#end if +#if $win_size() + size=$win_size, +#end if +) +#if not $grid_pos() +$(parent).Add(self.$(id).win) +#else +$(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos())))) +#end if + set_baseband_freq($baseband_freq) + set_sample_rate($samp_rate) + + Type + type + complex + enum + + + + + Title + title + Waterfall Plot + string + + + Sample Rate + samp_rate + samp_rate + real + + + Baseband Freq + baseband_freq + 0 + real + + + Dynamic Range + dynamic_range + 100 + real + + + Reference Level + ref_level + 50 + real + + + Ref Scale (p2p) + ref_scale + 2.0 + real + + + FFT Size + fft_size + 512 + int + + + FFT Rate + fft_rate + 15 + int + + + Average + average + False + enum + part + + + + + Average Alpha + avg_alpha + 0 + real + #if $average() == 'True' then 'none' else 'all'# + + + Window + win + None + raw + #if $win() is None then 'part' else 'none'# + + + + + + + + + Window Size + win_size + + int_vector + #if $win_size() then 'none' else 'part'# + + + Grid Position + grid_pos + + grid_pos + + + Notebook + notebook + + notebook + + not $win_size or len($win_size) == 2 + + in + $type + + +Set Average Alpha to 0 for automatic setting. + +Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels. + +Use the Grid Position (row, column, row span, column span) to position the graphical element in the window. + +Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page. + + -- cgit