gnuradio.gr

Signal Processing Blocks

Top Block and Hierarchical Block Base Classes

gnuradio.gr.top_block
gnuradio.gr.hier_block2 Python wrapper around the C++ hierarchical block implementation.

Signal Sources

gnuradio.gr.glfsr_source_b Galois LFSR pseudo-random source.
gnuradio.gr.glfsr_source_f Galois LFSR pseudo-random source generating float outputs -1.0 - 1.0.
gnuradio.gr.lfsr_32k_source_s LFSR pseudo-random source with period of 2^15 bits (2^11 shorts)
gnuradio.gr.null_source A source of zeros.
gnuradio.gr.noise_source_c Random number source.
gnuradio.gr.noise_source_f Random number source.
gnuradio.gr.noise_source_i Random number source.
gnuradio.gr.noise_source_s Random number source.
gnuradio.gr.sig_source_c signal generator with gr_complex output.
gnuradio.gr.sig_source_f signal generator with float output.
gnuradio.gr.sig_source_i signal generator with int output.
gnuradio.gr.sig_source_s signal generator with short output.
gnuradio.gr.vector_source_b source of unsigned char’s that gets its data from a vector
gnuradio.gr.vector_source_c source of gr_complex’s that gets its data from a vector
gnuradio.gr.vector_source_f source of float’s that gets its data from a vector
gnuradio.gr.vector_source_i source of int’s that gets its data from a vector
gnuradio.gr.vector_source_s source of short’s that gets its data from a vector
gnuradio.gr.file_descriptor_source Read stream from file descriptor.
gnuradio.gr.file_source Read stream from file.
gnuradio.gr.message_source message_source(size_t itemsize, gr_msg_queue_sptr msgq) -> gr_message_source_sptr
gnuradio.gr.udp_source Read stream from an UDP socket.
gnuradio.gr.wavfile_source Read stream from a Microsoft PCM (.wav) file, output floats.

Signal Sinks

gnuradio.gr.bin_statistics_f control scanning and record frequency domain statistics
gnuradio.gr.check_counting_s sink that checks if its input stream consists of a counting sequence.
gnuradio.gr.check_lfsr_32k_s sink that checks if its input stream consists of a lfsr_32k sequence.
gnuradio.gr.framer_sink_1 Given a stream of bits and access_code flags, assemble packets.
gnuradio.gr.null_sink Bit bucket.
gnuradio.gr.packet_sink process received bits looking for packet sync, header, and process bits into packet
gnuradio.gr.probe_avg_mag_sqrd_c compute avg magnitude squared.
gnuradio.gr.probe_avg_mag_sqrd_cf compute avg magnitude squared.
gnuradio.gr.probe_avg_mag_sqrd_f compute avg magnitude squared.
gnuradio.gr.probe_signal_f Sink that allows a sample to be grabbed from Python.
gnuradio.gr.vector_sink_b unsigned char sink that writes to a vector
gnuradio.gr.vector_sink_c gr_complex sink that writes to a vector
gnuradio.gr.vector_sink_f float sink that writes to a vector
gnuradio.gr.vector_sink_i int sink that writes to a vector
gnuradio.gr.vector_sink_s short sink that writes to a vector
gnuradio.gr.file_descriptor_sink Write stream to file descriptor.
gnuradio.gr.file_sink Write stream to file.
gnuradio.gr.histo_sink_f Histogram module.
gnuradio.gr.message_sink Gather received items into messages and insert into msgq.
gnuradio.gr.oscope_sink_f Building block for python oscilloscope module.
gnuradio.gr.udp_sink Write stream to an UDP socket.
gnuradio.gr.wavfile_sink Write stream to a Microsoft PCM (.wav) file.

Filters

