gnuradio.blocks

Processing blocks common to many flowgraphs.

Audio Signals

gnuradio.blocks.wavfile_sink Write stream to a Microsoft PCM (.wav) file.
gnuradio.blocks.wavfile_source Read stream from a Microsoft PCM (.wav) file, output floats.

Boolean Operators

gnuradio.blocks.and_bb output = input[0] & input[1] & ... & input[M-1]
gnuradio.blocks.and_const_bb output[m] = input[m] & value for all M streams.
gnuradio.blocks.and_const_ii output[m] = input[m] & value for all M streams.
gnuradio.blocks.and_const_ss output[m] = input[m] & value for all M streams.
gnuradio.blocks.and_ii output = input[0] & input[1] & ... & input[M-1]
gnuradio.blocks.and_ss output = input[0] & input[1] & ... & input[M-1]
gnuradio.blocks.not_bb output = ~input
gnuradio.blocks.not_ii output = ~input
gnuradio.blocks.not_ss output = ~input
gnuradio.blocks.or_bb output = input_0 | input_1 | , ... | input_N)
gnuradio.blocks.or_ii output = input_0 | input_1 | , ... | input_N)
gnuradio.blocks.or_ss output = input_0 | input_1 | , ... | input_N)
gnuradio.blocks.xor_bb output = input_0 ^ input_1 ^ , ... ^ input_N)
gnuradio.blocks.xor_ii output = input_0 ^ input_1 ^ , ... ^ input_N)
gnuradio.blocks.xor_ss output = input_0 ^ input_1 ^ , ... ^ input_N)

Byte Operators

gnuradio.blocks.packed_to_unpacked_bb Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
gnuradio.blocks.packed_to_unpacked_ii Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
gnuradio.blocks.packed_to_unpacked_ss Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
gnuradio.blocks.unpacked_to_packed_bb Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
gnuradio.blocks.unpacked_to_packed_ii Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
gnuradio.blocks.unpacked_to_packed_ss Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
gnuradio.blocks.pack_k_bits_bb Converts a stream of bytes with 1 bit in the LSB to a byte with k relevent bits.
gnuradio.blocks.repack_bits_bb Repack bits from the input stream onto bits of the output stream.
gnuradio.blocks.unpack_k_bits_bb Converts a byte with k relevent bits to k output bytes with 1 bit in the LSB.

ControlPort

gnuradio.blocks.ctrlport_probe2_c A ControlPort probe to export vectors of signals.
gnuradio.blocks.ctrlport_probe_c A ControlPort probe to export vectors of signals.

Debug Tools

gnuradio.blocks.vector_sink_b unsigned char sink that writes to a vector
gnuradio.blocks.vector_sink_c gr_complex sink that writes to a vector
gnuradio.blocks.vector_sink_f float sink that writes to a vector
gnuradio.blocks.vector_sink_i int sink that writes to a vector
gnuradio.blocks.vector_sink_s short sink that writes to a vector
gnuradio.blocks.annotator_1to1 1-to-1 stream annotator testing block. FOR TESTING PURPOSES ONLY.
gnuradio.blocks.annotator_alltoall All-to-all stream annotator testing block.
gnuradio.blocks.annotator_raw raw stream annotator testing block.
gnuradio.blocks.message_debug Debug block for the message passing system.
gnuradio.blocks.random_pdu Sends a random PDU at intervals.
gnuradio.blocks.tag_debug Bit bucket that prints out any tag received.

File Operators

gnuradio.blocks.file_descriptor_sink Write stream to file descriptor.
gnuradio.blocks.file_descriptor_source Read stream from file descriptor.
gnuradio.blocks.file_meta_sink Write stream to file with meta-data headers.
gnuradio.blocks.file_meta_source Reads stream from file with meta-data headers.
gnuradio.blocks.file_sink Write stream to file.
gnuradio.blocks.file_source Read stream from file.
gnuradio.blocks.tagged_file_sink A file sink that uses tags to save files.

Level Controllers

