gnuradio.blocks: Miscellaneous

gnuradio.blocks.vector_source_b(__dummy_0__ data, bool repeat = False, int vlen = 1, tags_vector_t tags = std::vector< gr::tag_t >()) → sptr

source of unsigned char’s that gets its data from a vector

Constructor Specific Documentation:

Parameters:
  • data
  • repeat
  • vlen
  • tags
vector_source_b_sptr.active_thread_priority(self) → int
vector_source_b_sptr.rewind(self)
vector_source_b_sptr.set_data(self, __dummy_0__ data, tags_vector_t tags = std::vector< gr::tag_t >())
vector_source_b_sptr.set_thread_priority(self, int priority) → int
vector_source_b_sptr.thread_priority(self) → int
gnuradio.blocks.vector_source_c(std::vector<(gr_complex, std::allocator<(gr_complex)>)> data, bool repeat = False, int vlen = 1, tags_vector_t tags = std::vector< gr::tag_t >()) → sptr

source of gr_complex’s that gets its data from a vector

Constructor Specific Documentation:

Parameters:
  • data
  • repeat
  • vlen
  • tags
vector_source_c_sptr.active_thread_priority(self) → int
vector_source_c_sptr.rewind(self)
vector_source_c_sptr.set_data(*args, **kwargs)

set_data(self, std::vector<(gr_complex,std::allocator<(gr_complex)>)> data, tags_vector_t tags = std::vector< gr::tag_t >())

vector_source_c_sptr.set_thread_priority(self, int priority) → int
vector_source_c_sptr.thread_priority(self) → int
gnuradio.blocks.vector_source_f(pmt_vector_float data, bool repeat = False, int vlen = 1, tags_vector_t tags = std::vector< gr::tag_t >()) → sptr

source of float’s that gets its data from a vector

Constructor Specific Documentation:

Parameters:
  • data
  • repeat
  • vlen
  • tags
vector_source_f_sptr.active_thread_priority(self) → int
vector_source_f_sptr.rewind(self)
vector_source_f_sptr.set_data(self, pmt_vector_float data, tags_vector_t tags = std::vector< gr::tag_t >())
vector_source_f_sptr.set_thread_priority(self, int priority) → int
vector_source_f_sptr.thread_priority(self) → int
gnuradio.blocks.vector_source_i(__dummy_5__ data, bool repeat = False, int vlen = 1, tags_vector_t tags = std::vector< gr::tag_t >()) → sptr

source of int’s that gets its data from a vector

Constructor Specific Documentation:

Parameters:
  • data
  • repeat
  • vlen
  • tags
vector_source_i_sptr.active_thread_priority(self) → int
vector_source_i_sptr.rewind(self)
vector_source_i_sptr.set_data(self, __dummy_5__ data, tags_vector_t tags = std::vector< gr::tag_t >())
vector_source_i_sptr.set_thread_priority(self, int priority) → int
vector_source_i_sptr.thread_priority(self) → int
gnuradio.blocks.vector_source_s(__dummy_4__ data, bool repeat = False, int vlen = 1, tags_vector_t tags = std::vector< gr::tag_t >()) → sptr

source of short’s that gets its data from a vector

Constructor Specific Documentation:

Parameters:
  • data
  • repeat
  • vlen
  • tags
vector_source_s_sptr.active_thread_priority(self) → int
vector_source_s_sptr.rewind(self)
vector_source_s_sptr.set_data(self, __dummy_4__ data, tags_vector_t tags = std::vector< gr::tag_t >())
vector_source_s_sptr.set_thread_priority(self, int priority) → int
vector_source_s_sptr.thread_priority(self) → int
gnuradio.blocks.bin_statistics_f(unsigned int vlen, sptr msgq, tune, size_t tune_delay, size_t dwell_delay) → sptr

control scanning and record frequency domain statistics

Constructor Specific Documentation:

Build a bin statistics block. See qa_bin_statistics.py and gr-uhd/examples/python/usrp_spectrum_sense.py for examples of its use, specifically how to use the callback function.

Parameters:
  • vlen – vector length
  • msgq – message queue
  • tune – a feval_dd callback function
  • tune_delay – number of samples for the tune delay
  • dwell_delay – number of samples for the dwell delay
bin_statistics_f_sptr.active_thread_priority(self) → int
bin_statistics_f_sptr.set_thread_priority(self, int priority) → int
bin_statistics_f_sptr.thread_priority(self) → int
gnuradio.blocks.check_lfsr_32k_s() → sptr

sink that checks if its input stream consists of a lfsr_32k sequence.

This sink is typically used along with gr::blocks::lfsr_32k_source_s to test the USRP using its digital loopback mode.

Constructor Specific Documentation:

check_lfsr_32k_s_sptr.active_thread_priority(self) → int
check_lfsr_32k_s_sptr.nright(self) → long
check_lfsr_32k_s_sptr.ntotal(self) → long
check_lfsr_32k_s_sptr.runlength(self) → long
check_lfsr_32k_s_sptr.set_thread_priority(self, int priority) → int
check_lfsr_32k_s_sptr.thread_priority(self) → int
gnuradio.blocks.copy(size_t itemsize) → sptr