gnuradio.gr.fft_filter_ccc Fast FFT filter with gr_complex input, gr_complex output and gr_complex taps.
gnuradio.gr.fft_filter_fff Fast FFT filter with float input, float output and float taps.
gnuradio.gr.filter_delay_fc Filter-Delay Combination Block.
gnuradio.gr.fir_filter_ccc FIR filter with gr_complex input, gr_complex output and gr_complex taps.
gnuradio.gr.fir_filter_ccf FIR filter with gr_complex input, gr_complex output and float taps.
gnuradio.gr.fir_filter_fcc FIR filter with float input, gr_complex output and gr_complex taps.
gnuradio.gr.fir_filter_fff FIR filter with float input, float output and float taps.
gnuradio.gr.fir_filter_fsf FIR filter with float input, short output and float taps.
gnuradio.gr.fir_filter_scc FIR filter with short input, gr_complex output and gr_complex taps.
gnuradio.gr.fractional_interpolator_cc Interpolating mmse filter with gr_complex input, gr_complex output.
gnuradio.gr.fractional_interpolator_ff Interpolating mmse filter with float input, float output.
gnuradio.gr.freq_xlating_fir_filter_ccc FIR filter combined with frequency translation with gr_complex input, gr_complex output and gr_complex taps
gnuradio.gr.freq_xlating_fir_filter_ccf FIR filter combined with frequency translation with gr_complex input, gr_complex output and float taps
gnuradio.gr.freq_xlating_fir_filter_fcc FIR filter combined with frequency translation with float input, gr_complex output and gr_complex taps
gnuradio.gr.freq_xlating_fir_filter_fcf FIR filter combined with frequency translation with float input, gr_complex output and float taps
gnuradio.gr.freq_xlating_fir_filter_scc FIR filter combined with frequency translation with short input, gr_complex output and gr_complex taps
gnuradio.gr.freq_xlating_fir_filter_scf FIR filter combined with frequency translation with short input, gr_complex output and float taps
gnuradio.gr.hilbert_fc Hilbert transformer.
gnuradio.gr.iir_filter_ffd IIR filter with float input, float output and double taps
gnuradio.gr.interp_fir_filter_ccc Interpolating FIR filter with gr_complex input, gr_complex output and gr_complex taps.
gnuradio.gr.interp_fir_filter_ccf Interpolating FIR filter with gr_complex input, gr_complex output and float taps.
gnuradio.gr.interp_fir_filter_fcc Interpolating FIR filter with float input, gr_complex output and gr_complex taps.
gnuradio.gr.interp_fir_filter_fff Interpolating FIR filter with float input, float output and float taps.
gnuradio.gr.interp_fir_filter_fsf Interpolating FIR filter with float input, short output and float taps.
gnuradio.gr.interp_fir_filter_scc Interpolating FIR filter with short input, gr_complex output and gr_complex taps.
gnuradio.gr.rational_resampler_base_ccc Rational Resampling Polyphase FIR filter with gr_complex input, gr_complex output and gr_complex taps.
gnuradio.gr.rational_resampler_base_ccf Rational Resampling Polyphase FIR filter with gr_complex input, gr_complex output and float taps.
gnuradio.gr.rational_resampler_base_fcc Rational Resampling Polyphase FIR filter with float input, gr_complex output and gr_complex taps.
gnuradio.gr.rational_resampler_base_fff Rational Resampling Polyphase FIR filter with float input, float output and float taps.
gnuradio.gr.rational_resampler_base_fsf Rational Resampling Polyphase FIR filter with float input, short output and float taps.
gnuradio.gr.rational_resampler_base_scc Rational Resampling Polyphase FIR filter with short input, gr_complex output and gr_complex taps.
gnuradio.gr.single_pole_iir_filter_cc single pole IIR filter with complex input, complex output
gnuradio.gr.single_pole_iir_filter_ff single pole IIR filter with float input, float output
gnuradio.gr.moving_average_cc output is the moving sum of the last N samples, scaled by the scale factor
gnuradio.gr.moving_average_ff output is the moving sum of the last N samples, scaled by the scale factor
gnuradio.gr.moving_average_ii output is the moving sum of the last N samples, scaled by the scale factor
gnuradio.gr.moving_average_ss output is the moving sum of the last N samples, scaled by the scale factor
gnuradio.gr.pfb_arb_resampler_ccf Polyphase filterbank arbitrary resampler with gr_complex input, gr_complex output and float taps.
gnuradio.gr.pfb_channelizer_ccf Polyphase filterbank channelizer with gr_complex input, gr_complex output and float taps.
gnuradio.gr.pfb_clock_sync_ccf Timing synchronizer using polyphase filterbanks.
gnuradio.gr.pfb_clock_sync_fff Timing synchronizer using polyphase filterbanks.
gnuradio.gr.pfb_decimator_ccf Polyphase filterbank bandpass decimator with gr_complex input, gr_complex output and float taps.
gnuradio.gr.pfb_interpolator_ccf Polyphase filterbank interpolator with gr_complex input, gr_complex output and float taps.

Mathematics