gnuradio.blocks.moving_average_cc output is the moving sum of the last N samples, scaled by the scale factor
gnuradio.blocks.moving_average_ff output is the moving sum of the last N samples, scaled by the scale factor
gnuradio.blocks.moving_average_ii output is the moving sum of the last N samples, scaled by the scale factor
gnuradio.blocks.moving_average_ss output is the moving sum of the last N samples, scaled by the scale factor
gnuradio.blocks.mute_cc output = input or zero if muted.
gnuradio.blocks.mute_ff output = input or zero if muted.
gnuradio.blocks.mute_ii output = input or zero if muted.
gnuradio.blocks.mute_ss output = input or zero if muted.
gnuradio.blocks.sample_and_hold_bb sample and hold circuit
gnuradio.blocks.sample_and_hold_ff sample and hold circuit
gnuradio.blocks.sample_and_hold_ii sample and hold circuit
gnuradio.blocks.sample_and_hold_ss sample and hold circuit
gnuradio.blocks.threshold_ff Output a 1 or zero based on a threshold value.

Math Operators

gnuradio.blocks.add_cc output = sum(input[0], input[1], ..., input[M-1])
gnuradio.blocks.add_const_bb output = input + constant
gnuradio.blocks.add_const_cc output = input + constant
gnuradio.blocks.add_const_ff output = input + constant
gnuradio.blocks.add_const_ii output = input + constant
gnuradio.blocks.add_const_ss output = input + constant
gnuradio.blocks.add_const_vbb output[m] = input[m] + constant vector for all M streams.
gnuradio.blocks.add_const_vcc output[m] = input[m] + constant vector for all M streams.
gnuradio.blocks.add_const_vff output[m] = input[m] + constant vector for all M streams.
gnuradio.blocks.add_const_vii output[m] = input[m] + constant vector for all M streams.
gnuradio.blocks.add_const_vss output[m] = input[m] + constant vector for all M streams.
gnuradio.blocks.add_ii output = sum(input[0], input[1], ..., input[M-1])
gnuradio.blocks.add_ss output = sum(input[0], input[1], ..., input[M-1])
gnuradio.blocks.argmax_fs Compares vectors from multiple streams and determines the index in the vector and stream number where the maximum value occurred.
gnuradio.blocks.argmax_is Compares vectors from multiple streams and determines the index in the vector and stream number where the maximum value occurred.
gnuradio.blocks.argmax_ss Compares vectors from multiple streams and determines the index in the vector and stream number where the maximum value occurred.
gnuradio.blocks.divide_cc output = input[0] / input[1] / ... / input[M-1]
gnuradio.blocks.divide_ff output = input[0] / input[1] / ... / input[M-1]
gnuradio.blocks.divide_ii output = input[0] / input[1] / ... / input[M-1]
gnuradio.blocks.divide_ss output = input[0] / input[1] / ... / input[M-1]
gnuradio.blocks.integrate_cc Integrate successive samples and decimate.
gnuradio.blocks.integrate_ff Integrate successive samples and decimate.
gnuradio.blocks.integrate_ii Integrate successive samples and decimate.
gnuradio.blocks.integrate_ss Integrate successive samples and decimate.
gnuradio.blocks.max_ff Compares vectors from multiple streams and determines the maximum value from each vector over all streams.
gnuradio.blocks.max_ii Compares vectors from multiple streams and determines the maximum value from each vector over all streams.
gnuradio.blocks.max_ss Compares vectors from multiple streams and determines the maximum value from each vector over all streams.
gnuradio.blocks.multiply_const_ii output = input * constant
gnuradio.blocks.multiply_const_ss output = input * constant
gnuradio.blocks.multiply_const_vcc output = input * constant vector (element-wise)
gnuradio.blocks.multiply_const_vff output = input * constant vector (element-wise)
gnuradio.blocks.multiply_const_vii output = input * constant vector (element-wise)
gnuradio.blocks.multiply_const_vss output = input * constant vector (element-wise)
gnuradio.blocks.multiply_ii output = prod (input_0, input_1, ...)
gnuradio.blocks.multiply_ss output = prod (input_0, input_1, ...)
gnuradio.blocks.sub_cc output = input_0 - input_1 - ...)
gnuradio.blocks.sub_ff output = input_0 - input_1 - ...)
gnuradio.blocks.sub_ii output = input_0 - input_1 - ...)
gnuradio.blocks.sub_ss output = input_0 - input_1 - ...)
gnuradio.blocks.add_ff output = sum (input_0, input_1, ...)
gnuradio.blocks.conjugate_cc output = complex conjugate of input
gnuradio.blocks.multiply_cc output = prod (input_0, input_1, ...)
gnuradio.blocks.multiply_conjugate_cc Multiplies stream 0 by the complex conjugate of stream 1.
gnuradio.blocks.multiply_const_cc output = input * complex constant
gnuradio.blocks.multiply_const_ff output = input * real constant
gnuradio.blocks.multiply_ff output = prod (input_0, input_1, ...)
gnuradio.blocks.nlog10_ff output = n*log10(input) + k
gnuradio.blocks.rms_cf RMS average power.
gnuradio.blocks.rms_ff RMS average power.
gnuradio.blocks.transcendental A block that performs various transcendental math operations.

