options: parameters: author: '' category: '[GRC Hier Blocks]' cmake_opt: '' comment: '' copyright: '' description: '' gen_cmake: 'On' gen_linking: dynamic generate_options: qt_gui hier_block_src_path: '.:' id: plot 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: BAUMAX 13-26006/20 Xmas Tree Lights Remote Control Receiver window_size: '' states: bus_sink: false bus_source: false bus_structure: null coordinate: [40, 27] rotation: 0 state: enabled blocks: - name: sample_rate_hz id: variable parameters: comment: '' value: '11678.3' states: bus_sink: false bus_source: false bus_structure: null coordinate: [485, 40] rotation: 0 state: enabled - name: symbol_rate_hz id: variable parameters: comment: '' value: 1/0.0008361370370370364 states: bus_sink: false bus_source: false bus_structure: null coordinate: [784, 41] rotation: 0 state: true - name: blocks_message_debug_0 id: blocks_message_debug parameters: affinity: '' alias: '' comment: '' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1158, 622] rotation: 0 state: true - name: blocks_probe_rate_0 id: blocks_probe_rate parameters: affinity: '' alias: '' alpha: '0.15' comment: '' maxoutbuf: '0' minoutbuf: '0' mintime: '10000.0' type: byte vlen: '1' states: bus_sink: false bus_source: false bus_structure: null coordinate: [565, 586] rotation: 0 state: true - name: blocks_uchar_to_float_0 id: blocks_uchar_to_float parameters: affinity: '' alias: '' comment: '' maxoutbuf: '0' minoutbuf: '0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [629, 408] rotation: 0 state: enabled - name: digital_symbol_sync_xx_0 id: digital_symbol_sync_xx parameters: affinity: '' alias: '' comment: '' constellation: digital.constellation_bpsk().base() damping: '1.0' loop_bw: '0.045' max_dev: '1.5' maxoutbuf: '0' minoutbuf: '0' nfilters: '128' osps: '1' pfb_mf_taps: '[]' resamp_type: digital.IR_MMSE_8TAP sps: sample_rate_hz * 0.0008361370370370364 ted_gain: '1.0' ted_type: digital.TED_MUELLER_AND_MULLER type: ff states: bus_sink: false bus_source: false bus_structure: null coordinate: [893, 284] rotation: 0 state: enabled - name: qtgui_time_raster_sink_x_0 id: qtgui_time_raster_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' color1: '2' color10: '0' color2: '0' color3: '0' color4: '0' color5: '0' color6: '0' color7: '0' color8: '0' color9: '0' comment: '' grid: 'True' gui_hint: '' label1: '' label10: '' label2: '' label3: '' label4: '' label5: '' label6: '' label7: '' label8: '' label9: '' mult: '[]' name: '"Signal"' ncols: int(sample_rate_hz) nconnections: '1' nrows: '60' offset: '[]' samp_rate: sample_rate_hz type: byte update_time: '0.10' zmax: '1' zmin: '0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [557, 186] rotation: 0 state: enabled - name: qtgui_time_raster_sink_x_0_0 id: qtgui_time_raster_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' color1: '2' color10: '0' color2: '0' color3: '0' color4: '0' color5: '0' color6: '0' color7: '0' color8: '0' color9: '0' comment: '' grid: 'True' gui_hint: '' label1: '' label10: '' label2: '' label3: '' label4: '' label5: '' label6: '' label7: '' label8: '' label9: '' mult: '[]' name: '"Data"' ncols: int(symbol_rate_hz) nconnections: '1' nrows: '60' offset: '[]' samp_rate: symbol_rate_hz type: float update_time: '0.10' zmax: '1' zmin: '0' states: bus_sink: false bus_source: false bus_structure: null coordinate: [1587, 296] rotation: 0 state: enabled - name: serial_source_block id: epy_block parameters: _source_code: "import gnuradio\nimport numpy\nimport serial\n\n\nclass SerialSourceBlock(gnuradio.gr.sync_block):\n\ \ def __init__(\n self,\n port=\"/dev/ttyUSB1\",\n baud_rate=115200,\n\ \ buffer_max_length=10,\n timeout=2,\n invert=False,\n\ \ ):\n # pylint: disable=too-many-arguments\n gnuradio.gr.sync_block.__init__(\n\ \ self, name=\"Serial Source Block\", in_sig=None, out_sig=[numpy.uint8]\n\ \ )\n self._serial_port = serial.Serial(\n port=port,\ \ baudrate=baud_rate, bytesize=serial.EIGHTBITS, timeout=timeout\n )\n\ \ # remove first bytes that may have unexpected values > 1, unclear why\n\ \ # seen [0b110000000, 0] and [0, 0b11111110] so far\n self._serial_port.read(2)\n\ \ self._buffer_max_length = buffer_max_length\n self._invert =\ \ invert\n\n def work(self, input_items, output_items):\n # pylint:\ \ disable=unused-argument\n buffer = self._serial_port.read(\n \ \ min(len(output_items[0]), self._buffer_max_length)\n )\n \ \ output_items[0][: len(buffer)] = numpy.frombuffer(buffer, dtype=\"u1\")\n\ \ if output_items[0][: len(buffer)].max() > 1:\n raise ValueError(output_items[0][:\ \ len(buffer)])\n if self._invert:\n output_items[0] ^= 1\n\ \ return len(buffer)\n" affinity: '' alias: '' baud_rate: '115200' buffer_max_length: int(sample_rate_hz/4) comment: '' invert: 'True' maxoutbuf: '0' minoutbuf: '0' port: '''/dev/ttyUSB1''' timeout: '2' states: _io_cache: ('Serial Source Block', 'SerialSourceBlock', [('port', "'/dev/ttyUSB1'"), ('baud_rate', '115200'), ('buffer_max_length', '10'), ('timeout', '2'), ('invert', 'False')], [], [('0', 'byte', 1)], '', []) bus_sink: false bus_source: false bus_structure: null coordinate: [28, 170] rotation: 0 state: true connections: - [blocks_probe_rate_0, rate, blocks_message_debug_0, print] - [blocks_uchar_to_float_0, '0', digital_symbol_sync_xx_0, '0'] - [digital_symbol_sync_xx_0, '0', qtgui_time_raster_sink_x_0_0, '0'] - [serial_source_block, '0', blocks_probe_rate_0, '0'] - [serial_source_block, '0', blocks_uchar_to_float_0, '0'] - [serial_source_block, '0', qtgui_time_raster_sink_x_0, '0'] metadata: file_format: 1