gnuradio.gr.conjugate_cc output = complex conjugate of input
gnuradio.gr.nlog10_ff output = n*log10(input) + k
gnuradio.gr.rms_cf RMS average power.
gnuradio.gr.rms_ff RMS average power.
gnuradio.gr.add_cc output = sum (input_0, input_1, ...)
gnuradio.gr.add_const_cc output = input + constant
gnuradio.gr.add_const_ff output = input + constant
gnuradio.gr.add_const_ii output = input + constant
gnuradio.gr.add_const_sf output = input + constant
gnuradio.gr.add_const_ss output = input + constant
gnuradio.gr.add_const_vcc output vector = input vector + constant vector
gnuradio.gr.add_const_vff output vector = input vector + constant vector
gnuradio.gr.add_const_vii output vector = input vector + constant vector
gnuradio.gr.add_const_vss output vector = input vector + constant vector
gnuradio.gr.add_ff Add streams of complex values.
gnuradio.gr.add_ii output = sum (input_0, input_1, ...)
gnuradio.gr.add_ss output = sum (input_0, input_1, ...)
gnuradio.gr.and_bb output = input_0 & input_1 & , ... & input_N)
gnuradio.gr.and_const_bb output_N = input_N & value
gnuradio.gr.and_const_ii output_N = input_N & value
gnuradio.gr.and_const_ss output_N = input_N & value
gnuradio.gr.and_ii output = input_0 & input_1 & , ... & input_N)
gnuradio.gr.and_ss output = input_0 & input_1 & , ... & input_N)
gnuradio.gr.divide_cc output = input_0 / input_1 / input_x ...)
gnuradio.gr.divide_ff output = input_0 / input_1 / input_x ...)
gnuradio.gr.divide_ii output = input_0 / input_1 / input_x ...)
gnuradio.gr.divide_ss output = input_0 / input_1 / input_x ...)
gnuradio.gr.integrate_cc output = sum(input[0]...input[n])
gnuradio.gr.integrate_ff output = sum(input[0]...input[n])
gnuradio.gr.integrate_ii output = sum(input[0]...input[n])
gnuradio.gr.integrate_ss output = sum(input[0]...input[n])
gnuradio.gr.multiply_cc Multiply streams of complex values.
gnuradio.gr.multiply_const_cc Multiply stream of complex values with a constant .
gnuradio.gr.multiply_const_ff Multiply stream of float values with a constant .
gnuradio.gr.multiply_const_ii output = input * constant
gnuradio.gr.multiply_const_ss output = input * constant
gnuradio.gr.multiply_const_vcc output vector = input vector * constant vector (element-wise)
gnuradio.gr.multiply_const_vff output vector = input vector * constant vector (element-wise)
gnuradio.gr.multiply_const_vii output vector = input vector * constant vector (element-wise)
gnuradio.gr.multiply_const_vss output vector = input vector * constant vector (element-wise)
gnuradio.gr.multiply_ff Multiply streams of complex values.
gnuradio.gr.multiply_ii output = prod (input_0, input_1, ...)
gnuradio.gr.multiply_ss output = prod (input_0, input_1, ...)
gnuradio.gr.not_bb output = ~input_0
gnuradio.gr.not_ii output = ~input_0
gnuradio.gr.not_ss output = ~input_0
gnuradio.gr.or_bb output = input_0 | input_1 | , ... | input_N)
gnuradio.gr.or_ii output = input_0 | input_1 | , ... | input_N)
gnuradio.gr.or_ss output = input_0 | input_1 | , ... | input_N)
gnuradio.gr.sub_cc output = input_0 - input_1 - ...)
gnuradio.gr.sub_ff output = input_0 - input_1 - ...)
gnuradio.gr.sub_ii output = input_0 - input_1 - ...)
gnuradio.gr.sub_ss output = input_0 - input_1 - ...)
gnuradio.gr.xor_bb output = input_0 ^ input_1 ^ , ... ^ input_N)
gnuradio.gr.xor_ii output = input_0 ^ input_1 ^ , ... ^ input_N)
gnuradio.gr.xor_ss output = input_0 ^ input_1 ^ , ... ^ input_N)

Modulation

gnuradio.gr.cpfsk_bc Perform continuous phase 2-level frequency shift keying modulation on an input stream of unpacked bits.
gnuradio.gr.frequency_modulator_fc Frequency modulator block
gnuradio.gr.phase_modulator_fc Phase modulator block

Demodulation

gnuradio.gr.quadrature_demod_cf quadrature demodulator: complex in, float out

Information Coding and Decoding