Measurement Tools

gnuradio.blocks.probe_signal_b Sink that allows a sample to be grabbed from Python.
gnuradio.blocks.probe_signal_c Sink that allows a sample to be grabbed from Python.
gnuradio.blocks.probe_signal_f Sink that allows a sample to be grabbed from Python.
gnuradio.blocks.probe_signal_i Sink that allows a sample to be grabbed from Python.
gnuradio.blocks.probe_signal_s Sink that allows a sample to be grabbed from Python.
gnuradio.blocks.probe_signal_vb Sink that allows a vector of samples to be grabbed from Python.
gnuradio.blocks.probe_signal_vc Sink that allows a vector of samples to be grabbed from Python.
gnuradio.blocks.probe_signal_vf Sink that allows a vector of samples to be grabbed from Python.
gnuradio.blocks.probe_signal_vi Sink that allows a vector of samples to be grabbed from Python.
gnuradio.blocks.probe_signal_vs Sink that allows a vector of samples to be grabbed from Python.
gnuradio.blocks.ctrlport_probe2_c A ControlPort probe to export vectors of signals.
gnuradio.blocks.ctrlport_probe_c A ControlPort probe to export vectors of signals.
gnuradio.blocks.message_debug Debug block for the message passing system.
gnuradio.blocks.probe_rate throughput measurement
gnuradio.blocks.tag_debug Bit bucket that prints out any tag received.

Message Tools

gnuradio.blocks.message_burst_source make(size_t itemsize, msg_queue_sptr msgq) -> message_burst_source_sptr
gnuradio.blocks.message_debug Debug block for the message passing system.
gnuradio.blocks.message_sink make(size_t itemsize, msg_queue_sptr msgq, bool dont_block, std::string const & lengthtagname) -> message_sink_sptr
gnuradio.blocks.message_source make(size_t itemsize, msg_queue_sptr msgq) -> message_source_sptr
gnuradio.blocks.message_strobe Send message at defined interval.
gnuradio.blocks.pdu_to_tagged_stream Turns received PDUs into a tagged stream of items.
gnuradio.blocks.random_pdu Sends a random PDU at intervals.
gnuradio.blocks.tagged_stream_to_pdu Turns received stream data and tags into PDUs and sends them through a message port.

Miscellaneous

gnuradio.blocks.vector_source_b Source that streams unsigned char items based on the input vector.
gnuradio.blocks.vector_source_c Source that streams gr_complex items based on the input vector.
gnuradio.blocks.vector_source_f Source that streams float items based on the input vector.
gnuradio.blocks.vector_source_i Source that streams int items based on the input vector.
gnuradio.blocks.vector_source_s Source that streams short items based on the input vector.
gnuradio.blocks.bin_statistics_f control scanning and record frequency domain statistics
gnuradio.blocks.check_lfsr_32k_s sink that checks if its input stream consists of a lfsr_32k sequence.
gnuradio.blocks.copy output[i] = input[i]
gnuradio.blocks.delay delay the input by a certain number of samples
gnuradio.blocks.head copies the first N items to the output then signals done
gnuradio.blocks.lfsr_32k_source_s LFSR pseudo-random source with period of 2^15 bits (2^11 shorts)
gnuradio.blocks.nop Does nothing.
gnuradio.blocks.null_sink Bit bucket.
gnuradio.blocks.null_source A source of zeros used mainly for testing.
gnuradio.blocks.skiphead skips the first N items, from then on copies items to the output
gnuradio.blocks.throttle throttle flow of samples such that the average rate does not exceed samples_per_sec.

Modulators and Demodulators

gnuradio.blocks.vco_f VCO - Voltage controlled oscillator.

Networking Tools

gnuradio.blocks.socket_pdu Creates socket interface and translates traffic to PDUs.
gnuradio.blocks.tuntap_pdu Creates TUNTAP interface and translates traffic to PDUs.
gnuradio.blocks.udp_sink Write stream to an UDP socket.
gnuradio.blocks.udp_source Read stream from an UDP socket.

Peak Detectors