output[i] = input[i]

When enabled (default), this block copies its input to its output. When disabled, this block drops its input on the floor.

Constructor Specific Documentation:

Parameters:itemsize
copy_sptr.active_thread_priority(self) → int
copy_sptr.enabled(self) → bool
copy_sptr.set_enabled(self, bool enable)
copy_sptr.set_thread_priority(self, int priority) → int
copy_sptr.thread_priority(self) → int
gnuradio.blocks.delay(size_t itemsize, int delay) → sptr

delay the input by a certain number of samples

Constructor Specific Documentation:

Make a delay block.

Parameters:
  • itemsize – size of the data items.
  • delay – number of samples to delay stream.
delay_sptr.active_thread_priority(self) → int
delay_sptr.dly(self) → int
delay_sptr.set_dly(self, int d)
delay_sptr.set_thread_priority(self, int priority) → int
delay_sptr.thread_priority(self) → int
gnuradio.blocks.head(size_t sizeof_stream_item, uint64_t nitems) → sptr

copies the first N items to the output then signals done

Useful for building test cases

Constructor Specific Documentation:

Parameters:
  • sizeof_stream_item
  • nitems
head_sptr.active_thread_priority(self) → int
head_sptr.reset(self)
head_sptr.set_length(self, int nitems)
head_sptr.set_thread_priority(self, int priority) → int
head_sptr.thread_priority(self) → int
gnuradio.blocks.lfsr_32k_source_s() → sptr

LFSR pseudo-random source with period of 2^15 bits (2^11 shorts)

This source is typically used along with gr::blocks::check_lfsr_32k_s to test the USRP using its digital loopback mode.

Constructor Specific Documentation:

Make a LFSR 32k source block.

lfsr_32k_source_s_sptr.active_thread_priority(self) → int
lfsr_32k_source_s_sptr.set_thread_priority(self, int priority) → int
lfsr_32k_source_s_sptr.thread_priority(self) → int
gnuradio.blocks.nop(size_t sizeof_stream_item) → sptr

Does nothing. Used for testing only.

Constructor Specific Documentation:

Build a nop block.

Parameters:sizeof_stream_item – size of the stream items in bytes.
nop_sptr.active_thread_priority(self) → int
nop_sptr.ctrlport_test(self) → int
nop_sptr.nmsgs_received(self) → int
nop_sptr.set_ctrlport_test(self, int x)
nop_sptr.set_thread_priority(self, int priority) → int
nop_sptr.thread_priority(self) → int
gnuradio.blocks.null_sink(size_t sizeof_stream_item) → sptr

Bit bucket. Use as a termination point when a sink is required and we don’t want to do anything real.

Constructor Specific Documentation:

Build a null sink block.

Parameters:sizeof_stream_item – size of the stream items in bytes.
null_sink_sptr.active_thread_priority(self) → int
null_sink_sptr.set_thread_priority(self, int priority) → int
null_sink_sptr.thread_priority(self) → int
gnuradio.blocks.null_source(size_t sizeof_stream_item) → sptr

A source of zeros used mainly for testing.

Constructor Specific Documentation:

Build a null source block.

Parameters:sizeof_stream_item – size of the stream items in bytes.
null_source_sptr.active_thread_priority(self) → int
null_source_sptr.set_thread_priority(self, int priority) → int
null_source_sptr.thread_priority(self) → int
gnuradio.blocks.skiphead(size_t itemsize, uint64_t nitems_to_skip) → sptr

skips the first N items, from then on copies items to the output

Useful for building test cases and sources which have metadata or junk at the start

Constructor Specific Documentation:

Parameters:
  • itemsize
  • nitems_to_skip
skiphead_sptr.active_thread_priority(self) → int
skiphead_sptr.set_thread_priority(self, int priority) → int
skiphead_sptr.thread_priority(self) → int
gnuradio.blocks.throttle(size_t itemsize, double samples_per_sec) → sptr

throttle flow of samples such that the average rate does not exceed samples_per_sec.

input: one stream of itemsize; output: one stream of itemsize

N.B. this should only be used in GUI apps where there is no other rate limiting block. It is not intended nor effective at precisely controlling the rate of samples. That should be controlled by a source or sink tied to sample clock. E.g., a USRP or audio card.

Constructor Specific Documentation:

Parameters:
  • itemsize
  • samples_per_sec
throttle_sptr.active_thread_priority(self) → int
throttle_sptr.sample_rate(self) → double

Get the sample rate in samples per second.

throttle_sptr.set_sample_rate(self, double rate)

Sets the sample rate in samples per second.

throttle_sptr.set_thread_priority(self, int priority) → int
throttle_sptr.thread_priority(self) → int

Previous topic

gnuradio.blocks: Waveform Generators

Next topic

gnuradio.analog: Level Controllers

This Page