gnuradio.gr.additive_scrambler_bb Scramble an input stream using an LFSR. This block works on the LSB only of the input data stream, i.e., on an “unpacked binary” stream, and produces the same format on its output.
gnuradio.gr.descrambler_bb Descramble an input stream using an LFSR. This block works on the LSB only of the input data stream, i.e., on an “unpacked binary” stream, and produces the same format on its output.
gnuradio.gr.diff_decoder_bb y[0] = (x[0] - x[-1]) % M
gnuradio.gr.diff_encoder_bb y[0] = (x[0] + y[-1]) % M
gnuradio.gr.fake_channel_encoder_pp pad packet with alternating 1,0 pattern.
gnuradio.gr.fake_channel_decoder_pp remove fake padding from packet
gnuradio.gr.map_bb output[i] = map[input[i]]
gnuradio.gr.scrambler_bb Scramble an input stream using an LFSR. This block works on the LSB only of the input data stream, i.e., on an “unpacked binary” stream, and produces the same format on its output.

Synchronization

gnuradio.gr.pll_carriertracking_cc Implements a PLL which locks to the input frequency and outputs the input signal mixed with that carrier.
gnuradio.gr.pll_freqdet_cf Implements a PLL which locks to the input frequency and outputs an estimate of that frequency. Useful for FM Demod.
gnuradio.gr.pll_refout_cc Implements a PLL which locks to the input frequency and outputs a carrier
gnuradio.gr.pn_correlator_cc PN code sequential search correlator.
gnuradio.gr.simple_correlator inverse of gr_simple_framer (more or less)
gnuradio.gr.simple_framer add sync field, seq number and command field to payload

Type Conversions

gnuradio.gr.bytes_to_syms Convert stream of bytes to stream of +/- 1 symbols input: stream of bytes; output: stream of float.
gnuradio.gr.char_to_float Convert stream of chars to a stream of float.
gnuradio.gr.complex_to_interleaved_short Convert stream of complex to a stream of interleaved shorts.
gnuradio.gr.complex_to_float convert a stream of gr_complex to 1 or 2 streams of float
gnuradio.gr.complex_to_real complex in, real out (float)
gnuradio.gr.complex_to_imag complex in, imaginary out (float)
gnuradio.gr.complex_to_mag complex in, magnitude out (float)
gnuradio.gr.complex_to_mag_squared complex in, magnitude squared out (float)
gnuradio.gr.complex_to_arg complex in, angle out (float)
gnuradio.gr.float_to_char Convert stream of float to a stream of char.
gnuradio.gr.float_to_complex Convert 1 or 2 streams of float to a stream of gr_complex.
gnuradio.gr.float_to_short Convert stream of float to a stream of short.
gnuradio.gr.float_to_uchar Convert stream of float to a stream of unsigned char.
gnuradio.gr.interleaved_short_to_complex Convert stream of interleaved shorts to a stream of complex.
gnuradio.gr.short_to_float Convert stream of short to a stream of float.
gnuradio.gr.uchar_to_float Convert stream of unsigned chars to a stream of float.
gnuradio.gr.unpack_k_bits_bb Converts a byte with k relevent bits to k output bytes with 1 bit in the LSB.
gnuradio.gr.chunks_to_symbols_bc Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex onstellation points.in dimensions ( = 1 by default) input: stream of unsigned char; output: stream of gr_complex.
gnuradio.gr.chunks_to_symbols_bf Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex onstellation points.in dimensions ( = 1 by default) input: stream of unsigned char; output: stream of float.
gnuradio.gr.chunks_to_symbols_ic Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex onstellation points.in dimensions ( = 1 by default) input: stream of int; output: stream of gr_complex.
gnuradio.gr.chunks_to_symbols_if Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex onstellation points.in dimensions ( = 1 by default) input: stream of int; output: stream of float.
gnuradio.gr.chunks_to_symbols_sc Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex onstellation points.in dimensions ( = 1 by default) input: stream of short; output: stream of gr_complex.
gnuradio.gr.chunks_to_symbols_sf Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex onstellation points.in dimensions ( = 1 by default) input: stream of short; output: stream of float.
gnuradio.gr.packed_to_unpacked_bb Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
gnuradio.gr.packed_to_unpacked_ii Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
gnuradio.gr.packed_to_unpacked_ss Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
gnuradio.gr.unpacked_to_packed_bb Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
gnuradio.gr.unpacked_to_packed_ii Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
gnuradio.gr.unpacked_to_packed_ss Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.

Signal Level Control (AGC)