gnuradio.blocks.peak_detector_fb Detect the peak of a signal.
gnuradio.blocks.peak_detector_ib Detect the peak of a signal.
gnuradio.blocks.peak_detector_sb Detect the peak of a signal.
gnuradio.blocks.burst_tagger Sets a burst on/off tag based on the value of the trigger input.
gnuradio.blocks.peak_detector2_fb Detect the peak of a signal.
gnuradio.blocks.plateau_detector_fb Detects a plateau and marks the middle.

Stream Operators

gnuradio.blocks.vector_insert_b source of unsigned char’s that gets its data from a vector
gnuradio.blocks.vector_insert_c source of gr_complex’s that gets its data from a vector
gnuradio.blocks.vector_insert_f source of float’s that gets its data from a vector
gnuradio.blocks.vector_insert_i source of int’s that gets its data from a vector
gnuradio.blocks.vector_insert_s source of short’s that gets its data from a vector
gnuradio.blocks.deinterleave deinterleave an input block of samples into N outputs.
gnuradio.blocks.endian_swap Convert stream of items into thier byte swapped version.
gnuradio.blocks.interleave interleave N inputs into a single output
gnuradio.blocks.keep_m_in_n decimate a stream, keeping items out of every .
gnuradio.blocks.keep_one_in_n decimate a stream, keeping one item out of every .
gnuradio.blocks.patterned_interleaver Interleave items based on the provided vector .
gnuradio.blocks.regenerate_bb Detect the peak of a signal and repeat every period samples.
gnuradio.blocks.repeat repeat each input times
gnuradio.blocks.stream_mux Stream muxing block to multiplex many streams into one with a specified format.
gnuradio.blocks.stream_to_streams convert a stream of items into a N streams of items
gnuradio.blocks.stream_to_vector convert a stream of items into a stream of gnuradio/blocks containing nitems_per_block
gnuradio.blocks.streams_to_stream Convert N streams of 1 item into a 1 stream of N items.
gnuradio.blocks.streams_to_vector convert N streams of items to 1 stream of vector length N
gnuradio.blocks.stretch_ff adjust y-range of an input vector by mapping to range (max-of-input, stipulated-min). Primarily for spectral signature matching by normalizing spectrum dynamic ranges.
gnuradio.blocks.tagged_stream_mux Combines tagged streams.
gnuradio.blocks.vector_map Maps elements from a set of input vectors to a set of output vectors.
gnuradio.blocks.vector_to_stream convert a stream of gnuradio/blocks of nitems_per_block items into a stream of items
gnuradio.blocks.vector_to_streams Convert 1 stream of vectors of length N to N streams of items.

Stream Tag Tools

gnuradio.blocks.burst_tagger Sets a burst on/off tag based on the value of the trigger input.
gnuradio.blocks.tag_debug Bit bucket that prints out any tag received.
gnuradio.blocks.tagged_file_sink A file sink that uses tags to save files.

Data Type Converters

gnuradio.blocks.char_to_float Convert stream of chars to a stream of float.
gnuradio.blocks.char_to_short Convert stream of chars to a stream of shorts.
gnuradio.blocks.complex_to_arg complex in, arg (arctan) out (float)
gnuradio.blocks.complex_to_float Convert a stream of gr_complex to 1 or 2 streams of float.
gnuradio.blocks.complex_to_imag Produces the imaginary part (as a float0 of a complex stream.
gnuradio.blocks.complex_to_interleaved_short Convert stream of complex to a stream of interleaved shorts.
gnuradio.blocks.complex_to_mag complex in, magnitude out (float)
gnuradio.blocks.complex_to_mag_squared complex in, magnitude squared out (float)
gnuradio.blocks.complex_to_real Produces the real part (as a float0 of a complex stream.
gnuradio.blocks.float_to_char Convert stream of floats to a stream of char.
gnuradio.blocks.float_to_complex one or two floats in, complex out
gnuradio.blocks.float_to_int Convert stream of floats to a stream of ints.
gnuradio.blocks.float_to_short Convert stream of floats to a stream of shorts.
gnuradio.blocks.float_to_uchar Convert stream of floats to a stream of unsigned chars.
gnuradio.blocks.int_to_float Convert stream of ints to a stream of floats.
gnuradio.blocks.interleaved_short_to_complex Convert stream of interleaved shorts to a stream of complex.
gnuradio.blocks.short_to_char Convert stream of shorts to a stream of chars.
gnuradio.blocks.short_to_float Convert stream of shorts to a stream of floats.
gnuradio.blocks.uchar_to_float Convert stream of unsigned chars to a stream of floats.