diff --git a/apps/fft-multi-decoder_fixed_hackrf.grc b/apps/fft-multi-decoder_fixed_hackrf.grc index 17ba717..73a2868 100644 --- a/apps/fft-multi-decoder_fixed_hackrf.grc +++ b/apps/fft-multi-decoder_fixed_hackrf.grc @@ -2014,7 +2014,7 @@ _enabled - 1 + 0 _coordinate @@ -2061,7 +2061,7 @@ _enabled - 1 + 0 _coordinate @@ -2108,7 +2108,7 @@ _enabled - 1 + 0 _coordinate @@ -2139,6 +2139,147 @@ 75e-6 + + analog_fm_deemph + + alias + + + + comment + + + + affinity + + + + _enabled + 1 + + + _coordinate + (1781, 1106) + + + _rotation + 0 + + + id + analog_fm_deemph_0_0_0_0_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + samp_rate + audio_rate + + + tau + 75e-6 + + + + analog_fm_deemph + + alias + + + + comment + + + + affinity + + + + _enabled + 1 + + + _coordinate + (1781, 1162) + + + _rotation + 0 + + + id + analog_fm_deemph_0_0_0_1 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + samp_rate + audio_rate + + + tau + 75e-6 + + + + analog_fm_deemph + + alias + + + + comment + + + + affinity + + + + _enabled + 1 + + + _coordinate + (1781, 1050) + + + _rotation + 0 + + + id + analog_fm_deemph_0_0_1 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + samp_rate + audio_rate + + + tau + 75e-6 + + audio_sink @@ -2159,7 +2300,7 @@ _enabled - True + 0 _coordinate @@ -2187,7 +2328,7 @@ - blocks_add_xx + audio_sink alias @@ -2200,10 +2341,57 @@ affinity + + device_name + + _enabled True + + _coordinate + (2284, 1078) + + + _rotation + 0 + + + id + audio_sink_0_0 + + + num_inputs + 2 + + + ok_to_block + True + + + samp_rate + audio_rate + + + + blocks_add_xx + + alias + + + + comment + + + + affinity + + + + _enabled + 0 + _coordinate (1725, 87) @@ -2253,7 +2441,7 @@ _enabled - True + 0 _coordinate @@ -2289,7 +2477,7 @@ - blocks_multiply_const_vxx + blocks_add_xx alias @@ -2298,21 +2486,17 @@ comment - - const - volume - affinity _enabled - 1 + True _coordinate - (1493, 35) + (2156, 1062) _rotation @@ -2320,7 +2504,7 @@ id - blocks_multiply_const_vxx_0 + blocks_add_xx_0_0_0 type @@ -2334,13 +2518,17 @@ minoutbuf 0 + + num_inputs + 2 + vlen 1 - blocks_multiply_const_vxx + blocks_add_xx alias @@ -2349,21 +2537,17 @@ comment - - const - volume - affinity _enabled - 1 + True _coordinate - (1517, 99) + (2172, 1126) _rotation @@ -2371,7 +2555,7 @@ id - blocks_multiply_const_vxx_0_0 + blocks_add_xx_0_1 type @@ -2385,6 +2569,10 @@ minoutbuf 0 + + num_inputs + 2 + vlen 1 @@ -2402,7 +2590,7 @@ const - volume2/2 + volume affinity @@ -2410,11 +2598,11 @@ _enabled - 1 + 0 _coordinate - (1517, 155) + (1493, 35) _rotation @@ -2422,7 +2610,7 @@ id - blocks_multiply_const_vxx_0_0_0 + blocks_multiply_const_vxx_0 type @@ -2442,7 +2630,7 @@ - blocks_stream_to_vector + blocks_multiply_const_vxx alias @@ -2451,29 +2639,33 @@ comment + + const + volume + affinity _enabled - True + 0 _coordinate - (299, 487) + (1517, 99) _rotation - 270 + 0 id - blocks_stream_to_vector_0 + blocks_multiply_const_vxx_0_0 type - complex + float maxoutbuf @@ -2483,28 +2675,279 @@ minoutbuf 0 - - num_items - fft_len - vlen 1 - epy_block + blocks_multiply_const_vxx alias - _io_cache - ('freq-setter', 'blk', [('freqlist', '[92200000, 94700000, 101300000, 102300000, 105700000, 107700000]')], [], [('out', 'message', None)], 'Embedded Python Block example - a simple multiply const', ['freqlist']) + comment + - _source_code - """ + const + volume2/2 + + + affinity + + + + _enabled + 0 + + + _coordinate + (1517, 155) + + + _rotation + 0 + + + id + blocks_multiply_const_vxx_0_0_0 + + + type + float + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + vlen + 1 + + + + blocks_multiply_const_vxx + + alias + + + + comment + + + + const + volume2/2 + + + affinity + + + + _enabled + 1 + + + _coordinate + (1964, 1122) + + + _rotation + 0 + + + id + blocks_multiply_const_vxx_0_0_0_0 + + + type + float + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + vlen + 1 + + + + blocks_multiply_const_vxx + + alias + + + + comment + + + + const + volume + + + affinity + + + + _enabled + 1 + + + _coordinate + (1964, 1178) + + + _rotation + 0 + + + id + blocks_multiply_const_vxx_0_0_1 + + + type + float + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + vlen + 1 + + + + blocks_multiply_const_vxx + + alias + + + + comment + + + + const + volume + + + affinity + + + + _enabled + 1 + + + _coordinate + (1940, 1058) + + + _rotation + 0 + + + id + blocks_multiply_const_vxx_0_1 + + + type + float + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + vlen + 1 + + + + blocks_stream_to_vector + + alias + + + + comment + + + + affinity + + + + _enabled + True + + + _coordinate + (299, 487) + + + _rotation + 270 + + + id + blocks_stream_to_vector_0 + + + type + complex + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + num_items + fft_len + + + vlen + 1 + + + + epy_block + + alias + + + + _io_cache + ('freq-setter', 'blk', [('freqlist', '[92200000, 94700000, 101300000, 102300000, 105700000, 107700000]')], [], [('out', 'message', None)], 'Embedded Python Block example - a simple multiply const', ['freqlist']) + + + _source_code + """ Embedded Python Blocks: Each time this file is saved, GRC will instantiate the first class it finds @@ -2670,7 +3113,7 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in _enabled - 1 + 0 _coordinate @@ -2725,7 +3168,7 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in _enabled - 1 + 0 _coordinate @@ -2780,7 +3223,7 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in _enabled - 1 + 0 _coordinate @@ -2815,6 +3258,171 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in fff + + fir_filter_xxx + + alias + + + + comment + + + + affinity + + + + decim + audio_decim + + + _enabled + 1 + + + _coordinate + (1541, 1106) + + + _rotation + 0 + + + id + fir_filter_xxx_0_0_0_0_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + samp_delay + 0 + + + taps + firdes.low_pass(1.0,baseband_rate,13e3,3e3,firdes.WIN_HAMMING) + + + type + fff + + + + fir_filter_xxx + + alias + + + + comment + + + + affinity + + + + decim + audio_decim + + + _enabled + 1 + + + _coordinate + (1541, 1162) + + + _rotation + 0 + + + id + fir_filter_xxx_0_0_0_1 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + samp_delay + 0 + + + taps + firdes.low_pass(1.0,baseband_rate,13e3,3e3,firdes.WIN_HAMMING) + + + type + fff + + + + fir_filter_xxx + + alias + + + + comment + + + + affinity + + + + decim + audio_decim + + + _enabled + 1 + + + _coordinate + (1541, 1050) + + + _rotation + 0 + + + id + fir_filter_xxx_0_0_1 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + samp_delay + 0 + + + taps + firdes.low_pass(1.0,baseband_rate,13e3,3e3,firdes.WIN_HAMMING) + + + type + fff + + hier_ifft_decoder @@ -3524,6 +4132,57 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in True + + multirds_stream_router + + alias + + + + comment + + + + affinity + + + + _enabled + True + + + _coordinate + (1325, 966) + + + _rotation + 0 + + + id + multirds_stream_router_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + ninputs + 9 + + + noutputs + 3 + + + type + float + + multirds_tmc_parser @@ -4969,427 +5628,60 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in minoutbuf 0 - - nchan - 1 - - - num_mboards - 1 - - - type - fc32 - - - sample_rate - samp_rate - - - sync - - - - - qtgui_const_sink_x - - autoscale - False - - - axislabels - False - - - alias - - - - comment - - - - affinity - - - - _enabled - True - - - _coordinate - (1166, 283) - - - gui_hint - tabs@0:5,3,1,1 - - - _rotation - 0 - - - grid - False - - - id - qtgui_const_sink_x_0 - - - legend - True - - - alpha1 - 1.0 - - - color1 - "blue" - - - label1 - - - - marker1 - 0 - - - style1 - 0 - - - width1 - 1 - - - alpha10 - 1.0 - - - color10 - "red" - - - label10 - - - - marker10 - 0 - - - style10 - 0 - - - width10 - 1 - - - alpha2 - 1.0 - - - color2 - "red" - - - label2 - - - - marker2 - 0 - - - style2 - 0 - - - width2 - 1 - - - alpha3 - 1.0 - - - color3 - "green" - - - label3 - - - - marker3 - 0 - - - style3 - 0 - - - width3 - 1 - - - alpha4 - 1.0 - - - color4 - "black" - - - label4 - - - - marker4 - 0 - - - style4 - 0 - - - width4 - 1 - - - alpha5 - 1.0 - - - color5 - "cyan" - - - label5 - - - - marker5 - 0 - - - style5 - 0 - - - width5 - 1 - - - alpha6 - 1.0 - - - color6 - "magenta" - - - label6 - - - - marker6 - 0 - - - style6 - 0 - - - width6 - 1 - - - alpha7 - 1.0 - - - color7 - "red" - - - label7 - - - - marker7 - 0 - - - style7 - 0 - - - width7 - 1 - - - alpha8 - 1.0 - - - color8 - "red" - - - label8 - - - - marker8 - 0 - - - style8 - 0 - - - width8 - 1 - - - alpha9 - 1.0 - - - color9 - "red" - - - label9 - - - - marker9 - 0 - - - style9 - 0 - - - width9 - 1 - - - name - "" - - - nconnections - 6 - - - size - 1024 - - - tr_chan - 0 - - - tr_level - 0.0 - - - tr_mode - qtgui.TRIG_MODE_FREE - - - tr_slope - qtgui.TRIG_SLOPE_POS - - - tr_tag - "" - - - type - complex - - - update_time - 0.01 + + nchan + 1 - xmax - 2 + num_mboards + 1 - xmin - -2 + type + fc32 - ymax - 2 + sample_rate + samp_rate - ymin - -2 + sync + - qtgui_freq_sink_x + qtgui_const_sink_x autoscale False - - average - 1.0 - axislabels False - - bw - chan_rate - alias - - fc - 0 - comment - - ctrlpanel - False - affinity _enabled - 1 - - - fftsize - chan_fft_len + True _coordinate - (1126, 479) + (1166, 283) gui_hint - tabs@0:5,1,1,1 + tabs@0:5,3,1,1 _rotation @@ -5401,7 +5693,7 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in id - qtgui_freq_sink_x_0_0_1 + qtgui_const_sink_x_0 legend @@ -5419,6 +5711,14 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in label1 + + marker1 + 0 + + + style1 + 0 + width1 1 @@ -5429,12 +5729,20 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in color10 - "dark blue" + "red" label10 + + marker10 + 0 + + + style10 + 0 + width10 1 @@ -5451,6 +5759,14 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in label2 + + marker2 + 0 + + + style2 + 0 + width2 1 @@ -5467,6 +5783,14 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in label3 + + marker3 + 0 + + + style3 + 0 + width3 1 @@ -5483,6 +5807,14 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in label4 + + marker4 + 0 + + + style4 + 0 + width4 1 @@ -5499,6 +5831,14 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in label5 + + marker5 + 0 + + + style5 + 0 + width5 1 @@ -5515,6 +5855,14 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in label6 + + marker6 + 0 + + + style6 + 0 + width6 1 @@ -5525,12 +5873,20 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in color7 - "yellow" + "red" label7 + + marker7 + 0 + + + style7 + 0 + width7 1 @@ -5541,12 +5897,20 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in color8 - "dark red" + "red" label8 + + marker8 + 0 + + + style8 + 0 + width8 1 @@ -5557,23 +5921,23 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in color9 - "dark green" + "red" label9 - width9 - 1 + marker9 + 0 - maxoutbuf + style9 0 - minoutbuf - 0 + width9 + 1 name @@ -5584,12 +5948,8 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in 6 - showports - True - - - freqhalf - True + size + 1024 tr_chan @@ -5603,6 +5963,10 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in tr_mode qtgui.TRIG_MODE_FREE + + tr_slope + qtgui.TRIG_SLOPE_POS + tr_tag "" @@ -5613,27 +5977,90 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in update_time - 0.10 + 0.01 - wintype - firdes.WIN_BLACKMAN_hARRIS + xmax + 2 - label - Relative Gain + xmin + -2 ymax - 70 + 2 ymin - -60 + -2 + + + qtgui_edit_box_msg - units - dB + alias + + + + comment + + + + affinity + + + + _enabled + 0 + + + _coordinate + (1549, 1293) + + + gui_hint + tabs@1 + + + _rotation + 0 + + + id + qtgui_edit_box_msg_0 + + + key + 0 + + + label + + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + is_pair + True + + + is_static + False + + + type + int + + + value + 0 @@ -5648,11 +6075,11 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in axislabels - True + False bw - samp_rate + chan_rate alias @@ -5660,7 +6087,7 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in fc - freq_tune + 0 comment @@ -5676,19 +6103,19 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in _enabled - True + 1 fftsize - 2048*2 + chan_fft_len _coordinate - (399, 387) + (1126, 479) gui_hint - tabs@0:4,1,1,3 + tabs@0:5,1,1,1 _rotation @@ -5700,7 +6127,7 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in id - qtgui_freq_sink_x_0_0_1_0 + qtgui_freq_sink_x_0_0_1 legend @@ -5880,7 +6307,7 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in nconnections - 1 + 6 showports @@ -5924,11 +6351,11 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in ymax - 10 + 70 ymin - -100 + -60 units @@ -5947,11 +6374,11 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in axislabels - False + True bw - baseband_rate + samp_rate alias @@ -5959,7 +6386,7 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in fc - 0 + freq_tune comment @@ -5975,19 +6402,19 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in _enabled - 1 + True fftsize - chan_fft_len + 2048*2 _coordinate - (1285, 615) + (399, 387) gui_hint - tabs@0:5,2,1,1 + tabs@0:4,1,1,3 _rotation @@ -5999,7 +6426,7 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in id - qtgui_freq_sink_x_0_0_1_2 + qtgui_freq_sink_x_0_0_1_0 legend @@ -6175,11 +6602,11 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in name - + "" nconnections - 6 + 1 showports @@ -6207,7 +6634,7 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in type - float + complex update_time @@ -6223,11 +6650,11 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in ymax - 0 + 10 ymin - -120 + -100 units @@ -6235,19 +6662,31 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in - qtgui_time_sink_x + qtgui_freq_sink_x autoscale False + + average + 1.0 + axislabels - True + False + + + bw + baseband_rate alias + + fc + 0 + comment @@ -6261,20 +6700,20 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in - entags - True + _enabled + 1 - _enabled - 0 + fftsize + chan_fft_len _coordinate - (1381, 1046) + (1285, 615) gui_hint - + tabs@0:5,2,1,1 _rotation @@ -6286,7 +6725,7 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in id - qtgui_time_sink_x_0 + qtgui_freq_sink_x_0_0_1_2 legend @@ -6304,14 +6743,6 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in label1 - - marker1 - -1 - - - style1 - 1 - width1 1 @@ -6322,20 +6753,12 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in color10 - "blue" + "dark blue" label10 - - marker10 - -1 - - - style10 - 1 - width10 1 @@ -6352,14 +6775,6 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in label2 - - marker2 - -1 - - - style2 - 1 - width2 1 @@ -6376,14 +6791,6 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in label3 - - marker3 - -1 - - - style3 - 1 - width3 1 @@ -6400,14 +6807,6 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in label4 - - marker4 - -1 - - - style4 - 1 - width4 1 @@ -6424,14 +6823,6 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in label5 - - marker5 - -1 - - - style5 - 1 - width5 1 @@ -6448,14 +6839,6 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in label6 - - marker6 - -1 - - - style6 - 1 - width6 1 @@ -6472,14 +6855,6 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in label7 - - marker7 - -1 - - - style7 - 1 - width7 1 @@ -6496,14 +6871,6 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in label8 - - marker8 - -1 - - - style8 - 1 - width8 1 @@ -6521,41 +6888,37 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in - marker9 - -1 + width9 + 1 - style9 - 1 + maxoutbuf + 0 - width9 - 1 + minoutbuf + 0 name - "" + nconnections - 3 + 6 - size - 1024 + showports + True - srate - 2375 + freqhalf + True tr_chan 0 - - tr_delay - 0 - tr_level 0.0 @@ -6564,10 +6927,6 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in tr_mode qtgui.TRIG_MODE_FREE - - tr_slope - qtgui.TRIG_SLOPE_POS - tr_tag "" @@ -6581,20 +6940,24 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in 0.10 - ylabel - Amplitude + wintype + firdes.WIN_BLACKMAN_hARRIS - yunit - "" + label + Relative Gain ymax - 1 + 0 ymin - -1 + -120 + + + units + dB @@ -6730,6 +7093,24 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in 0 0 + + analog_fm_deemph_0_0_0_0_0 + blocks_multiply_const_vxx_0_0_0_0 + 0 + 0 + + + analog_fm_deemph_0_0_0_1 + blocks_multiply_const_vxx_0_0_1 + 0 + 0 + + + analog_fm_deemph_0_0_1 + blocks_multiply_const_vxx_0_1 + 0 + 0 + blocks_add_xx_0 audio_sink_0 @@ -6742,6 +7123,18 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in 0 0 + + blocks_add_xx_0_0_0 + audio_sink_0_0 + 0 + 0 + + + blocks_add_xx_0_1 + audio_sink_0_0 + 0 + 1 + blocks_multiply_const_vxx_0 blocks_add_xx_0_0 @@ -6766,6 +7159,30 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in 0 1 + + blocks_multiply_const_vxx_0_0_0_0 + blocks_add_xx_0_0_0 + 0 + 1 + + + blocks_multiply_const_vxx_0_0_0_0 + blocks_add_xx_0_1 + 0 + 0 + + + blocks_multiply_const_vxx_0_0_1 + blocks_add_xx_0_1 + 0 + 1 + + + blocks_multiply_const_vxx_0_1 + blocks_add_xx_0_0_0 + 0 + 0 + blocks_stream_to_vector_0 fft_vxx_0 @@ -6850,12 +7267,36 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in 0 0 + + fir_filter_xxx_0_0_0_0_0 + analog_fm_deemph_0_0_0_0_0 + 0 + 0 + + + fir_filter_xxx_0_0_0_1 + analog_fm_deemph_0_0_0_1 + 0 + 0 + + + fir_filter_xxx_0_0_1 + analog_fm_deemph_0_0_1 + 0 + 0 + hier_ifft_decoder_0 fir_filter_xxx_0_0 0 0 + + hier_ifft_decoder_0 + multirds_stream_router_0 + 0 + 0 + hier_ifft_decoder_0 qtgui_freq_sink_x_0_0_1_2 @@ -6892,6 +7333,12 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in 0 0 + + hier_ifft_decoder_0_0 + multirds_stream_router_0 + 0 + 1 + hier_ifft_decoder_0_0 qtgui_freq_sink_x_0_0_1_2 @@ -6928,6 +7375,12 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in 0 0 + + hier_ifft_decoder_0_1 + multirds_stream_router_0 + 0 + 2 + hier_ifft_decoder_0_1 qtgui_freq_sink_x_0_0_1_2 @@ -6958,6 +7411,12 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in rds in2 + + hier_ifft_decoder_0_1_0 + multirds_stream_router_0 + 0 + 3 + hier_ifft_decoder_0_1_0 qtgui_freq_sink_x_0_0_1_2 @@ -6988,6 +7447,12 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in rds in3 + + hier_ifft_decoder_0_1_1 + multirds_stream_router_0 + 0 + 4 + hier_ifft_decoder_0_1_1 qtgui_freq_sink_x_0_0_1_2 @@ -7018,6 +7483,12 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in rds in4 + + hier_ifft_decoder_0_1_2 + multirds_stream_router_0 + 0 + 5 + hier_ifft_decoder_0_1_2 qtgui_freq_sink_x_0_0_1_2 @@ -7048,30 +7519,72 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in rds in5 + + hier_ifft_decoder_0_1_2_0 + multirds_stream_router_0 + 0 + 6 + hier_ifft_decoder_0_1_2_0 multirds_rds_parser_table_qt_0_0 rds in6 + + hier_ifft_decoder_0_1_2_0_0 + multirds_stream_router_0 + 0 + 7 + hier_ifft_decoder_0_1_2_0_0 multirds_rds_parser_table_qt_0_0 rds in7 + + hier_ifft_decoder_0_1_2_0_0_0 + multirds_stream_router_0 + 0 + 8 + hier_ifft_decoder_0_1_2_0_0_0 multirds_rds_parser_table_qt_0_0 rds in8 + + multirds_rds_parser_table_qt_0_0 + multirds_stream_router_0 + ctrl + ctrl + multirds_rds_parser_table_qt_0_0 multirds_tmc_parser_0 tmc_raw in + + multirds_stream_router_0 + fir_filter_xxx_0_0_1 + 0 + 0 + + + multirds_stream_router_0 + fir_filter_xxx_0_0_0_0_0 + 1 + 0 + + + multirds_stream_router_0 + fir_filter_xxx_0_0_0_1 + 2 + 0 + osmosdr_source_0 blocks_stream_to_vector_0 @@ -7084,4 +7597,10 @@ class blk(gr.sync_block): # other base classes are basic_block, decim_block, in 0 0 + + qtgui_edit_box_msg_0 + multirds_stream_router_0 + msg + ctrl + diff --git a/lib/stream_router_impl.cc b/lib/stream_router_impl.cc index 01ef6a3..84d3178 100644 --- a/lib/stream_router_impl.cc +++ b/lib/stream_router_impl.cc @@ -40,9 +40,16 @@ namespace gr { */ stream_router_impl::stream_router_impl(int ninputs,int noutputs) : gr::sync_block("stream_router", - gr::io_signature::make(1, 1, sizeof(float)), - gr::io_signature::make(1, 1, sizeof(float))) - {} + gr::io_signature::make(3, 9, sizeof(float)), + gr::io_signature::make(3, 3, sizeof(float))) + { + message_port_register_in(pmt::mp("ctrl")); + set_msg_handler(pmt::mp("ctrl"), boost::bind(&stream_router_impl::parse_ctrl_msg, this, _1)); + //outmappings={0,1,2}; + outmappings[0]=0; + outmappings[1]=1; + outmappings[2]=2; + } /* * Our virtual destructor. @@ -50,14 +57,54 @@ namespace gr { stream_router_impl::~stream_router_impl() { } - - int - stream_router_impl::work(int noutput_items, + + void stream_router_impl::parse_ctrl_msg(pmt::pmt_t pdu) { + if(!pmt::is_pair(pdu)) { + std::cout << "wrong input message (not a pair)" << std::endl; + return; + } + pmt::pmt_t inport = pmt::car(pdu); // meta declares type 0:RDS, 1:sync/nosync + pmt::pmt_t outport = pmt::cdr(pdu); + if(!pmt::is_integer(inport) or !pmt::is_integer(outport)) { + std::cout << "wrong input message (not a long)" << std::endl; + return; + } + std::cout << pdu << std::endl; + outmappings[pmt::to_long(outport)]=pmt::to_long(inport); + //pmt::to_long(meta) +// if(1L==pmt::to_long(meta) && pmt::eqv(sync,pmt::PMT_F)){ +// lout<< "entered nosync"< diff --git a/lib/stream_router_impl.h b/lib/stream_router_impl.h index 4ec443a..119f8c0 100644 --- a/lib/stream_router_impl.h +++ b/lib/stream_router_impl.h @@ -39,7 +39,12 @@ namespace gr { int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); + + void parse_ctrl_msg(pmt::pmt_t pdu); + int outmappings[3]; + }; + } // namespace multirds } // namespace gr diff --git a/python/max_freq.py b/python/max_freq.py index bffa029..623c0f8 100644 --- a/python/max_freq.py +++ b/python/max_freq.py @@ -57,28 +57,29 @@ class max_freq(gr.sync_block): return freq def handle_ctrl_msg(self,msg): - m = pmt.pmt_to_python.pmt_to_dict(msg) - if m.has_key("cmd") and m["cmd"]=="set_audio_freq": - #print(m) - #print(self.last_station_indices) - freq_index=self.freq_to_index(m["freq"]) - if m["chan"]=="left" and freq_index