options: parameters: author: '' catch_exceptions: 'True' category: '[GRC Hier Blocks]' cmake_opt: '' comment: '' copyright: '' description: '' gen_cmake: 'On' gen_linking: dynamic generate_options: qt_gui hier_block_src_path: '.:' id: waterfall max_nouts: '0' output_language: python placement: (0,0) qt_qss_theme: '' realtime_scheduling: '' run: 'True' run_command: '{python} -u {filename}' run_options: prompt sizing_mode: fixed thread_safe_setters: '' title: Not titled yet window_size: (1000,1000) states: bus_sink: false bus_source: false bus_structure: null coordinate: [8, 8] rotation: 0 state: enabled blocks: - name: btn_guard_fm_output id: variable_struct parameters: comment: '' field0: TYPE field1: Pressed field10: '' field11: '' field12: '' field13: '' field14: '' field15: '' field16: '' field17: '' field18: '' field19: '' field2: Released field3: GUIHint field4: CALLBACK field5: Label field6: '' field7: '' field8: '' field9: '' value0: '"QT GUI Toggle Button"' value1: 'True' value10: '0' value11: '0' value12: '0' value13: '0' value14: '0' value15: '0' value16: '0' value17: '0' value18: '0' value19: '0' value2: 'False' value3: '"ranges@1"' value4: '"tb.epy_block_0.set"' value5: '"Listen"' value6: '0' value7: '0' value8: '0' value9: '0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [744, 524.0] rotation: 0 state: enabled - name: btn_guard_fm_output_0 id: variable_struct parameters: comment: '' field0: TYPE field1: Pressed field10: '' field11: '' field12: '' field13: '' field14: '' field15: '' field16: '' field17: '' field18: '' field19: '' field2: Released field3: GUIHint field4: CALLBACK field5: Label field6: '' field7: '' field8: '' field9: '' value0: '"QT GUI Toggle Button"' value1: 'True' value10: '0' value11: '0' value12: '0' value13: '0' value14: '0' value15: '0' value16: '0' value17: '0' value18: '0' value19: '0' value2: 'False' value3: '"ranges@0"' value4: '"tb.epy_block_0_0.set"' value5: "\"Listen \u0410\u041C\"" value6: '0' value7: '0' value8: '0' value9: '0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [424, 652.0] rotation: 0 state: enabled - name: freq id: variable parameters: comment: '' value: freq_slider*1e6+freq_slider_fine*1e6 states: bus_sink: false bus_source: false bus_structure: null coordinate: [32, 284.0] rotation: 0 state: enabled - name: freq_slider id: variable parameters: comment: '' value: '88' states: bus_sink: false bus_source: false bus_structure: null coordinate: [328, 348.0] rotation: 0 state: enabled - name: freq_slider_all id: variable_struct parameters: comment: '' field0: TYPE field1: Label field10: '' field11: '' field12: '' field13: '' field14: '' field15: '' field16: '' field17: '' field18: '' field19: '' field2: DefaultValue field3: Start field4: Stop field5: Step field6: GUIHint field7: CALLBACK field8: '' field9: '' value0: '"QT GUI Range"' value1: '"MHZ"' value10: '0' value11: '0' value12: '0' value13: '0' value14: '0' value15: '0' value16: '0' value17: '0' value18: '0' value19: '0' value2: '24' value3: '24' value4: '1766' value5: '1' value6: '"ranges@0"' value7: '"tb.set_freq_slider"' value8: '0' value9: '0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [424, 348.0] rotation: 0 state: enabled - name: freq_slider_fine id: variable_qtgui_range parameters: comment: '' gui_hint: ranges@0 label: khz min_len: '200' orient: QtCore.Qt.Horizontal rangeType: float start: '-0.9' step: '0.01' stop: '0.9' value: '0' widget: counter_slider states: bus_sink: false bus_source: false bus_structure: null coordinate: [424, 524.0] rotation: 0 state: enabled - name: freq_slider_fm id: variable_struct parameters: comment: '' field0: TYPE field1: Label field10: '' field11: '' field12: '' field13: '' field14: '' field15: '' field16: '' field17: '' field18: '' field19: '' field2: DefaultValue field3: Start field4: Stop field5: Step field6: GUIHint field7: CALLBACK field8: '' field9: '' value0: '"QT GUI Range"' value1: '"MHZ"' value10: '0' value11: '0' value12: '0' value13: '0' value14: '0' value15: '0' value16: '0' value17: '0' value18: '0' value19: '0' value2: '88' value3: '87.5' value4: '108' value5: '0.1' value6: '"ranges@1"' value7: '"tb.set_freq_slider"' value8: '0' value9: '0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [744, 348.0] rotation: 0 state: enabled - name: samp_rate id: variable parameters: comment: '' value: 2.4*1e6 states: bus_sink: false bus_source: false bus_structure: null coordinate: [32, 220.0] rotation: 0 state: enabled - name: variable_qtgui_label_0 id: variable_qtgui_label parameters: comment: '' formatter: None gui_hint: '' label: Center Frequency type: real value: freq states: bus_sink: false bus_source: false bus_structure: null coordinate: [424, 92.0] rotation: 0 state: enabled - name: analog_am_demod_cf_0 id: analog_am_demod_cf parameters: affinity: '' alias: '' audio_decim: '1' audio_pass: '5000' audio_stop: '5500' chan_rate: 0.048*1e6 comment: '' maxoutbuf: '0' minoutbuf: '0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1672, 340.0] rotation: 0 state: enabled - name: analog_fm_demod_cf_0 id: analog_fm_demod_cf parameters: affinity: '' alias: '' audio_decim: '10' audio_pass: '15000' audio_stop: '16000' chan_rate: samp_rate/5 comment: '' deviation: '75000' gain: '1.0' maxoutbuf: '0' minoutbuf: '0' tau: 75e-6 states: bus_sink: false bus_source: false bus_structure: null coordinate: [1664, 100.0] rotation: 0 state: enabled - name: analog_wfm_rcv_0 id: analog_wfm_rcv parameters: affinity: '' alias: '' audio_decimation: '10' comment: '' maxoutbuf: '0' minoutbuf: '0' quad_rate: samp_rate/5 states: bus_sink: false bus_source: false bus_structure: null coordinate: [1656, 12.0] rotation: 0 state: disabled - name: audio_sink_0 id: audio_sink parameters: affinity: '' alias: '' comment: '' device_name: '' num_inputs: '1' ok_to_block: 'True' samp_rate: '48000' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1968, 152.0] rotation: 0 state: enabled - name: audio_sink_1 id: audio_sink parameters: affinity: '' alias: '' comment: '' device_name: '' num_inputs: '1' ok_to_block: 'True' samp_rate: '48000' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1968, 372.0] rotation: 0 state: enabled - name: blocks_multiply_const_vxx_0 id: blocks_multiply_const_vxx parameters: affinity: '' alias: '' comment: '' const: '20' maxoutbuf: '0' minoutbuf: '0' type: complex vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1592, 524.0] rotation: 0 state: enabled - name: epy_block_0 id: epy_block parameters: _source_code: "import numpy as np\nfrom gnuradio import gr\n\nclass FMDemodulateGuard(gr.sync_block):\n\ \tdef __init__(self):\n\t\t\"\"\"arguments to this function show up as parameters\ \ in GRC\"\"\"\n\t\tgr.sync_block.__init__(\n\t\t\tself,\n\t\t\tname='FM Demodulate\ \ guard', # will show up in GRC\n\t\t\tin_sig=[np.complex64],\n\t\t\tout_sig=[np.complex64]\n\ \t\t)\n\t\tself.passthrough = False\n\n\tdef set(self, value):\n\t\tself.passthrough\ \ = value\n\t\tprint(self.passthrough)\n\n\tdef work(self, input_items, output_items):\n\ \t\tif self.passthrough:\n\t\t\toutput_items[0][:] = input_items[0]\n\t\telse:\n\ \t\t\toutput_items[0][:] = np.array([0+0j])\n\t\treturn len(output_items[0])\n" affinity: '' alias: '' comment: '' maxoutbuf: '0' minoutbuf: '0' states: _io_cache: ('FM Demodulate guard', 'FMDemodulateGuard', [], [('0', 'complex', 1)], [('0', 'complex', 1)], 'arguments to this function show up as parameters in GRC', []) bus_sink: false bus_source: false bus_structure: null coordinate: [1096, 152.0] rotation: 0 state: enabled - name: epy_block_0_0 id: epy_block parameters: _source_code: "import numpy as np\nfrom gnuradio import gr\n\nclass \u0410\u041C\ DemodulateGuard(gr.sync_block):\n\tdef __init__(self):\n\t\t\"\"\"arguments\ \ to this function show up as parameters in GRC\"\"\"\n\t\tgr.sync_block.__init__(\n\ \t\t\tself,\n\t\t\tname='\u0410\u041C Demodulate guard', # will show up in\ \ GRC\n\t\t\tin_sig=[np.complex64],\n\t\t\tout_sig=[np.complex64]\n\t\t)\n\t\ \tself.passthrough = False\n\n\tdef set(self, value):\n\t\tself.passthrough\ \ = value\n\t\tprint(self.passthrough)\n\n\tdef work(self, input_items, output_items):\n\ \t\tif self.passthrough:\n\t\t\toutput_items[0][:] = input_items[0]\n\t\telse:\n\ \t\t\toutput_items[0][:] = np.array([0+0j])\n\t\treturn len(output_items[0])\n" affinity: '' alias: '' comment: '' maxoutbuf: '0' minoutbuf: '0' states: _io_cache: "('\u0410\u041C Demodulate guard', '\u0410\u041CDemodulateGuard', [],\ \ [('0', 'complex', 1)], [('0', 'complex', 1)], 'arguments to this function\ \ show up as parameters in GRC', [])" bus_sink: false bus_source: false bus_structure: null coordinate: [1096, 224.0] rotation: 0 state: enabled - name: low_pass_filter_0 id: low_pass_filter parameters: affinity: '' alias: '' beta: '6.76' comment: '' cutoff_freq: 0.05*1e6 decim: '5' gain: '1' interp: '1' maxoutbuf: '0' minoutbuf: '0' samp_rate: samp_rate type: fir_filter_ccf width: 0.01*1e6 win: window.WIN_HAMMING states: bus_sink: false bus_source: false bus_structure: null coordinate: [1360, 108.0] rotation: 0 state: enabled - name: low_pass_filter_0_0 id: low_pass_filter parameters: affinity: '' alias: '' beta: '6.76' comment: '' cutoff_freq: 0.006*1e6 decim: '50' gain: '1' interp: '1' maxoutbuf: '0' minoutbuf: '0' samp_rate: samp_rate type: fir_filter_ccf width: 0.002*1e6 win: window.WIN_HAMMING states: bus_sink: false bus_source: false bus_structure: null coordinate: [1376, 324.0] rotation: 0 state: enabled - name: qtgui_freq_sink_x_0 id: qtgui_freq_sink_x parameters: affinity: '' alias: '' alpha1: '1.0' alpha10: '1.0' alpha2: '1.0' alpha3: '1.0' alpha4: '1.0' alpha5: '1.0' alpha6: '1.0' alpha7: '1.0' alpha8: '1.0' alpha9: '1.0' autoscale: 'False' average: '1.0' axislabels: 'False' bw: samp_rate/50 color1: '"blue"' color10: '"dark blue"' color2: '"red"' color3: '"green"' color4: '"black"' color5: '"cyan"' color6: '"magenta"' color7: '"yellow"' color8: '"dark red"' color9: '"dark green"' comment: '' ctrlpanel: 'False' fc: '0' fftsize: '1024' freqhalf: 'True' grid: 'False' gui_hint: ranges@1 label: Relative Gain label1: '' label10: '''''' label2: '''''' label3: '''''' label4: '''''' label5: '''''' label6: '''''' label7: '''''' label8: '''''' label9: '''''' legend: 'False' maxoutbuf: '0' minoutbuf: '0' name: '""' nconnections: '1' norm_window: 'False' showports: 'False' tr_chan: '0' tr_level: '0.0' tr_mode: qtgui.TRIG_MODE_FREE tr_tag: '""' type: float units: dB update_time: '0.10' width1: '1' width10: '1' width2: '1' width3: '1' width4: '1' width5: '1' width6: '1' width7: '1' width8: '1' width9: '1' wintype: window.WIN_BLACKMAN_hARRIS ymax: '10' ymin: '-140' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1968, 228.0] rotation: 0 state: enabled - name: qtgui_waterfall_sink_x_0 id: qtgui_waterfall_sink_x parameters: affinity: '' alias: '' alpha1: '1.0' alpha10: '1.0' alpha2: '1.0' alpha3: '1.0' alpha4: '1.0' alpha5: '1.0' alpha6: '1.0' alpha7: '1.0' alpha8: '1.0' alpha9: '1.0' axislabels: 'True' bw: samp_rate color1: '0' color10: '0' color2: '0' color3: '0' color4: '0' color5: '0' color6: '0' color7: '0' color8: '0' color9: '0' comment: '' fc: freq fftsize: '1024' freqhalf: 'True' grid: 'True' gui_hint: '' int_max: '10' int_min: '-140' label1: '' label10: '' label2: '' label3: '' label4: '' label5: '' label6: '' label7: '' label8: '' label9: '' legend: 'True' maxoutbuf: '0' minoutbuf: '0' name: '""' nconnections: '1' showports: 'False' type: complex update_time: '0.02' wintype: window.WIN_BLACKMAN_hARRIS states: bus_sink: false bus_source: false bus_structure: null coordinate: [416, 12.0] rotation: 0 state: enabled - name: ranges id: qtgui_tab_widget parameters: alias: '' comment: '' gui_hint: '' label0: All label1: FM label10: Tab 10 label11: Tab 11 label12: Tab 12 label13: Tab 13 label14: Tab 14 label15: Tab 15 label16: Tab 16 label17: Tab 17 label18: Tab 18 label19: Tab 19 label2: Tab 2 label3: Tab 3 label4: Tab 4 label5: Tab 5 label6: Tab 6 label7: Tab 7 label8: Tab 8 label9: Tab 9 num_tabs: '2' states: bus_sink: false bus_source: false bus_structure: null coordinate: [424, 252.0] rotation: 0 state: enabled - name: snippet_0 id: snippet parameters: alias: '' code: "if 'QtCore' not in sys.modules:\n\tfrom PyQt5 import QtCore\n# Libraries\n\ def init_lib(lib):\n\tlib.tb = self\n\tlib.Qt = Qt\n\tlib.QtCore = QtCore\n\t\ lib.qtgui = qtgui\ninit_lib(userlib)\n# Components (modules which aren't libraries)\n\ def init_module(module):\n\tmodule.tb = self\n\tmodule.Qt = Qt\n\tmodule.userlib\ \ = userlib\n\tmodule.init()\ninit_module(struct_widgets)" comment: Inits user modules priority: '0' section: main_after_init states: bus_sink: false bus_source: false bus_structure: null coordinate: [32, 548.0] rotation: 0 state: enabled - name: soapy_rtlsdr_source_0 id: soapy_rtlsdr_source parameters: affinity: '' agc: 'False' alias: '' bias: 'False' bufflen: '16384' center_freq: freq comment: '' dev_args: '' freq_correction: '0' gain: '20' maxoutbuf: '0' minoutbuf: '0' samp_rate: samp_rate type: fc32 states: bus_sink: false bus_source: false bus_structure: null coordinate: [32, 156.0] rotation: 0 state: enabled - name: struct_widgets id: epy_module parameters: alias: '' comment: 'Struct Variables with an attribute "TYPE" will be used for the creation of a QT widget by the same name.' source_code: "def init():\n\tfor name,struct in vars(tb).items():\n\t\tif hasattr(struct,\ \ 'TYPE'):\n\t\t\tmatch struct.TYPE:\n\t\t\t\tcase 'QT GUI Range':\n\t\t\t\t\ \tuserlib.new_widget_cs(\n\t\t\t\t\t\teval(getattr(struct, 'CALLBACK', \"lambda:\ \ default_callback(name)\")),\n\t\t\t\t\t\tgetattr(struct, 'Label', name),\n\ \t\t\t\t\t\tgetattr(struct, 'DefaultValue', 50),\n\t\t\t\t\t\tgetattr(struct,\ \ 'Start', 0),\n\t\t\t\t\t\tgetattr(struct, 'Stop', 100),\n\t\t\t\t\t\tgetattr(struct,\ \ 'Step', 1),\n\t\t\t\t\t\tgetattr(struct, 'MinLen', 200),\n\t\t\t\t\t\tgetattr(struct,\ \ 'GUIHint', \"\")\n\t\t\t\t\t)\n\t\t\t\tcase 'QT GUI Toggle Button':\n\t\t\t\ \t\tuserlib.new_toggle_button(\n\t\t\t\t\t\teval(getattr(struct, 'CALLBACK',\ \ f'lambda _: default_callback(\"{name}\")')),\n\t\t\t\t\t\tgetattr(struct,\ \ 'Label', name),\n\t\t\t\t\t\tgetattr(struct, 'Pressed', 1),\n\t\t\t\t\t\t\ getattr(struct, 'Released', 0),\n\t\t\t\t\t\tgetattr(struct, 'InitiallyPressed',\ \ False),\n\t\t\t\t\t\tgetattr(struct, 'GUIHint', \"\")\n\t\t\t\t\t)\n\t\t\t\ \tcase _:\n\t\t\t\t\traise ValueError(f'Unknown TYPE \"{struct.TYPE}\"!')\n\n\ def default_callback(name):\n\tprint(f'Callback for \"{name}\" was issued!')\n" states: bus_sink: false bus_source: false bus_structure: null coordinate: [32, 708.0] rotation: 0 state: enabled - name: userlib id: epy_module parameters: alias: '' comment: Defines useful functions source_code: "def new_button(id, callback):\n\t_btn = Qt.QPushButton(id)\n\t_btn.released.connect(callback)\n\ \ttb.top_layout.addWidget(_btn)\n\ndef new_widget_cs(callback, label, default,\ \ start, stop, step, min_len, hint):\n\t_range = qtgui.Range(start, stop, step,\ \ default, min_len)\n\t_slider_win = qtgui.RangeWidget(_range, callback, label,\ \ \"counter_slider\", float, QtCore.Qt.Horizontal)\n\tadd_widget_from_hint(_slider_win,\ \ hint)\n\ndef new_toggle_button(callback, label, pressed, released, initially_pressed,\ \ hint):\n\t\t_button = qtgui.ToggleButton(\n\t\t\tcallback, \n\t\t\tlabel,\n\ \t\t\t{'Pressed': pressed, 'Released': released},\n\t\t\tinitially_pressed,\n\ \t\t\t'value')\n\t\t_button.setColors(\"default\", \"default\", \"default\"\ , \"default\")\n\n\t\tadd_widget_from_hint(_button, hint)\n\ndef add_widget_from_hint(widget,\ \ hint):\n\tif hint == \"\" or hint == None:\n\t\treturn tb.top_layout.addWidget(widget)\n\ \n\ttabs = hint.split('@')\n\tif len(tabs) == 2:\n\t\tgetattr(tb, tabs[0] +\ \ '_layout_' + tabs[1], None).addWidget(widget)\n\telse:\n\t\traise ValueError(f'Invalid\ \ GUI hint \"{hint}\"!')\n" states: bus_sink: false bus_source: false bus_structure: null coordinate: [32, 636.0] rotation: 0 state: enabled connections: - [analog_am_demod_cf_0, '0', audio_sink_1, '0'] - [analog_fm_demod_cf_0, '0', audio_sink_0, '0'] - [analog_fm_demod_cf_0, '0', qtgui_freq_sink_x_0, '0'] - [analog_wfm_rcv_0, '0', audio_sink_0, '0'] - [analog_wfm_rcv_0, '0', qtgui_freq_sink_x_0, '0'] - [blocks_multiply_const_vxx_0, '0', analog_am_demod_cf_0, '0'] - [epy_block_0, '0', low_pass_filter_0, '0'] - [epy_block_0_0, '0', low_pass_filter_0_0, '0'] - [low_pass_filter_0, '0', analog_fm_demod_cf_0, '0'] - [low_pass_filter_0, '0', analog_wfm_rcv_0, '0'] - [low_pass_filter_0_0, '0', blocks_multiply_const_vxx_0, '0'] - [soapy_rtlsdr_source_0, '0', epy_block_0, '0'] - [soapy_rtlsdr_source_0, '0', epy_block_0_0, '0'] - [soapy_rtlsdr_source_0, '0', qtgui_waterfall_sink_x_0, '0'] metadata: file_format: 1 grc_version: 3.10.12.0