gnuradio.gr.agc2_cc high performance Automatic Gain Control class
gnuradio.gr.agc2_ff high performance Automatic Gain Control class
gnuradio.gr.agc_cc high performance Automatic Gain Control class
gnuradio.gr.agc_ff high performance Automatic Gain Control class
gnuradio.gr.ctcss_squelch_ff gate or zero output if ctcss tone not present
gnuradio.gr.dpll_bb Detect the peak of a signal
gnuradio.gr.feedforward_agc_cc Non-causal AGC which computes required gain based on max absolute value over nsamples.
gnuradio.gr.peak_detector2_fb Detect the peak of a signal
gnuradio.gr.pwr_squelch_cc gate or zero output when input power below threshold
gnuradio.gr.pwr_squelch_ff gate or zero output when input power below threshold
gnuradio.gr.regenerate_bb Detect the peak of a signal and repeat every period samples
gnuradio.gr.simple_squelch_cc simple squelch block based on average signal power and threshold in dB.
gnuradio.gr.mute_cc output = input or zero if muted.
gnuradio.gr.mute_ff output = input or zero if muted.
gnuradio.gr.mute_ii output = input or zero if muted.
gnuradio.gr.mute_ss output = input or zero if muted.
gnuradio.gr.peak_detector_fb Detect the peak of a signal
gnuradio.gr.peak_detector_ib Detect the peak of a signal
gnuradio.gr.peak_detector_sb Detect the peak of a signal
gnuradio.gr.sample_and_hold_bb sample and hold circuit
gnuradio.gr.sample_and_hold_ff sample and hold circuit
gnuradio.gr.sample_and_hold_ii sample and hold circuit
gnuradio.gr.sample_and_hold_ss sample and hold circuit

Fourier Transform

gnuradio.gr.goertzel_fc Goertzel single-bin DFT calculation.
gnuradio.gr.fft_vcc Compute forward or reverse FFT. complex vector in / complex vector out.
gnuradio.gr.fft_vfc Compute forward FFT. float vector in / complex vector out.

Miscellaneous Blocks

gnuradio.gr.copy output[i] = input[i]
gnuradio.gr.delay delay the input by a certain number of samples
gnuradio.gr.kludge_copy output[i] = input[i]
gnuradio.gr.nop Does nothing.
gnuradio.gr.pa_2x2_phase_combiner pa_2x2 phase combiner
gnuradio.gr.repeat Repeat a sample ‘interp’ times in output stream.
gnuradio.gr.threshold_ff Please fix my documentation.
gnuradio.gr.throttle throttle flow of samples such that the average rate does not exceed samples_per_sec.
gnuradio.gr.channel_model channel simulator

Slicing and Dicing Streams

gnuradio.gr.deinterleave deinterleave a single input into N outputs
gnuradio.gr.head copies the first N items to the output then signals done
gnuradio.gr.interleave interleave N inputs to a single output
gnuradio.gr.keep_one_in_n decimate a stream, keeping one item out of every n.
gnuradio.gr.skiphead skips the first N items, from then on copies items to the output
gnuradio.gr.stream_to_streams convert a stream of items into a N streams of items
gnuradio.gr.stream_to_vector convert a stream of items into a stream of blocks containing nitems_per_block
gnuradio.gr.streams_to_stream Convert N streams of 1 item into a 1 stream of N items
gnuradio.gr.streams_to_vector convert N streams of items to 1 stream of vector length N
gnuradio.gr.vector_to_stream convert a stream of blocks of nitems_per_block items into a stream of items
gnuradio.gr.vector_to_streams Convert 1 stream of vectors of length N to N streams of items.

Digital Filter Design

gnuradio.gr.firdes Finite Impulse Response (FIR) filter design functions.
gnuradio.gr.remez Parks-McClellan FIR filter design.

Miscellaneous

gnuradio.gr.feval_dd Proxy of C++ gr_py_feval_dd class
gnuradio.gr.feval_cc Proxy of C++ gr_py_feval_cc class
gnuradio.gr.feval_ll Proxy of C++ gr_py_feval_ll class
gnuradio.gr.feval Proxy of C++ gr_py_feval class
gnuradio.gr.prefs Return the global preference data base
gnuradio.gr.test Test class for testing runtime system (setting up buffers and such.)
gnuradio.gr.message Message class.
gnuradio.gr.msg_queue thread-safe message queue
gnuradio.gr.enable_realtime_scheduling If possible, enable high-priority “real time” scheduling.

Implementation Details

gnuradio.gr.block_detail Implementation details to support the signal processing abstraction
gnuradio.gr.buffer Single writer, multiple reader fifo.
gnuradio.gr.dispatcher invoke callbacks based on select.
gnuradio.gr.single_threaded_scheduler Simple scheduler for stream computations.