def test_multiply_const_vss_one(self): src_data = [ 2, ] op = blocks.multiply_const_vss((3, )) exp_data = [ 6, ] self.help_const_ss(src_data, exp_data, op)
def test_multiply_const_vss_five(self): src_data = [1, 2, 3, 4, 5] op = blocks.multiply_const_vss([6, 7, 8, 9, 10]) exp_data = [6, 14, 24, 36, 50] self.help_const_ss(src_data, exp_data, op)
def __init__(self): gr.top_block.__init__(self, "Top Block") Qt.QWidget.__init__(self) self.setWindowTitle("Top Block") try: self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) except: pass self.top_scroll_layout = Qt.QVBoxLayout() self.setLayout(self.top_scroll_layout) self.top_scroll = Qt.QScrollArea() self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) self.top_scroll_layout.addWidget(self.top_scroll) self.top_scroll.setWidgetResizable(True) self.top_widget = Qt.QWidget() self.top_scroll.setWidget(self.top_widget) self.top_layout = Qt.QVBoxLayout(self.top_widget) self.top_grid_layout = Qt.QGridLayout() self.top_layout.addLayout(self.top_grid_layout) self.settings = Qt.QSettings("GNU Radio", "top_block") self.restoreGeometry(self.settings.value("geometry").toByteArray()) ################################################## # Variables ################################################## self.samp_rate = samp_rate = 16000 self.repeat = repeat = samp_rate/80 ################################################## # Blocks ################################################## self.qtgui_time_sink_x_0_0 = qtgui.time_sink_f( 1024, #size samp_rate, #samp_rate "", #name 1 #number of inputs ) self.qtgui_time_sink_x_0_0.set_update_time(0.10) self.qtgui_time_sink_x_0_0.set_y_axis(-1, 1) self.qtgui_time_sink_x_0_0.set_y_label("Amplitude", "") self.qtgui_time_sink_x_0_0.enable_tags(-1, True) self.qtgui_time_sink_x_0_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, qtgui.TRIG_SLOPE_POS, 0.0, 0, 0, "") self.qtgui_time_sink_x_0_0.enable_autoscale(True) self.qtgui_time_sink_x_0_0.enable_grid(False) labels = ["", "", "", "", "", "", "", "", "", ""] widths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] colors = ["blue", "red", "green", "black", "cyan", "magenta", "yellow", "dark red", "dark green", "blue"] styles = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] markers = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1] alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] for i in xrange(1): if len(labels[i]) == 0: self.qtgui_time_sink_x_0_0.set_line_label(i, "Data {0}".format(i)) else: self.qtgui_time_sink_x_0_0.set_line_label(i, labels[i]) self.qtgui_time_sink_x_0_0.set_line_width(i, widths[i]) self.qtgui_time_sink_x_0_0.set_line_color(i, colors[i]) self.qtgui_time_sink_x_0_0.set_line_style(i, styles[i]) self.qtgui_time_sink_x_0_0.set_line_marker(i, markers[i]) self.qtgui_time_sink_x_0_0.set_line_alpha(i, alphas[i]) self._qtgui_time_sink_x_0_0_win = sip.wrapinstance(self.qtgui_time_sink_x_0_0.pyqwidget(), Qt.QWidget) self.top_layout.addWidget(self._qtgui_time_sink_x_0_0_win) self.blocks_unpacked_to_packed_xx_1 = blocks.unpacked_to_packed_bb(8, gr.GR_MSB_FIRST) self.blocks_unpack_k_bits_bb_0 = blocks.unpack_k_bits_bb(8) self.blocks_uchar_to_float_0_0_0 = blocks.uchar_to_float() self.blocks_uchar_to_float_0 = blocks.uchar_to_float() self.blocks_throttle_0 = blocks.throttle(gr.sizeof_char*1, samp_rate,True) self.blocks_short_to_float_0 = blocks.short_to_float(1, 1) self.blocks_short_to_char_0 = blocks.short_to_char(1) self.blocks_rms_xx_0_0 = blocks.rms_ff(1) self.blocks_rms_xx_0 = blocks.rms_ff(1) self.blocks_repeat_0 = blocks.repeat(gr.sizeof_char*1, repeat) self.blocks_repack_bits_bb_0 = blocks.repack_bits_bb(1, 8, "", False, gr.GR_MSB_FIRST) self.blocks_null_sink_1 = blocks.null_sink(gr.sizeof_short*1) self.blocks_null_sink_0 = blocks.null_sink(gr.sizeof_float*1) self.blocks_multiply_xx_0_2 = blocks.multiply_vff(1) self.blocks_multiply_xx_0_1 = blocks.multiply_vff(1) self.blocks_multiply_xx_0_0 = blocks.multiply_vff(1) self.blocks_multiply_xx_0 = blocks.multiply_vff(1) self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vss((256, )) self.blocks_integrate_xx_1 = blocks.integrate_ff(repeat) self.blocks_integrate_xx_0_1 = blocks.integrate_ff(repeat) self.blocks_integrate_xx_0_0 = blocks.integrate_ff(repeat) self.blocks_integrate_xx_0 = blocks.integrate_ff(repeat) self.blocks_float_to_uchar_0 = blocks.float_to_uchar() self.blocks_file_source_0 = blocks.file_source(gr.sizeof_short*1, "/home/sidekiq/Documents/Documentation_SDR/sdr.in", True) self.blocks_file_sink_0_0 = blocks.file_sink(gr.sizeof_char*1, "/home/sidekiq/Documents/Documentation_SDR/text_output", False) self.blocks_file_sink_0_0.set_unbuffered(True) self.blocks_complex_to_float_0 = blocks.complex_to_float(1) self.blocks_argmax_xx_0 = blocks.argmax_fs(1) self.blocks_add_xx_0_0 = blocks.add_vff(1) self.blocks_add_xx_0 = blocks.add_vff(1) self.blocks_add_const_vxx_0 = blocks.add_const_vff((1, )) self.blocks_abs_xx_0_2 = blocks.abs_ff(1) self.blocks_abs_xx_0_1 = blocks.abs_ff(1) self.blocks_abs_xx_0_0 = blocks.abs_ff(1) self.blocks_abs_xx_0 = blocks.abs_ff(1) self.blks2_packet_encoder_0 = grc_blks2.packet_mod_b(grc_blks2.packet_encoder( samples_per_symbol=1, bits_per_symbol=1, preamble="11111000", access_code="11111111", pad_for_usrp=False, ), payload_length=1, ) self.blks2_packet_decoder_0 = grc_blks2.packet_demod_b(grc_blks2.packet_decoder( access_code="", threshold=-1, callback=lambda ok, payload: self.blks2_packet_decoder_0.recv_pkt(ok, payload), ), ) self.audio_sink_1 = audio.sink(16000, "", True) self.analog_sig_source_x_1 = analog.sig_source_f(samp_rate, analog.GR_COS_WAVE, 1330, 1, 0) self.analog_sig_source_x_0_1 = analog.sig_source_f(samp_rate, analog.GR_SIN_WAVE, 1330, 1, 0) self.analog_sig_source_x_0_0 = analog.sig_source_f(samp_rate, analog.GR_SIN_WAVE, 2720, 1, 0) self.analog_sig_source_x_0 = analog.sig_source_f(samp_rate, analog.GR_COS_WAVE, 2720, 1, 0) self.analog_frequency_modulator_fc_0 = analog.frequency_modulator_fc(100) ################################################## # Connections ################################################## self.connect((self.analog_frequency_modulator_fc_0, 0), (self.blocks_complex_to_float_0, 0)) self.connect((self.analog_sig_source_x_0, 0), (self.blocks_multiply_xx_0_0, 0)) self.connect((self.analog_sig_source_x_0_0, 0), (self.blocks_multiply_xx_0_2, 0)) self.connect((self.analog_sig_source_x_0_1, 0), (self.blocks_multiply_xx_0_1, 0)) self.connect((self.analog_sig_source_x_1, 0), (self.blocks_multiply_xx_0, 0)) self.connect((self.blks2_packet_decoder_0, 0), (self.blocks_unpacked_to_packed_xx_1, 0)) self.connect((self.blks2_packet_encoder_0, 0), (self.blocks_unpack_k_bits_bb_0, 0)) self.connect((self.blocks_abs_xx_0, 0), (self.blocks_add_xx_0, 0)) self.connect((self.blocks_abs_xx_0_0, 0), (self.blocks_add_xx_0_0, 0)) self.connect((self.blocks_abs_xx_0_1, 0), (self.blocks_add_xx_0, 1)) self.connect((self.blocks_abs_xx_0_2, 0), (self.blocks_add_xx_0_0, 1)) self.connect((self.blocks_add_const_vxx_0, 0), (self.analog_frequency_modulator_fc_0, 0)) self.connect((self.blocks_add_xx_0, 0), (self.blocks_rms_xx_0, 0)) self.connect((self.blocks_add_xx_0_0, 0), (self.blocks_rms_xx_0_0, 0)) self.connect((self.blocks_argmax_xx_0, 0), (self.blocks_null_sink_1, 0)) self.connect((self.blocks_argmax_xx_0, 1), (self.blocks_short_to_float_0, 0)) self.connect((self.blocks_complex_to_float_0, 1), (self.audio_sink_1, 0)) self.connect((self.blocks_complex_to_float_0, 1), (self.blocks_multiply_xx_0, 1)) self.connect((self.blocks_complex_to_float_0, 1), (self.blocks_multiply_xx_0_0, 1)) self.connect((self.blocks_complex_to_float_0, 1), (self.blocks_multiply_xx_0_1, 1)) self.connect((self.blocks_complex_to_float_0, 1), (self.blocks_multiply_xx_0_2, 1)) self.connect((self.blocks_complex_to_float_0, 0), (self.blocks_null_sink_0, 0)) self.connect((self.blocks_file_source_0, 0), (self.blocks_multiply_const_vxx_0, 0)) self.connect((self.blocks_float_to_uchar_0, 0), (self.blks2_packet_decoder_0, 0)) self.connect((self.blocks_integrate_xx_0, 0), (self.blocks_abs_xx_0_2, 0)) self.connect((self.blocks_integrate_xx_0_0, 0), (self.blocks_abs_xx_0, 0)) self.connect((self.blocks_integrate_xx_0_1, 0), (self.blocks_abs_xx_0_0, 0)) self.connect((self.blocks_integrate_xx_1, 0), (self.blocks_abs_xx_0_1, 0)) self.connect((self.blocks_multiply_const_vxx_0, 0), (self.blocks_short_to_char_0, 0)) self.connect((self.blocks_multiply_xx_0, 0), (self.blocks_integrate_xx_0, 0)) self.connect((self.blocks_multiply_xx_0_0, 0), (self.blocks_integrate_xx_1, 0)) self.connect((self.blocks_multiply_xx_0_1, 0), (self.blocks_integrate_xx_0_1, 0)) self.connect((self.blocks_multiply_xx_0_2, 0), (self.blocks_integrate_xx_0_0, 0)) self.connect((self.blocks_repack_bits_bb_0, 0), (self.blks2_packet_encoder_0, 0)) self.connect((self.blocks_repack_bits_bb_0, 0), (self.blocks_uchar_to_float_0_0_0, 0)) self.connect((self.blocks_repeat_0, 0), (self.blocks_throttle_0, 0)) self.connect((self.blocks_rms_xx_0, 0), (self.blocks_argmax_xx_0, 1)) self.connect((self.blocks_rms_xx_0_0, 0), (self.blocks_argmax_xx_0, 0)) self.connect((self.blocks_short_to_char_0, 0), (self.blocks_repack_bits_bb_0, 0)) self.connect((self.blocks_short_to_float_0, 0), (self.blocks_float_to_uchar_0, 0)) self.connect((self.blocks_throttle_0, 0), (self.blocks_uchar_to_float_0, 0)) self.connect((self.blocks_uchar_to_float_0, 0), (self.blocks_add_const_vxx_0, 0)) self.connect((self.blocks_uchar_to_float_0_0_0, 0), (self.qtgui_time_sink_x_0_0, 0)) self.connect((self.blocks_unpack_k_bits_bb_0, 0), (self.blocks_repeat_0, 0)) self.connect((self.blocks_unpacked_to_packed_xx_1, 0), (self.blocks_file_sink_0_0, 0))
def __init__(self): gr.top_block.__init__(self, "T2B Gen") Qt.QWidget.__init__(self) self.setWindowTitle("T2B Gen") qtgui.util.check_set_qss() try: self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) except: pass self.top_scroll_layout = Qt.QVBoxLayout() self.setLayout(self.top_scroll_layout) self.top_scroll = Qt.QScrollArea() self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) self.top_scroll_layout.addWidget(self.top_scroll) self.top_scroll.setWidgetResizable(True) self.top_widget = Qt.QWidget() self.top_scroll.setWidget(self.top_widget) self.top_layout = Qt.QVBoxLayout(self.top_widget) self.top_grid_layout = Qt.QGridLayout() self.top_layout.addLayout(self.top_grid_layout) self.settings = Qt.QSettings("GNU Radio", "T2B_Gen") self.restoreGeometry(self.settings.value("geometry").toByteArray()) ################################################## # Variables ################################################## self.samp_rate = samp_rate = 250e3 self.noise_amp = noise_amp = 0.01 self.c6 = c6 = (1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1) self.c5 = c5 = (1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1) self.c4 = c4 = (1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, -1) self.c3 = c3 = (1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1) self.c2 = c2 = (1, 1, 1, -1, -1, 1, -1) self.c1 = c1 = (1, -1) ################################################## # Blocks ################################################## self._noise_amp_range = Range(0, 100, 0.001, 0.01, 200) self._noise_amp_win = RangeWidget(self._noise_amp_range, self.set_noise_amp, "noise_amp", "counter_slider", float) self.top_grid_layout.addWidget(self._noise_amp_win) self.root_raised_cosine_filter_0_0 = filter.fir_filter_ccf( 5, firdes.root_raised_cosine(5, samp_rate, samp_rate / 5, 0.5, 30)) self.root_raised_cosine_filter_0 = filter.interp_fir_filter_ccf( 5, firdes.root_raised_cosine(1, samp_rate, samp_rate / 5, 0.5, 30)) self.qtgui_time_sink_x_1 = qtgui.time_sink_f( 1024, #size samp_rate, #samp_rate "", #name 1 #number of inputs ) self.qtgui_time_sink_x_1.set_update_time(0.10) self.qtgui_time_sink_x_1.set_y_axis(-1, 1) self.qtgui_time_sink_x_1.set_y_label('Amplitude', "") self.qtgui_time_sink_x_1.enable_tags(-1, True) self.qtgui_time_sink_x_1.set_trigger_mode(qtgui.TRIG_MODE_FREE, qtgui.TRIG_SLOPE_POS, 0.0, 0, 0, "") self.qtgui_time_sink_x_1.enable_autoscale(False) self.qtgui_time_sink_x_1.enable_grid(False) self.qtgui_time_sink_x_1.enable_axis_labels(True) self.qtgui_time_sink_x_1.enable_control_panel(False) self.qtgui_time_sink_x_1.enable_stem_plot(False) if not True: self.qtgui_time_sink_x_1.disable_legend() labels = ['', '', '', '', '', '', '', '', '', ''] widths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] colors = [ "blue", "red", "green", "black", "cyan", "magenta", "yellow", "dark red", "dark green", "blue" ] styles = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] markers = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1] alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] for i in xrange(1): if len(labels[i]) == 0: self.qtgui_time_sink_x_1.set_line_label( i, "Data {0}".format(i)) else: self.qtgui_time_sink_x_1.set_line_label(i, labels[i]) self.qtgui_time_sink_x_1.set_line_width(i, widths[i]) self.qtgui_time_sink_x_1.set_line_color(i, colors[i]) self.qtgui_time_sink_x_1.set_line_style(i, styles[i]) self.qtgui_time_sink_x_1.set_line_marker(i, markers[i]) self.qtgui_time_sink_x_1.set_line_alpha(i, alphas[i]) self._qtgui_time_sink_x_1_win = sip.wrapinstance( self.qtgui_time_sink_x_1.pyqwidget(), Qt.QWidget) self.top_grid_layout.addWidget(self._qtgui_time_sink_x_1_win) self.qtgui_freq_sink_x_0 = qtgui.freq_sink_c( 1024, #size firdes.WIN_BLACKMAN_hARRIS, #wintype 0, #fc samp_rate * 5, #bw "", #name 1 #number of inputs ) self.qtgui_freq_sink_x_0.set_update_time(0.10) self.qtgui_freq_sink_x_0.set_y_axis(-80, -20) self.qtgui_freq_sink_x_0.set_y_label('Relative Gain', 'dB') self.qtgui_freq_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, 0.0, 0, "") self.qtgui_freq_sink_x_0.enable_autoscale(False) self.qtgui_freq_sink_x_0.enable_grid(False) self.qtgui_freq_sink_x_0.set_fft_average(1.0) self.qtgui_freq_sink_x_0.enable_axis_labels(True) self.qtgui_freq_sink_x_0.enable_control_panel(False) if not True: self.qtgui_freq_sink_x_0.disable_legend() if "complex" == "float" or "complex" == "msg_float": self.qtgui_freq_sink_x_0.set_plot_pos_half(not True) labels = ['', '', '', '', '', '', '', '', '', ''] widths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] colors = [ "blue", "red", "green", "black", "cyan", "magenta", "yellow", "dark red", "dark green", "dark blue" ] alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] for i in xrange(1): if len(labels[i]) == 0: self.qtgui_freq_sink_x_0.set_line_label( i, "Data {0}".format(i)) else: self.qtgui_freq_sink_x_0.set_line_label(i, labels[i]) self.qtgui_freq_sink_x_0.set_line_width(i, widths[i]) self.qtgui_freq_sink_x_0.set_line_color(i, colors[i]) self.qtgui_freq_sink_x_0.set_line_alpha(i, alphas[i]) self._qtgui_freq_sink_x_0_win = sip.wrapinstance( self.qtgui_freq_sink_x_0.pyqwidget(), Qt.QWidget) self.top_grid_layout.addWidget(self._qtgui_freq_sink_x_0_win) self.qtgui_const_sink_x_0 = qtgui.const_sink_c( 1024, #size "", #name 1 #number of inputs ) self.qtgui_const_sink_x_0.set_update_time(0.10) self.qtgui_const_sink_x_0.set_y_axis(-2, 2) self.qtgui_const_sink_x_0.set_x_axis(-2, 2) self.qtgui_const_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, qtgui.TRIG_SLOPE_POS, 0.0, 0, "") self.qtgui_const_sink_x_0.enable_autoscale(False) self.qtgui_const_sink_x_0.enable_grid(False) self.qtgui_const_sink_x_0.enable_axis_labels(True) if not True: self.qtgui_const_sink_x_0.disable_legend() labels = ['', '', '', '', '', '', '', '', '', ''] widths = [0, 1, 1, 1, 1, 1, 1, 1, 1, 1] colors = [ "blue", "red", "red", "red", "red", "red", "red", "red", "red", "red" ] styles = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] markers = [9, 0, 0, 0, 0, 0, 0, 0, 0, 0] alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] for i in xrange(1): if len(labels[i]) == 0: self.qtgui_const_sink_x_0.set_line_label( i, "Data {0}".format(i)) else: self.qtgui_const_sink_x_0.set_line_label(i, labels[i]) self.qtgui_const_sink_x_0.set_line_width(i, widths[i]) self.qtgui_const_sink_x_0.set_line_color(i, colors[i]) self.qtgui_const_sink_x_0.set_line_style(i, styles[i]) self.qtgui_const_sink_x_0.set_line_marker(i, markers[i]) self.qtgui_const_sink_x_0.set_line_alpha(i, alphas[i]) self._qtgui_const_sink_x_0_win = sip.wrapinstance( self.qtgui_const_sink_x_0.pyqwidget(), Qt.QWidget) self.top_grid_layout.addWidget(self._qtgui_const_sink_x_0_win) self.digital_map_bb_0 = digital.map_bb(([-1, 1])) self.digital_corr_est_cc_0_1 = digital.corr_est_cc((c3), 5, 0, 0.9) self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_cc( 5 * (1 + 0.0), 0.25 * 0.175 * 0.175, 0.5, 0.175, 0.005) self.digital_binary_slicer_fb_1_0_0_0 = digital.binary_slicer_fb() self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb() self.blocks_vector_source_x_0_0_0_0_0_0 = blocks.vector_source_s( c6, True, 1, []) self.blocks_vector_source_x_0_0_0_0_0 = blocks.vector_source_s( c5, True, 1, []) self.blocks_vector_source_x_0_0_0_0 = blocks.vector_source_s( c4, True, 1, []) self.blocks_vector_source_x_0_0_0 = blocks.vector_source_s( c3, True, 1, []) self.blocks_vector_source_x_0_0 = blocks.vector_source_s( c2, True, 1, []) self.blocks_vector_source_x_0 = blocks.vector_source_s(c1, True, 1, []) self.blocks_throttle_0 = blocks.throttle(gr.sizeof_short * 1, 1e6, True) self.blocks_short_to_float_0 = blocks.short_to_float(1, 1) self.blocks_null_sink_0_1 = blocks.null_sink(gr.sizeof_gr_complex * 1) self.blocks_multiply_const_vxx_0_1_0_0_0 = blocks.multiply_const_vss( (-1, )) self.blocks_multiply_const_vxx_0_1_0_0 = blocks.multiply_const_vss( (1, )) self.blocks_multiply_const_vxx_0_1_0 = blocks.multiply_const_vss( (-1, )) self.blocks_multiply_const_vxx_0_1 = blocks.multiply_const_vss((-1, )) self.blocks_multiply_const_vxx_0_0 = blocks.multiply_const_vss((1, )) self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vss((2, )) self.blocks_float_to_complex_0 = blocks.float_to_complex(1) self.blocks_delay_0 = blocks.delay(gr.sizeof_gr_complex * 1, 1) self.blocks_complex_to_real_0_1 = blocks.complex_to_real(1) self.blocks_char_to_float_1_0_0_0 = blocks.char_to_float(1, 1) self.blocks_char_to_float_0 = blocks.char_to_float(1, 1) self.blocks_add_xx_1 = blocks.add_vcc(1) self.blocks_add_xx_0 = blocks.add_vss(1) self.analog_fastnoise_source_x_0 = analog.fastnoise_source_c( analog.GR_GAUSSIAN, noise_amp, 0, 8192) self.analog_const_source_x_0 = analog.sig_source_f( 0, analog.GR_CONST_WAVE, 0, 0, 0) ################################################## # Connections ################################################## self.connect((self.analog_const_source_x_0, 0), (self.blocks_float_to_complex_0, 1)) self.connect((self.analog_fastnoise_source_x_0, 0), (self.blocks_add_xx_1, 0)) self.connect((self.blocks_add_xx_0, 0), (self.blocks_throttle_0, 0)) self.connect((self.blocks_add_xx_1, 0), (self.qtgui_freq_sink_x_0, 0)) self.connect((self.blocks_add_xx_1, 0), (self.root_raised_cosine_filter_0_0, 0)) self.connect((self.blocks_char_to_float_0, 0), (self.blocks_float_to_complex_0, 0)) self.connect((self.blocks_char_to_float_1_0_0_0, 0), (self.qtgui_time_sink_x_1, 0)) self.connect((self.blocks_complex_to_real_0_1, 0), (self.digital_binary_slicer_fb_1_0_0_0, 0)) self.connect((self.blocks_delay_0, 0), (self.blocks_add_xx_1, 1)) self.connect((self.blocks_float_to_complex_0, 0), (self.root_raised_cosine_filter_0, 0)) self.connect((self.blocks_multiply_const_vxx_0, 0), (self.blocks_add_xx_0, 0)) self.connect((self.blocks_multiply_const_vxx_0_0, 0), (self.blocks_add_xx_0, 1)) self.connect((self.blocks_multiply_const_vxx_0_1, 0), (self.blocks_add_xx_0, 2)) self.connect((self.blocks_multiply_const_vxx_0_1_0, 0), (self.blocks_add_xx_0, 3)) self.connect((self.blocks_multiply_const_vxx_0_1_0_0, 0), (self.blocks_add_xx_0, 4)) self.connect((self.blocks_multiply_const_vxx_0_1_0_0_0, 0), (self.blocks_add_xx_0, 5)) self.connect((self.blocks_short_to_float_0, 0), (self.digital_binary_slicer_fb_0, 0)) self.connect((self.blocks_throttle_0, 0), (self.blocks_short_to_float_0, 0)) self.connect((self.blocks_vector_source_x_0, 0), (self.blocks_multiply_const_vxx_0, 0)) self.connect((self.blocks_vector_source_x_0_0, 0), (self.blocks_multiply_const_vxx_0_0, 0)) self.connect((self.blocks_vector_source_x_0_0_0, 0), (self.blocks_multiply_const_vxx_0_1, 0)) self.connect((self.blocks_vector_source_x_0_0_0_0, 0), (self.blocks_multiply_const_vxx_0_1_0, 0)) self.connect((self.blocks_vector_source_x_0_0_0_0_0, 0), (self.blocks_multiply_const_vxx_0_1_0_0, 0)) self.connect((self.blocks_vector_source_x_0_0_0_0_0_0, 0), (self.blocks_multiply_const_vxx_0_1_0_0_0, 0)) self.connect((self.digital_binary_slicer_fb_0, 0), (self.digital_map_bb_0, 0)) self.connect((self.digital_binary_slicer_fb_1_0_0_0, 0), (self.blocks_char_to_float_1_0_0_0, 0)) self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.qtgui_const_sink_x_0, 0)) self.connect((self.digital_corr_est_cc_0_1, 1), (self.blocks_complex_to_real_0_1, 0)) self.connect((self.digital_corr_est_cc_0_1, 0), (self.blocks_null_sink_0_1, 0)) self.connect((self.digital_map_bb_0, 0), (self.blocks_char_to_float_0, 0)) self.connect((self.root_raised_cosine_filter_0, 0), (self.blocks_delay_0, 0)) self.connect((self.root_raised_cosine_filter_0_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) self.connect((self.root_raised_cosine_filter_0_0, 0), (self.digital_corr_est_cc_0_1, 0))
def test_multiply_const_vss_five(self): src_data = (1, 2, 3, 4, 5) op = blocks.multiply_const_vss((6, 7, 8, 9, 10)) exp_data = (6, 14, 24, 36, 50) self.help_const_ss(src_data, exp_data, op)
def test_multiply_const_vss_one(self): src_data = (2, ) op = blocks.multiply_const_vss((3, )) exp_data = (6, ) self.help_const_ss(src_data, exp_data, op)
def test_multiply_const_vss_one(self): src_data = (2,) op = blocks.multiply_const_vss((3,)) exp_data = (6,) self.help_const_ss(src_data, exp_data, op)