Processing blocks common to many flowgraphs.
output[m] = abs(input[m]) for all M streams.
absolute value of data stream (Strip sign)
Constructor Specific Documentation:
Create an instance of abs_ff.
Parameters: | vlen – |
---|
declare_sample_delay(abs_ff_sptr self, unsigned int delay)
pc_input_buffers_full_avg(abs_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(abs_ff_sptr self) -> pmt_vector_float
output[m] = abs(input[m]) for all M streams.
absolute value of data stream (Strip sign)
Constructor Specific Documentation:
Create an instance of abs_ii.
Parameters: | vlen – |
---|
declare_sample_delay(abs_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(abs_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(abs_ii_sptr self) -> pmt_vector_float
output[m] = abs(input[m]) for all M streams.
absolute value of data stream (Strip sign)
Constructor Specific Documentation:
Create an instance of abs_ss.
Parameters: | vlen – |
---|
declare_sample_delay(abs_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(abs_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(abs_ss_sptr self) -> pmt_vector_float
output = sum(input[0], input[1], ..., input[M-1])
Add samples across all input streams. For all samples on all input streams :
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(add_cc_sptr self, unsigned int delay)
pc_input_buffers_full_avg(add_cc_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(add_cc_sptr self) -> pmt_vector_float
output = input + constant
Constructor Specific Documentation:
Create an instance of add_const_bb.
Parameters: | k – additive constant |
---|
declare_sample_delay(add_const_bb_sptr self, unsigned int delay)
Return additive constant.
pc_input_buffers_full_avg(add_const_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(add_const_bb_sptr self) -> pmt_vector_float
Set additive constant.
output = input + constant
Constructor Specific Documentation:
Create an instance of add_const_cc.
Parameters: | k – additive constant |
---|
declare_sample_delay(add_const_cc_sptr self, unsigned int delay)
Return additive constant.
pc_input_buffers_full_avg(add_const_cc_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(add_const_cc_sptr self) -> pmt_vector_float
Set additive constant.
output = input + constant
Constructor Specific Documentation:
Create an instance of add_const_ff.
Parameters: | k – additive constant |
---|
declare_sample_delay(add_const_ff_sptr self, unsigned int delay)
Return additive constant.
pc_input_buffers_full_avg(add_const_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(add_const_ff_sptr self) -> pmt_vector_float
Set additive constant.
output = input + constant
Constructor Specific Documentation:
Create an instance of add_const_ii.
Parameters: | k – additive constant |
---|
declare_sample_delay(add_const_ii_sptr self, unsigned int delay)
Return additive constant.
pc_input_buffers_full_avg(add_const_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(add_const_ii_sptr self) -> pmt_vector_float
Set additive constant.
output = input + constant
Constructor Specific Documentation:
Create an instance of add_const_ss.
Parameters: | k – additive constant |
---|
declare_sample_delay(add_const_ss_sptr self, unsigned int delay)
Return additive constant.
pc_input_buffers_full_avg(add_const_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(add_const_ss_sptr self) -> pmt_vector_float
Set additive constant.
output[m] = input[m] + constant vector for all M streams.
Constructor Specific Documentation:
Create an instance of add_const_vbb.
Parameters: | k – additive constant vector |
---|
declare_sample_delay(add_const_vbb_sptr self, unsigned int delay)
Return additive constant vector.
pc_input_buffers_full_avg(add_const_vbb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(add_const_vbb_sptr self) -> pmt_vector_float
Set additive constant vector.
output[m] = input[m] + constant vector for all M streams.
Constructor Specific Documentation:
Create an instance of add_const_vcc.
Parameters: | k – additive constant vector |
---|
declare_sample_delay(add_const_vcc_sptr self, unsigned int delay)
Return additive constant vector.
pc_input_buffers_full_avg(add_const_vcc_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(add_const_vcc_sptr self) -> pmt_vector_float
Set additive constant vector.
output[m] = input[m] + constant vector for all M streams.
Constructor Specific Documentation:
Create an instance of add_const_vff.
Parameters: | k – additive constant vector |
---|
declare_sample_delay(add_const_vff_sptr self, unsigned int delay)
Return additive constant vector.
pc_input_buffers_full_avg(add_const_vff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(add_const_vff_sptr self) -> pmt_vector_float
Set additive constant vector.
output[m] = input[m] + constant vector for all M streams.
Constructor Specific Documentation:
Create an instance of add_const_vii.
Parameters: | k – additive constant vector |
---|
declare_sample_delay(add_const_vii_sptr self, unsigned int delay)
Return additive constant vector.
pc_input_buffers_full_avg(add_const_vii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(add_const_vii_sptr self) -> pmt_vector_float
Set additive constant vector.
output[m] = input[m] + constant vector for all M streams.
Constructor Specific Documentation:
Create an instance of add_const_vss.
Parameters: | k – additive constant vector |
---|
declare_sample_delay(add_const_vss_sptr self, unsigned int delay)
Return additive constant vector.
pc_input_buffers_full_avg(add_const_vss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(add_const_vss_sptr self) -> pmt_vector_float
Set additive constant vector.
output = sum (input_0, input_1, ...)
Add across all input streams.
Constructor Specific Documentation:
Add streams of float values.
Parameters: | vlen – Vector length |
---|
declare_sample_delay(add_ff_sptr self, unsigned int delay)
pc_input_buffers_full_avg(add_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(add_ff_sptr self) -> pmt_vector_float
output = sum(input[0], input[1], ..., input[M-1])
Add samples across all input streams. For all samples on all input streams :
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(add_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(add_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(add_ii_sptr self) -> pmt_vector_float
output = sum(input[0], input[1], ..., input[M-1])
Add samples across all input streams. For all samples on all input streams :
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(add_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(add_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(add_ss_sptr self) -> pmt_vector_float
output = input[0] & input[1] & ... & input[M-1]
bitwise boolean AND across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(and_bb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(and_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(and_bb_sptr self) -> pmt_vector_float
output[m] = input[m] & value for all M streams.
Bitwise boolean AND of constant with the data stream.
Constructor Specific Documentation:
Create an instance of and_const_bb.
Parameters: | k – AND constant |
---|
declare_sample_delay(and_const_bb_sptr self, unsigned int delay)
Return AND constant.
pc_input_buffers_full_avg(and_const_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(and_const_bb_sptr self) -> pmt_vector_float
Set AND constant.
output[m] = input[m] & value for all M streams.
Bitwise boolean AND of constant with the data stream.
Constructor Specific Documentation:
Create an instance of and_const_ii.
Parameters: | k – AND constant |
---|
declare_sample_delay(and_const_ii_sptr self, unsigned int delay)
Return AND constant.
pc_input_buffers_full_avg(and_const_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(and_const_ii_sptr self) -> pmt_vector_float
Set AND constant.
output[m] = input[m] & value for all M streams.
Bitwise boolean AND of constant with the data stream.
Constructor Specific Documentation:
Create an instance of and_const_ss.
Parameters: | k – AND constant |
---|
declare_sample_delay(and_const_ss_sptr self, unsigned int delay)
Return AND constant.
pc_input_buffers_full_avg(and_const_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(and_const_ss_sptr self) -> pmt_vector_float
Set AND constant.
output = input[0] & input[1] & ... & input[M-1]
bitwise boolean AND across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(and_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(and_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(and_ii_sptr self) -> pmt_vector_float
output = input[0] & input[1] & ... & input[M-1]
bitwise boolean AND across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(and_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(and_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(and_ss_sptr self) -> pmt_vector_float
1-to-1 stream annotator testing block. FOR TESTING PURPOSES ONLY.
This block creates tags to be sent downstream every 10,000 items it sees. The tags contain the name and ID of the instantiated block, use “seq” as a key, and have a counter that increments by 1 for every tag produced that is used as the tag’s value. The tags are propagated using the 1-to-1 policy.
It also stores a copy of all tags it sees flow past it. These tags can be recalled externally with the data() member.
Warning
This block is only meant for testing and showing how to use the tags.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(annotator_1to1_sptr self, unsigned int delay)
pc_input_buffers_full_avg(annotator_1to1_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(annotator_1to1_sptr self) -> pmt_vector_float
All-to-all stream annotator testing block. FOR TESTING PURPOSES ONLY.
This block creates tags to be sent downstream every 10,000 items it sees. The tags contain the name and ID of the instantiated block, use “seq” as a key, and have a counter that increments by 1 for every tag produced that is used as the tag’s value. The tags are propagated using the all-to-all policy.
It also stores a copy of all tags it sees flow past it. These tags can be recalled externally with the data() member.
This block is only meant for testing and showing how to use the tags.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(annotator_alltoall_sptr self, unsigned int delay)
pc_input_buffers_full_avg(annotator_alltoall_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(annotator_alltoall_sptr self) -> pmt_vector_float
raw stream annotator testing block.
This block creates arbitrary tags to be sent downstream gnuradio/blocks to be sent are set manually via accessor methods and are sent only once.
This block is intended for testing of tag related gnuradio/blocks
Constructor Specific Documentation:
Parameters: | sizeof_stream_item – |
---|
declare_sample_delay(annotator_raw_sptr self, unsigned int delay)
pc_input_buffers_full_avg(annotator_raw_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(annotator_raw_sptr self) -> pmt_vector_float
Compares vectors from multiple streams and determines the index in the vector and stream number where the maximum value occurred.
Data is passed in as a vector of length from multiple input sources. It will look through these streams of data items and output two streams:
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(argmax_fs_sptr self, unsigned int delay)
pc_input_buffers_full_avg(argmax_fs_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(argmax_fs_sptr self) -> pmt_vector_float
Compares vectors from multiple streams and determines the index in the vector and stream number where the maximum value occurred.
Data is passed in as a vector of length from multiple input sources. It will look through these streams of data items and output two streams:
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(argmax_is_sptr self, unsigned int delay)
pc_input_buffers_full_avg(argmax_is_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(argmax_is_sptr self) -> pmt_vector_float
Compares vectors from multiple streams and determines the index in the vector and stream number where the maximum value occurred.
Data is passed in as a vector of length from multiple input sources. It will look through these streams of data items and output two streams:
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(argmax_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(argmax_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(argmax_ss_sptr self) -> pmt_vector_float
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: |
|
---|
declare_sample_delay(bin_statistics_f_sptr self, unsigned int delay)
pc_input_buffers_full_avg(bin_statistics_f_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(bin_statistics_f_sptr self) -> pmt_vector_float
Sets a burst on/off tag based on the value of the trigger input.
This block takes two inputs, a signal stream on the input stream 0 and a trigger stream of shorts on input stream 1. If the trigger stream goes above 0, a tag with the key “burst” will be transmitted as a pmt::PMT_T. When the trigger signal falls below 0, the “burst” tag will be transmitted as pmt::PMT_F.
The signal on stream 0 is retransmitted to output stream 0.
Constructor Specific Documentation:
Build a burst tagger gnuradio/blocks.
Parameters: | itemsize – itemsize of the signal stream on input 0. |
---|
declare_sample_delay(burst_tagger_sptr self, unsigned int delay)
pc_input_buffers_full_avg(burst_tagger_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(burst_tagger_sptr self) -> pmt_vector_float
For the false burst tag, change the key name to and a new value of .
For the true burst tag, change the key name to and a new value of .
Convert stream of chars to a stream of float.
Converts length vectors of input char samples to floats and applies a scaling factor of
Constructor Specific Documentation:
Build a chars to float stream converter block.
Parameters: |
|
---|
declare_sample_delay(char_to_float_sptr self, unsigned int delay)
pc_input_buffers_full_avg(char_to_float_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(char_to_float_sptr self) -> pmt_vector_float
Get the scalar divider value.
Set the scalar divider value.
Convert stream of chars to a stream of shorts.
Converts length vectors of input char samples to shorts, multiplying each element by 256:
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(char_to_short_sptr self, unsigned int delay)
pc_input_buffers_full_avg(char_to_short_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(char_to_short_sptr self) -> pmt_vector_float
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:
declare_sample_delay(check_lfsr_32k_s_sptr self, unsigned int delay)
pc_input_buffers_full_avg(check_lfsr_32k_s_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(check_lfsr_32k_s_sptr self) -> pmt_vector_float
complex in, arg (arctan) out (float)
Constructor Specific Documentation:
Build a complex to arg block.
Parameters: | vlen – vector len (default 1) |
---|
declare_sample_delay(complex_to_arg_sptr self, unsigned int delay)
pc_input_buffers_full_avg(complex_to_arg_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(complex_to_arg_sptr self) -> pmt_vector_float
Convert a stream of gr_complex to 1 or 2 streams of float.
If a single output stream is attached, this will output the real part of the input complex samples. If a second output stream is connected, output[0] is the real part and output[1] is the imaginary part.
Constructor Specific Documentation:
Build a complex to float block.
Parameters: | vlen – vector len (default 1) |
---|
declare_sample_delay(complex_to_float_sptr self, unsigned int delay)
pc_input_buffers_full_avg(complex_to_float_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(complex_to_float_sptr self) -> pmt_vector_float
Produces the imaginary part (as a float0 of a complex stream.
Constructor Specific Documentation:
Build a complex to imaginary part block.
Parameters: | vlen – vector len (default 1) |
---|
declare_sample_delay(complex_to_imag_sptr self, unsigned int delay)
pc_input_buffers_full_avg(complex_to_imag_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(complex_to_imag_sptr self) -> pmt_vector_float
Convert stream of complex to a stream of interleaved shorts.
The output stream contains shorts with twice as many output items as input items. For every complex input item, we produce two output shorts that contain the real part and imaginary part converted to shorts:
Constructor Specific Documentation:
Build a complex to interleaved shorts block.
Parameters: | vector – |
---|
declare_sample_delay(complex_to_interleaved_short_sptr self, unsigned int delay)
pc_input_buffers_full_avg(complex_to_interleaved_short_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(complex_to_interleaved_short_sptr self) -> pmt_vector_float
complex in, magnitude out (float)
Calculates the magnitude of the complex samples:
Or: The input stream can be a vector of length , and for each vector, each item is converted using the above function. So above, m is from 0 to noutput_items*vlen for each call to work.
Constructor Specific Documentation:
Build a complex to magnitude block.
Parameters: | vlen – vector len (default 1) |
---|
declare_sample_delay(complex_to_mag_sptr self, unsigned int delay)
pc_input_buffers_full_avg(complex_to_mag_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(complex_to_mag_sptr self) -> pmt_vector_float
complex in, magnitude squared out (float)
Calculates the magnitude squared of the complex samples:
Or: The input stream can be a vector of length , and for each vector, each item is converted using the above function. So above, m is from 0 to noutput_items*vlen for each call to work.
Constructor Specific Documentation:
Build a complex to magnitude squared block.
Parameters: | vlen – vector len (default 1) |
---|
declare_sample_delay(complex_to_mag_squared_sptr self, unsigned int delay)
pc_input_buffers_full_avg(complex_to_mag_squared_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(complex_to_mag_squared_sptr self) -> pmt_vector_float
Produces the real part (as a float0 of a complex stream.
Constructor Specific Documentation:
Build a complex to real part block.
Parameters: | vlen – vector len (default 1) |
---|
declare_sample_delay(complex_to_real_sptr self, unsigned int delay)
pc_input_buffers_full_avg(complex_to_real_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(complex_to_real_sptr self) -> pmt_vector_float
output = complex conjugate of input
Constructor Specific Documentation:
declare_sample_delay(conjugate_cc_sptr self, unsigned int delay)
pc_input_buffers_full_avg(conjugate_cc_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(conjugate_cc_sptr self) -> pmt_vector_float
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.
Message Ports:
Constructor Specific Documentation:
Parameters: | itemsize – |
---|
declare_sample_delay(copy_sptr self, unsigned int delay)
pc_input_buffers_full_avg(copy_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(copy_sptr self) -> pmt_vector_float
A ControlPort probe to export vectors of signals.
This block acts as a sink in the flowgraph but also exports vectors of complex samples over ControlPort. This block holds the latest number of complex samples so that every query by a ControlPort client will get the same length vector.
Constructor Specific Documentation:
Make a ControlPort probe block.
Parameters: |
|
---|
declare_sample_delay(ctrlport_probe2_b_sptr self, unsigned int delay)
pc_input_buffers_full_avg(ctrlport_probe2_b_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(ctrlport_probe2_b_sptr self) -> pmt_vector_float
A ControlPort probe to export vectors of signals.
This block acts as a sink in the flowgraph but also exports vectors of complex samples over ControlPort. This block holds the latest number of complex samples so that every query by a ControlPort client will get the same length vector.
Constructor Specific Documentation:
Make a ControlPort probe block.
Parameters: |
|
---|
declare_sample_delay(ctrlport_probe2_c_sptr self, unsigned int delay)
pc_input_buffers_full_avg(ctrlport_probe2_c_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(ctrlport_probe2_c_sptr self) -> pmt_vector_float
A ControlPort probe to export vectors of signals.
This block acts as a sink in the flowgraph but also exports vectors of complex samples over ControlPort. This block holds the latest number of complex samples so that every query by a ControlPort client will get the same length vector.
Constructor Specific Documentation:
Make a ControlPort probe block.
Parameters: |
|
---|
declare_sample_delay(ctrlport_probe2_f_sptr self, unsigned int delay)
pc_input_buffers_full_avg(ctrlport_probe2_f_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(ctrlport_probe2_f_sptr self) -> pmt_vector_float
A ControlPort probe to export vectors of signals.
This block acts as a sink in the flowgraph but also exports vectors of complex samples over ControlPort. This block holds the latest number of complex samples so that every query by a ControlPort client will get the same length vector.
Constructor Specific Documentation:
Make a ControlPort probe block.
Parameters: |
|
---|
declare_sample_delay(ctrlport_probe2_i_sptr self, unsigned int delay)
pc_input_buffers_full_avg(ctrlport_probe2_i_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(ctrlport_probe2_i_sptr self) -> pmt_vector_float
A ControlPort probe to export vectors of signals.
This block acts as a sink in the flowgraph but also exports vectors of complex samples over ControlPort. This block holds the latest number of complex samples so that every query by a ControlPort client will get the same length vector.
Constructor Specific Documentation:
Make a ControlPort probe block.
Parameters: |
|
---|
declare_sample_delay(ctrlport_probe2_s_sptr self, unsigned int delay)
pc_input_buffers_full_avg(ctrlport_probe2_s_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(ctrlport_probe2_s_sptr self) -> pmt_vector_float
A ControlPort probe to export vectors of signals.
This block acts as a sink in the flowgraph but also exports vectors of complex samples over ControlPort. This block simply sends the current vector held in the work function when the queried by a ControlPort client.
Constructor Specific Documentation:
Make a ControlPort probe block.
Parameters: |
|
---|
declare_sample_delay(ctrlport_probe_c_sptr self, unsigned int delay)
pc_input_buffers_full_avg(ctrlport_probe_c_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(ctrlport_probe_c_sptr self) -> pmt_vector_float
deinterleave an input block of samples into N outputs.
This block deinterleaves blocks of samples. For each output connection, the input stream will be deinterleaved successively to the output connections. By default, the block deinterleaves a single input to each output unless blocksize is given in the constructor.
Constructor Specific Documentation:
Make a deinterleave block.
Parameters: |
|
---|
declare_sample_delay(deinterleave_sptr self, unsigned int delay)
pc_input_buffers_full_avg(deinterleave_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(deinterleave_sptr self) -> pmt_vector_float
delay the input by a certain number of samples
Positive delays insert zero items at the beginning of the stream. Negative delays discard items from the stream.
You cannot initialize this block with a negative delay, however. That leads to a causality issue with the buffers when they are initialized. If you need to negetively delay one path, then put the positive delay on the other path instead.
Constructor Specific Documentation:
Make a delay block.
Parameters: |
|
---|
declare_sample_delay(delay_sptr self, unsigned int delay)
pc_input_buffers_full_avg(delay_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(delay_sptr self) -> pmt_vector_float
Reset the delay.
output = input[0] / input[1] / ... / input[M-1]
Divide across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(divide_cc_sptr self, unsigned int delay)
pc_input_buffers_full_avg(divide_cc_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(divide_cc_sptr self) -> pmt_vector_float
output = input[0] / input[1] / ... / input[M-1]
Divide across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(divide_ff_sptr self, unsigned int delay)
pc_input_buffers_full_avg(divide_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(divide_ff_sptr self) -> pmt_vector_float
output = input[0] / input[1] / ... / input[M-1]
Divide across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(divide_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(divide_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(divide_ii_sptr self) -> pmt_vector_float
output = input[0] / input[1] / ... / input[M-1]
Divide across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(divide_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(divide_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(divide_ss_sptr self) -> pmt_vector_float
Convert stream of items into thier byte swapped version.
Constructor Specific Documentation:
Make an endian swap block.
Parameters: | item_size_bytes – number of bytes per item, 1=no-op, 2=uint16_t, 4=uint32_t, 8=uint64_t |
---|
declare_sample_delay(endian_swap_sptr self, unsigned int delay)
pc_input_buffers_full_avg(endian_swap_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(endian_swap_sptr self) -> pmt_vector_float
Write stream to file descriptor.
Constructor Specific Documentation:
Build a file descriptor sink block. The provided file descriptor will be closed when the sink is destroyed.
Parameters: |
|
---|
declare_sample_delay(file_descriptor_sink_sptr self, unsigned int delay)
pc_input_buffers_full_avg(file_descriptor_sink_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(file_descriptor_sink_sptr self) -> pmt_vector_float
Read stream from file descriptor.
Constructor Specific Documentation:
Build a file descriptor source block. The provided file descriptor will be closed when the sink is destroyed.
Parameters: |
|
---|
declare_sample_delay(file_descriptor_source_sptr self, unsigned int delay)
pc_input_buffers_full_avg(file_descriptor_source_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(file_descriptor_source_sptr self) -> pmt_vector_float
Write stream to file with meta-data headers.
These files represent data as binary information in between meta-data headers. The headers contain information about the type of data and properties of the data in the next segment of samples. The information includes:
Tags can be sent to the file to update the information, which will create a new header. Headers are found by searching from the first header (at position 0 in the file) and reading where the data segment starts plus the data segment size. Following will either be a new header or EOF.
Constructor Specific Documentation:
Create a meta-data file sink.
Parameters: |
|
---|
declare_sample_delay(file_meta_sink_sptr self, unsigned int delay)
pc_input_buffers_full_avg(file_meta_sink_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(file_meta_sink_sptr self) -> pmt_vector_float
Reads stream from file with meta-data headers. Headers are parsed into tags.
The information in the metadata headers includes:
Any item inside of the extra header dictionary is ready out and made into a stream tag.
Constructor Specific Documentation:
Create a meta-data file source.
Parameters: |
|
---|
declare_sample_delay(file_meta_source_sptr self, unsigned int delay)
pc_input_buffers_full_avg(file_meta_source_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(file_meta_source_sptr self) -> pmt_vector_float
Write stream to file.
Constructor Specific Documentation:
Make a file sink.
Parameters: |
|
---|
Close current output file.
Closes current output file and ignores any output until open is called to connect to another file.
declare_sample_delay(file_sink_sptr self, unsigned int delay)
if we’ve had an update, do it now.
Open filename and begin output to it.
pc_input_buffers_full_avg(file_sink_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(file_sink_sptr self) -> pmt_vector_float
turn on unbuffered writes for slower outputs
Read stream from file.
Constructor Specific Documentation:
Create a file source.
Opens as a source of items into a flowgraph. The data is expected to be in binary format, item after item. The of the block determines the conversion from bits to items.
If is turned on, the file will repeat the file after it’s reached the end.
Parameters: |
|
---|
Close the file handle.
declare_sample_delay(file_source_sptr self, unsigned int delay)
Opens a new file.
pc_input_buffers_full_avg(file_source_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(file_source_sptr self) -> pmt_vector_float
seek file to relative to
Convert stream of floats to a stream of char.
Constructor Specific Documentation:
Build a float to char block.
Parameters: |
|
---|
declare_sample_delay(float_to_char_sptr self, unsigned int delay)
pc_input_buffers_full_avg(float_to_char_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(float_to_char_sptr self) -> pmt_vector_float
Get the scalar multiplier value.
Set the scalar multiplier value.
one or two floats in, complex out
Constructor Specific Documentation:
Build a float to complex block.
Parameters: | vlen – vector len (default 1) |
---|
declare_sample_delay(float_to_complex_sptr self, unsigned int delay)
pc_input_buffers_full_avg(float_to_complex_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(float_to_complex_sptr self) -> pmt_vector_float
Convert stream of floats to a stream of ints.
Constructor Specific Documentation:
Build a float to int block.
Parameters: |
|
---|
declare_sample_delay(float_to_int_sptr self, unsigned int delay)
pc_input_buffers_full_avg(float_to_int_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(float_to_int_sptr self) -> pmt_vector_float
Get the scalar multiplier value.
Set the scalar multiplier value.
Convert stream of floats to a stream of shorts.
Constructor Specific Documentation:
Build a float to short block.
Parameters: |
|
---|
declare_sample_delay(float_to_short_sptr self, unsigned int delay)
pc_input_buffers_full_avg(float_to_short_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(float_to_short_sptr self) -> pmt_vector_float
Get the scalar multiplier value.
Set the scalar multiplier value.
Convert stream of floats to a stream of unsigned chars.
Constructor Specific Documentation:
Build a float to uchar block.
declare_sample_delay(float_to_uchar_sptr self, unsigned int delay)
pc_input_buffers_full_avg(float_to_uchar_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(float_to_uchar_sptr self) -> pmt_vector_float
copies the first N items to the output then signals done
Useful for building test cases
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(head_sptr self, unsigned int delay)
pc_input_buffers_full_avg(head_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(head_sptr self) -> pmt_vector_float
Convert stream of ints to a stream of floats.
Constructor Specific Documentation:
Build an int to float block.
Parameters: |
|
---|
declare_sample_delay(int_to_float_sptr self, unsigned int delay)
pc_input_buffers_full_avg(int_to_float_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(int_to_float_sptr self) -> pmt_vector_float
Get the scalar divider value.
Set the scalar divider value.
Integrate successive samples and decimate.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(integrate_cc_sptr self, unsigned int delay)
pc_input_buffers_full_avg(integrate_cc_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(integrate_cc_sptr self) -> pmt_vector_float
Integrate successive samples and decimate.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(integrate_ff_sptr self, unsigned int delay)
pc_input_buffers_full_avg(integrate_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(integrate_ff_sptr self) -> pmt_vector_float
Integrate successive samples and decimate.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(integrate_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(integrate_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(integrate_ii_sptr self) -> pmt_vector_float
Integrate successive samples and decimate.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(integrate_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(integrate_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(integrate_ss_sptr self) -> pmt_vector_float
interleave N inputs into a single output
This block interleaves blocks of samples. For each input connection, the samples are interleaved successively to the output connection. By default, the block interleaves a single sample from eahc input to the output unless blocksize is given in the constructor.
Constructor Specific Documentation:
Make a stream interleave block.
Parameters: |
|
---|
declare_sample_delay(interleave_sptr self, unsigned int delay)
pc_input_buffers_full_avg(interleave_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(interleave_sptr self) -> pmt_vector_float
Convert stream of interleaved chars to a stream of complex.
Constructor Specific Documentation:
Build an interleaved char to complex block.
Parameters: | vector_input – |
---|
declare_sample_delay(interleaved_char_to_complex_sptr self, unsigned int delay)
pc_input_buffers_full_avg(interleaved_char_to_complex_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(interleaved_char_to_complex_sptr self) -> pmt_vector_float
Convert stream of interleaved shorts to a stream of complex.
Constructor Specific Documentation:
Build an interleaved short to complex block.
Parameters: |
|
---|
declare_sample_delay(interleaved_short_to_complex_sptr self, unsigned int delay)
pc_input_buffers_full_avg(interleaved_short_to_complex_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(interleaved_short_to_complex_sptr self) -> pmt_vector_float
decimate a stream, keeping items out of every .
Constructor Specific Documentation:
Make a keep m in n block.
Parameters: |
|
---|
declare_sample_delay(keep_m_in_n_sptr self, unsigned int delay)
pc_input_buffers_full_avg(keep_m_in_n_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(keep_m_in_n_sptr self) -> pmt_vector_float
decimate a stream, keeping one item out of every .
Constructor Specific Documentation:
Make a keep one in n block.
Parameters: |
|
---|
declare_sample_delay(keep_one_in_n_sptr self, unsigned int delay)
pc_input_buffers_full_avg(keep_one_in_n_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(keep_one_in_n_sptr self) -> pmt_vector_float
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.
declare_sample_delay(lfsr_32k_source_s_sptr self, unsigned int delay)
pc_input_buffers_full_avg(lfsr_32k_source_s_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(lfsr_32k_source_s_sptr self) -> pmt_vector_float
Compares vectors from multiple streams and determines the maximum value from each vector over all streams.
Data is passed in as a vector of length from multiple input sources. It will look through these streams of data items and the output stream will contain the maximum value in the vector.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(max_ff_sptr self, unsigned int delay)
pc_input_buffers_full_avg(max_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(max_ff_sptr self) -> pmt_vector_float
Compares vectors from multiple streams and determines the maximum value from each vector over all streams.
Data is passed in as a vector of length from multiple input sources. It will look through these streams of data items and the output stream will contain the maximum value in the vector.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(max_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(max_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(max_ii_sptr self) -> pmt_vector_float
Compares vectors from multiple streams and determines the maximum value from each vector over all streams.
Data is passed in as a vector of length from multiple input sources. It will look through these streams of data items and the output stream will contain the maximum value in the vector.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(max_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(max_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(max_ss_sptr self) -> pmt_vector_float
make(size_t itemsize, msg_queue_sptr msgq) -> message_burst_source_sptr
Turn received messages into a stream and tag them for UHD to send.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(message_burst_source_sptr self, unsigned int delay)
pc_input_buffers_full_avg(message_burst_source_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(message_burst_source_sptr self) -> pmt_vector_float
Debug block for the message passing system.
The message debug block is used to capture and print or store messages as they are received. Any block that generates a message may connect that message port to one or more of the three message input ports of this debug block. The message ports are:
Constructor Specific Documentation:
Build the message debug block. It takes no parameters and has three message ports: print, store, and print_pdu.
declare_sample_delay(message_debug_sptr self, unsigned int delay)
Get a message (as a PMT) from the message vector at index .
Messages passed to the ‘store’ port will be stored in a vector. This function retrieves those messages by index. They are index in order of when they were received (all messages are just pushed onto the back of a vector). This is mostly useful in debugging message passing graphs and in QA code.
Reports the number of messages received by this block.
pc_input_buffers_full_avg(message_debug_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(message_debug_sptr self) -> pmt_vector_float
make(size_t itemsize, msg_queue_sptr msgq, bool dont_block, std::string const & lengthtagname) -> message_sink_sptr
Gather received items into messages and insert into msgq.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(message_sink_sptr self, unsigned int delay)
pc_input_buffers_full_avg(message_sink_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(message_sink_sptr self) -> pmt_vector_float
make(size_t itemsize, msg_queue_sptr msgq) -> message_source_sptr make(size_t itemsize, msg_queue_sptr msgq, std::string const & lengthtagname) -> message_source_sptr
Turn received messages into a stream.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(message_source_sptr self, unsigned int delay)
pc_input_buffers_full_avg(message_source_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(message_source_sptr self) -> pmt_vector_float
Send message at defined interval.
Takes a PMT message and sends it out every milliseconds. Useful for testing/debugging the message system.
Constructor Specific Documentation:
Make a message stobe block to send message every milliseconds.
Parameters: |
|
---|
declare_sample_delay(message_strobe_sptr self, unsigned int delay)
Get the value of the message being sent.
pc_input_buffers_full_avg(message_strobe_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(message_strobe_sptr self) -> pmt_vector_float
Get the time interval of the strobe.
Reset the message being sent.
Reset the sending interval.
Send message at defined interval.
Takes a PMT message and sends it out every at random intervals. The interval is basedon a random distribution, , with specified mean () and variance (). Useful for testing/debugging the message system.
Constructor Specific Documentation:
Make a message stobe block to sends message at random intervals defined by the distribution with mean and standard deviation .
Parameters: |
|
---|
declare_sample_delay(message_strobe_random_sptr self, unsigned int delay)
get the current distribution.
Get the time interval of the strobe_random.
Get the value of the message being sent.
pc_input_buffers_full_avg(message_strobe_random_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(message_strobe_random_sptr self) -> pmt_vector_float
Reset the sending interval.
Reset the message being sent.
Reset the sending interval.
Get the std of strobe_random.
Compares vectors from multiple streams and determines the minimum value from each vector over all streams.
Data is passed in as a vector of length from multiple input sources. It will look through these streams of data items and the output stream will contain the minimum value in the vector.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(min_ff_sptr self, unsigned int delay)
pc_input_buffers_full_avg(min_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(min_ff_sptr self) -> pmt_vector_float
Compares vectors from multiple streams and determines the minimum value from each vector over all streams.
Data is passed in as a vector of length from multiple input sources. It will look through these streams of data items and the output stream will contain the minimum value in the vector.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(min_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(min_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(min_ii_sptr self) -> pmt_vector_float
Compares vectors from multiple streams and determines the minimum value from each vector over all streams.
Data is passed in as a vector of length from multiple input sources. It will look through these streams of data items and the output stream will contain the minimum value in the vector.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(min_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(min_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(min_ss_sptr self) -> pmt_vector_float
output is the moving sum of the last N samples, scaled by the scale factor
Constructor Specific Documentation:
Create a moving average block.
Parameters: |
|
---|
declare_sample_delay(moving_average_cc_sptr self, unsigned int delay)
pc_input_buffers_full_avg(moving_average_cc_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(moving_average_cc_sptr self) -> pmt_vector_float
Get the scale factor being used.
Set the length.
Set both the length and the scale factor together.
Set the scale factor.
output is the moving sum of the last N samples, scaled by the scale factor
Constructor Specific Documentation:
Create a moving average block.
Parameters: |
|
---|
declare_sample_delay(moving_average_ff_sptr self, unsigned int delay)
pc_input_buffers_full_avg(moving_average_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(moving_average_ff_sptr self) -> pmt_vector_float
Get the scale factor being used.
Set the length.
Set both the length and the scale factor together.
Set the scale factor.
output is the moving sum of the last N samples, scaled by the scale factor
Constructor Specific Documentation:
Create a moving average block.
Parameters: |
|
---|
declare_sample_delay(moving_average_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(moving_average_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(moving_average_ii_sptr self) -> pmt_vector_float
Get the scale factor being used.
Set the length.
Set both the length and the scale factor together.
Set the scale factor.
output is the moving sum of the last N samples, scaled by the scale factor
Constructor Specific Documentation:
Create a moving average block.
Parameters: |
|
---|
declare_sample_delay(moving_average_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(moving_average_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(moving_average_ss_sptr self) -> pmt_vector_float
Get the scale factor being used.
Set the length.
Set both the length and the scale factor together.
Set the scale factor.
output = prod (input_0, input_1, ...)
Multiply across all input streams.
Constructor Specific Documentation:
Multiply streams of complex values.
Parameters: | vlen – Vector length |
---|
declare_sample_delay(multiply_cc_sptr self, unsigned int delay)
pc_input_buffers_full_avg(multiply_cc_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(multiply_cc_sptr self) -> pmt_vector_float
Multiplies stream 0 by the complex conjugate of stream 1.
Constructor Specific Documentation:
Multiplies a streams by the conjugate of a second stream.
Parameters: | vlen – Vector length |
---|
declare_sample_delay(multiply_conjugate_cc_sptr self, unsigned int delay)
pc_input_buffers_full_avg(multiply_conjugate_cc_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(multiply_conjugate_cc_sptr self) -> pmt_vector_float
output = input * complex constant
Constructor Specific Documentation:
Create an instance of multiply_const_cc.
Parameters: |
|
---|
declare_sample_delay(multiply_const_cc_sptr self, unsigned int delay)
Return complex multiplicative constant.
pc_input_buffers_full_avg(multiply_const_cc_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(multiply_const_cc_sptr self) -> pmt_vector_float
Set complex multiplicative constant.
output = input * real constant
Constructor Specific Documentation:
Create an instance of multiply_const_ff.
Parameters: |
|
---|
declare_sample_delay(multiply_const_ff_sptr self, unsigned int delay)
Return real multiplicative constant.
pc_input_buffers_full_avg(multiply_const_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(multiply_const_ff_sptr self) -> pmt_vector_float
Set real multiplicative constant.
output = input * constant
Constructor Specific Documentation:
Create an instance of multiply_const_ii.
Parameters: | k – multiplicative constant |
---|
declare_sample_delay(multiply_const_ii_sptr self, unsigned int delay)
Return multiplicative constant.
pc_input_buffers_full_avg(multiply_const_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(multiply_const_ii_sptr self) -> pmt_vector_float
Set multiplicative constant.
output = input * constant
Constructor Specific Documentation:
Create an instance of multiply_const_ss.
Parameters: | k – multiplicative constant |
---|
declare_sample_delay(multiply_const_ss_sptr self, unsigned int delay)
Return multiplicative constant.
pc_input_buffers_full_avg(multiply_const_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(multiply_const_ss_sptr self) -> pmt_vector_float
Set multiplicative constant.
output = input * constant vector (element-wise)
Constructor Specific Documentation:
Create an instance of multiply_const_vcc.
Parameters: | k – multiplicative constant vector |
---|
declare_sample_delay(multiply_const_vcc_sptr self, unsigned int delay)
Return multiplicative constant vector.
pc_input_buffers_full_avg(multiply_const_vcc_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(multiply_const_vcc_sptr self) -> pmt_vector_float
Set multiplicative constant vector.
output = input * constant vector (element-wise)
Constructor Specific Documentation:
Create an instance of multiply_const_vff.
Parameters: | k – multiplicative constant vector |
---|
declare_sample_delay(multiply_const_vff_sptr self, unsigned int delay)
Return multiplicative constant vector.
pc_input_buffers_full_avg(multiply_const_vff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(multiply_const_vff_sptr self) -> pmt_vector_float
Set multiplicative constant vector.
output = input * constant vector (element-wise)
Constructor Specific Documentation:
Create an instance of multiply_const_vii.
Parameters: | k – multiplicative constant vector |
---|
declare_sample_delay(multiply_const_vii_sptr self, unsigned int delay)
Return multiplicative constant vector.
pc_input_buffers_full_avg(multiply_const_vii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(multiply_const_vii_sptr self) -> pmt_vector_float
Set multiplicative constant vector.
output = input * constant vector (element-wise)
Constructor Specific Documentation:
Create an instance of multiply_const_vss.
Parameters: | k – multiplicative constant vector |
---|
declare_sample_delay(multiply_const_vss_sptr self, unsigned int delay)
Return multiplicative constant vector.
pc_input_buffers_full_avg(multiply_const_vss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(multiply_const_vss_sptr self) -> pmt_vector_float
Set multiplicative constant vector.
output = prod (input_0, input_1, ...)
Multiply across all input streams.
Constructor Specific Documentation:
Multiply streams of float values.
Parameters: | vlen – Vector length |
---|
declare_sample_delay(multiply_ff_sptr self, unsigned int delay)
pc_input_buffers_full_avg(multiply_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(multiply_ff_sptr self) -> pmt_vector_float
output = prod (input_0, input_1, ...)
Multiply across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(multiply_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(multiply_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(multiply_ii_sptr self) -> pmt_vector_float
Matrix multiplexer/multiplier: y(k) = A * x(k)
This block is similar to gr::blocks::multiply_const_ff, the difference being it can handle several inputs and outputs, and the input-to-output relation can be described by the following mathematical equation: and are column-vectors describing the elements on the input port at time step (this is a sync block with no memory).
Examples for where to use this block include:
This block features a special tag propagation mode: When setting the tag propagation policy to gr::blocks::multiply_matrix_ff::TPP_SELECT_BY_MATRIX, a tag is propagated from input k to output l if .
Message Ports This block as one input message port (). A message sent to this port will be converted to a std::vector<std::vector<float> >, and then passed on to set_A(). If no conversion is possible, a warning is issued via the logging interface, and A remains unchanged.
: It is not possible to change the dimension of the matrix after initialization, as this affects the I/O signature! If a matrix of invalid size is passed to the block, an alert is raised via the logging interface, and A remains unchanged.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(multiply_matrix_ff_sptr self, unsigned int delay)
Returns the current matrix.
pc_input_buffers_full_avg(multiply_matrix_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(multiply_matrix_ff_sptr self) -> pmt_vector_float
Sets the matrix to a new value . Returns true if the new matrix was valid and could be changed.
Set the policy by the scheduler to determine how tags are moved downstream.
This will also accept the value TPP_SELECT_BY_MATRIX.
output = prod (input_0, input_1, ...)
Multiply across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(multiply_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(multiply_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(multiply_ss_sptr self) -> pmt_vector_float
output = input or zero if muted.
Constructor Specific Documentation:
Parameters: | mute – |
---|
declare_sample_delay(mute_cc_sptr self, unsigned int delay)
pc_input_buffers_full_avg(mute_cc_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(mute_cc_sptr self) -> pmt_vector_float
output = input or zero if muted.
Constructor Specific Documentation:
Parameters: | mute – |
---|
declare_sample_delay(mute_ff_sptr self, unsigned int delay)
pc_input_buffers_full_avg(mute_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(mute_ff_sptr self) -> pmt_vector_float
output = input or zero if muted.
Constructor Specific Documentation:
Parameters: | mute – |
---|
declare_sample_delay(mute_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(mute_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(mute_ii_sptr self) -> pmt_vector_float
output = input or zero if muted.
Constructor Specific Documentation:
Parameters: | mute – |
---|
declare_sample_delay(mute_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(mute_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(mute_ss_sptr self) -> pmt_vector_float
output = n*log10(input) + k
Constructor Specific Documentation:
Make an instance of an nlog10_ff block.
Parameters: |
|
---|
declare_sample_delay(nlog10_ff_sptr self, unsigned int delay)
pc_input_buffers_full_avg(nlog10_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(nlog10_ff_sptr self) -> pmt_vector_float
Does nothing. Used for testing only.
Constructor Specific Documentation:
Build a nop block.
Parameters: | sizeof_stream_item – size of the stream items in bytes. |
---|
declare_sample_delay(nop_sptr self, unsigned int delay)
pc_input_buffers_full_avg(nop_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(nop_sptr self) -> pmt_vector_float
output = ~input
bitwise boolean not of input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(not_bb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(not_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(not_bb_sptr self) -> pmt_vector_float
output = ~input
bitwise boolean not of input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(not_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(not_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(not_ii_sptr self) -> pmt_vector_float
output = ~input
bitwise boolean not of input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(not_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(not_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(not_ss_sptr self) -> pmt_vector_float
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. |
---|
declare_sample_delay(null_sink_sptr self, unsigned int delay)
pc_input_buffers_full_avg(null_sink_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(null_sink_sptr self) -> pmt_vector_float
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. |
---|
declare_sample_delay(null_source_sptr self, unsigned int delay)
pc_input_buffers_full_avg(null_source_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(null_source_sptr self) -> pmt_vector_float
output = input_0 | input_1 | , ... | input_N)
Bitwise boolean or across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(or_bb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(or_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(or_bb_sptr self) -> pmt_vector_float
output = input_0 | input_1 | , ... | input_N)
Bitwise boolean or across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(or_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(or_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(or_ii_sptr self) -> pmt_vector_float
output = input_0 | input_1 | , ... | input_N)
Bitwise boolean or across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(or_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(or_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(or_ss_sptr self) -> pmt_vector_float
Converts a stream of bytes with 1 bit in the LSB to a byte with k relevent bits.
This block takes in K bytes at a time, and uses the least significant bit to form a new byte.
Example: k = 4 in = [0,1,0,1, 0x81,0x00,0x00,0x00] out = [0x05, 0x08]
Constructor Specific Documentation:
Make a pack_k_bits block.
Parameters: | k – number of bits to be packed. |
---|
declare_sample_delay(pack_k_bits_bb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(pack_k_bits_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(pack_k_bits_bb_sptr self) -> pmt_vector_float
Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
input: stream of unsigned char; output: stream of unsigned char
This is the inverse of gr::blocks::unpacked_to_packed_XX.
The bits in the bytes or shorts input stream are grouped into chunks of bits and each resulting chunk is written right- justified to the output stream of bytes or shorts. All b or 16 bits of the each input bytes or short are processed. The right thing is done if bits_per_chunk is not a power of two.
The combination of gr::blocks::packed_to_unpacked_XX_ followed by gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(packed_to_unpacked_bb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(packed_to_unpacked_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(packed_to_unpacked_bb_sptr self) -> pmt_vector_float
Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
input: stream of int; output: stream of int
This is the inverse of gr::blocks::unpacked_to_packed_XX.
The bits in the bytes or shorts input stream are grouped into chunks of bits and each resulting chunk is written right- justified to the output stream of bytes or shorts. All b or 16 bits of the each input bytes or short are processed. The right thing is done if bits_per_chunk is not a power of two.
The combination of gr::blocks::packed_to_unpacked_XX_ followed by gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(packed_to_unpacked_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(packed_to_unpacked_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(packed_to_unpacked_ii_sptr self) -> pmt_vector_float
Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
input: stream of short; output: stream of short
This is the inverse of gr::blocks::unpacked_to_packed_XX.
The bits in the bytes or shorts input stream are grouped into chunks of bits and each resulting chunk is written right- justified to the output stream of bytes or shorts. All b or 16 bits of the each input bytes or short are processed. The right thing is done if bits_per_chunk is not a power of two.
The combination of gr::blocks::packed_to_unpacked_XX_ followed by gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(packed_to_unpacked_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(packed_to_unpacked_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(packed_to_unpacked_ss_sptr self) -> pmt_vector_float
Interleave items based on the provided vector .
Constructor Specific Documentation:
Make a patterned interleaver block.
Parameters: |
|
---|
declare_sample_delay(patterned_interleaver_sptr self, unsigned int delay)
pc_input_buffers_full_avg(patterned_interleaver_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(patterned_interleaver_sptr self) -> pmt_vector_float
Propagates only pdus containing k=>v in meta.
Constructor Specific Documentation:
Construct a PDU filter.
Parameters: |
|
---|
declare_sample_delay(pdu_filter_sptr self, unsigned int delay)
pc_input_buffers_full_avg(pdu_filter_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(pdu_filter_sptr self) -> pmt_vector_float
remove key k in pdu’s meta field and pass on
Constructor Specific Documentation:
Construct a PDU meta remove block.
Parameters: | k – |
---|
declare_sample_delay(pdu_remove_sptr self, unsigned int delay)
pc_input_buffers_full_avg(pdu_remove_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(pdu_remove_sptr self) -> pmt_vector_float
Set k=>v in pdu’s meta field and pass on.
Constructor Specific Documentation:
Construct a PDU meta set block.
Parameters: |
|
---|
declare_sample_delay(pdu_set_sptr self, unsigned int delay)
pc_input_buffers_full_avg(pdu_set_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(pdu_set_sptr self) -> pmt_vector_float
Turns received PDUs into a tagged stream of items.
Constructor Specific Documentation:
Construct a pdu_to_tagged_stream block.
Parameters: |
|
---|
declare_sample_delay(pdu_to_tagged_stream_sptr self, unsigned int delay)
pc_input_buffers_full_avg(pdu_to_tagged_stream_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(pdu_to_tagged_stream_sptr self) -> pmt_vector_float
Detect the peak of a signal.
If a peak is detected, this block outputs a 1, or it outputs 0’s. A separate debug output may be connected, to view the internal estimated mean described below.
Constructor Specific Documentation:
Build a peak detector block with float in, byte out.
Parameters: |
|
---|
Get the alpha value of the running average.
declare_sample_delay(peak_detector2_fb_sptr self, unsigned int delay)
Get the look-ahead factor value.
pc_input_buffers_full_avg(peak_detector2_fb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(peak_detector2_fb_sptr self) -> pmt_vector_float
Set the running average alpha.
Set the look-ahead factor.
Set the threshold factor value for the rise time.
Get the threshold factor value for the rise time.
Detect the peak of a signal.
If a peak is detected, this block outputs a 1, or it outputs 0’s.
Constructor Specific Documentation:
Make a peak detector block.
Parameters: |
|
---|
Get the alpha value of the running average.
declare_sample_delay(peak_detector_fb_sptr self, unsigned int delay)
Get the look-ahead factor value.
pc_input_buffers_full_avg(peak_detector_fb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(peak_detector_fb_sptr self) -> pmt_vector_float
Set the running average alpha.
Set the look-ahead factor.
Set the threshold factor value for the fall time.
Set the threshold factor value for the rise time.
Get the threshold factor value for the fall time.
Get the threshold factor value for the rise time.
Detect the peak of a signal.
If a peak is detected, this block outputs a 1, or it outputs 0’s.
Constructor Specific Documentation:
Make a peak detector block.
Parameters: |
|
---|
Get the alpha value of the running average.
declare_sample_delay(peak_detector_ib_sptr self, unsigned int delay)
Get the look-ahead factor value.
pc_input_buffers_full_avg(peak_detector_ib_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(peak_detector_ib_sptr self) -> pmt_vector_float
Set the running average alpha.
Set the look-ahead factor.
Set the threshold factor value for the fall time.
Set the threshold factor value for the rise time.
Get the threshold factor value for the fall time.
Get the threshold factor value for the rise time.
Detect the peak of a signal.
If a peak is detected, this block outputs a 1, or it outputs 0’s.
Constructor Specific Documentation:
Make a peak detector block.
Parameters: |
|
---|
Get the alpha value of the running average.
declare_sample_delay(peak_detector_sb_sptr self, unsigned int delay)
Get the look-ahead factor value.
pc_input_buffers_full_avg(peak_detector_sb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(peak_detector_sb_sptr self) -> pmt_vector_float
Set the running average alpha.
Set the look-ahead factor.
Set the threshold factor value for the fall time.
Set the threshold factor value for the rise time.
Get the threshold factor value for the fall time.
Get the threshold factor value for the rise time.
Detects a plateau and marks the middle.
Detect a plateau of a-priori known height. Input is a stream of floats, the output is a stream of bytes. Whenever a plateau is detected, the middle of that plateau is marked with a ‘1’ on the output stream (all other samples are left at zero).
You can use this in a Schmidl & Cox synchronisation algorithm to interpret the output of the normalized correlator. Just pass the length of the cyclic prefix (in samples) as the max_len parameter).
Unlike the peak detectors, you must the now the absolute height of the plateau. Whenever the amplitude exceeds the given threshold, it starts assuming the presence of a plateau.
An implicit hysteresis is provided by the fact that after detecting one plateau, it waits at least max_len samples before the next plateau can be detected.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(plateau_detector_fb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(plateau_detector_fb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(plateau_detector_fb_sptr self) -> pmt_vector_float
throughput measurement
Constructor Specific Documentation:
Make a throughput measurement block.
Parameters: |
|
---|
declare_sample_delay(probe_rate_sptr self, unsigned int delay)
pc_input_buffers_full_avg(probe_rate_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(probe_rate_sptr self) -> pmt_vector_float
Sink that allows a sample to be grabbed from Python.
Constructor Specific Documentation:
declare_sample_delay(probe_signal_b_sptr self, unsigned int delay)
pc_input_buffers_full_avg(probe_signal_b_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(probe_signal_b_sptr self) -> pmt_vector_float
Sink that allows a sample to be grabbed from Python.
Constructor Specific Documentation:
declare_sample_delay(probe_signal_c_sptr self, unsigned int delay)
pc_input_buffers_full_avg(probe_signal_c_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(probe_signal_c_sptr self) -> pmt_vector_float
Sink that allows a sample to be grabbed from Python.
Constructor Specific Documentation:
declare_sample_delay(probe_signal_f_sptr self, unsigned int delay)
pc_input_buffers_full_avg(probe_signal_f_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(probe_signal_f_sptr self) -> pmt_vector_float
Sink that allows a sample to be grabbed from Python.
Constructor Specific Documentation:
declare_sample_delay(probe_signal_i_sptr self, unsigned int delay)
pc_input_buffers_full_avg(probe_signal_i_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(probe_signal_i_sptr self) -> pmt_vector_float
Sink that allows a sample to be grabbed from Python.
Constructor Specific Documentation:
declare_sample_delay(probe_signal_s_sptr self, unsigned int delay)
pc_input_buffers_full_avg(probe_signal_s_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(probe_signal_s_sptr self) -> pmt_vector_float
Sink that allows a vector of samples to be grabbed from Python.
Constructor Specific Documentation:
Parameters: | size – |
---|
declare_sample_delay(probe_signal_vb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(probe_signal_vb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(probe_signal_vb_sptr self) -> pmt_vector_float
Sink that allows a vector of samples to be grabbed from Python.
Constructor Specific Documentation:
Parameters: | size – |
---|
declare_sample_delay(probe_signal_vc_sptr self, unsigned int delay)
pc_input_buffers_full_avg(probe_signal_vc_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(probe_signal_vc_sptr self) -> pmt_vector_float
Sink that allows a vector of samples to be grabbed from Python.
Constructor Specific Documentation:
Parameters: | size – |
---|
declare_sample_delay(probe_signal_vf_sptr self, unsigned int delay)
pc_input_buffers_full_avg(probe_signal_vf_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(probe_signal_vf_sptr self) -> pmt_vector_float
Sink that allows a vector of samples to be grabbed from Python.
Constructor Specific Documentation:
Parameters: | size – |
---|
declare_sample_delay(probe_signal_vi_sptr self, unsigned int delay)
pc_input_buffers_full_avg(probe_signal_vi_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(probe_signal_vi_sptr self) -> pmt_vector_float
Sink that allows a vector of samples to be grabbed from Python.
Constructor Specific Documentation:
Parameters: | size – |
---|
declare_sample_delay(probe_signal_vs_sptr self, unsigned int delay)
pc_input_buffers_full_avg(probe_signal_vs_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(probe_signal_vs_sptr self) -> pmt_vector_float
Sends a random PDU at intervals.
Constructor Specific Documentation:
Construct a random PDU generator.
Parameters: |
|
---|
declare_sample_delay(random_pdu_sptr self, unsigned int delay)
pc_input_buffers_full_avg(random_pdu_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(random_pdu_sptr self) -> pmt_vector_float
Detect the peak of a signal and repeat every period samples.
If a peak is detected, this block outputs a 1 repeated every period samples until reset by detection of another 1 on the input or stopped after max_regen regenerations have occurred.
Note that if max_regen=(-1)/ULONG_MAX then the regeneration will run forever.
Constructor Specific Documentation:
Make a regenerate block.
Parameters: |
|
---|
declare_sample_delay(regenerate_bb_sptr self, unsigned int delay)
return the maximum regeneration count.
pc_input_buffers_full_avg(regenerate_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(regenerate_bb_sptr self) -> pmt_vector_float
return the regeneration period.
Reset the maximum regeneration count; this will reset the current regen.
Reset the period of regenerations; this will reset the current regen.
Repack bits from the input stream onto bits of the output stream.
No bits are lost here; any value for k and l (within [1, 8]) is allowed. On every fresh input byte, it starts reading on the LSB, and starts copying to the LSB as well.
When supplying a tag name, this block operates on tagged streams. In this case, it can happen that the input data or the output data becomes unaligned when k * input length is not equal to l * output length. In this case, the parameter is used to decide which data packet to align.
Usually, is false for unpacking (k=8, l < 8) and false for reversing that.
Example Say you’re tx’ing 8-PSK and therefore set k=8, l=3 on the transmit side before the modulator. Now assume you’re transmitting a single byte of data. Your incoming tagged stream has length 1, the outgoing has length 3. However, the third item is actually only carrying 2 bits of relevant data, the bits do not align with the boundaries. So you set = false, because the output can be unaligned.
Now say you’re doing the inverse: packing those three items into full bytes. How do you interpret those three bytes? Without this flag, you’d have to assume there’s 9 relevant bits in there, so you’d end up with 2 bytes of output data. But in the packing case, you want the to be aligned; all output bits must be useful. By asserting this flag, the packing algorithm tries to do this and in this case assumes that since we have alignment after 8 bits, the 9th can be discarded.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(repack_bits_bb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(repack_bits_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(repack_bits_bb_sptr self) -> pmt_vector_float
repeat each input times
Constructor Specific Documentation:
Make a repeat block.
Parameters: |
|
---|
declare_sample_delay(repeat_sptr self, unsigned int delay)
pc_input_buffers_full_avg(repeat_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(repeat_sptr self) -> pmt_vector_float
RMS average power.
Constructor Specific Documentation:
Make an RMS calc. block.
Parameters: | alpha – gain for running average filter. |
---|
declare_sample_delay(rms_cf_sptr self, unsigned int delay)
pc_input_buffers_full_avg(rms_cf_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(rms_cf_sptr self) -> pmt_vector_float
RMS average power.
Constructor Specific Documentation:
Make an RMS calc. block.
Parameters: | alpha – gain for running average filter. |
---|
declare_sample_delay(rms_ff_sptr self, unsigned int delay)
pc_input_buffers_full_avg(rms_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(rms_ff_sptr self) -> pmt_vector_float
Complex rotator.
Constructor Specific Documentation:
Make an complex rotator block.
Parameters: | phase_inc – rotational velocity |
---|
declare_sample_delay(rotator_cc_sptr self, unsigned int delay)
pc_input_buffers_full_avg(rotator_cc_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(rotator_cc_sptr self) -> pmt_vector_float
sample and hold circuit
Samples the data stream (input stream 0) and holds the value if the control signal is 1 (intput stream 1).
Constructor Specific Documentation:
declare_sample_delay(sample_and_hold_bb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(sample_and_hold_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(sample_and_hold_bb_sptr self) -> pmt_vector_float
sample and hold circuit
Samples the data stream (input stream 0) and holds the value if the control signal is 1 (intput stream 1).
Constructor Specific Documentation:
declare_sample_delay(sample_and_hold_ff_sptr self, unsigned int delay)
pc_input_buffers_full_avg(sample_and_hold_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(sample_and_hold_ff_sptr self) -> pmt_vector_float
sample and hold circuit
Samples the data stream (input stream 0) and holds the value if the control signal is 1 (intput stream 1).
Constructor Specific Documentation:
declare_sample_delay(sample_and_hold_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(sample_and_hold_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(sample_and_hold_ii_sptr self) -> pmt_vector_float
sample and hold circuit
Samples the data stream (input stream 0) and holds the value if the control signal is 1 (intput stream 1).
Constructor Specific Documentation:
declare_sample_delay(sample_and_hold_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(sample_and_hold_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(sample_and_hold_ss_sptr self) -> pmt_vector_float
Convert stream of shorts to a stream of chars.
This block strips off the least significant byte from the short value.
[0x00ff, 0x0ff0, 0xff00] => [0x00, 0x0f, 0xff]
Converts length vectors of input short samples to chars, dividing each element by 256.
Constructor Specific Documentation:
Build a short to char block.
Parameters: | vlen – vector length of data streams. |
---|
declare_sample_delay(short_to_char_sptr self, unsigned int delay)
pc_input_buffers_full_avg(short_to_char_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(short_to_char_sptr self) -> pmt_vector_float
Convert stream of shorts to a stream of floats.
Constructor Specific Documentation:
Build a short to float block.
Parameters: |
|
---|
declare_sample_delay(short_to_float_sptr self, unsigned int delay)
pc_input_buffers_full_avg(short_to_float_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(short_to_float_sptr self) -> pmt_vector_float
Get the scalar divider value.
Set the scalar divider value.
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: |
|
---|
declare_sample_delay(skiphead_sptr self, unsigned int delay)
pc_input_buffers_full_avg(skiphead_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(skiphead_sptr self) -> pmt_vector_float
Creates socket interface and translates traffic to PDUs.
Constructor Specific Documentation:
Construct a SOCKET PDU interface.
Parameters: |
|
---|
declare_sample_delay(socket_pdu_sptr self, unsigned int delay)
pc_input_buffers_full_avg(socket_pdu_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(socket_pdu_sptr self) -> pmt_vector_float
Stream muxing block to multiplex many streams into one with a specified format.
Muxes N streams together producing an output stream that contains N0 items from the first stream, N1 items from the second, etc. and repeats:
[N0, N1, N2, ..., Nm, N0, N1, ...]
Constructor Specific Documentation:
Creates a stream muxing block to multiplex many streams into one with a specified format.
Parameters: |
|
---|
declare_sample_delay(stream_mux_sptr self, unsigned int delay)
pc_input_buffers_full_avg(stream_mux_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(stream_mux_sptr self) -> pmt_vector_float
convert a stream of items into a N streams of items
Converts a stream of N items into N streams of 1 item. Repeat ad infinitum.
Constructor Specific Documentation:
Make a stream-to-streams block.
Parameters: |
|
---|
declare_sample_delay(stream_to_streams_sptr self, unsigned int delay)
pc_input_buffers_full_avg(stream_to_streams_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(stream_to_streams_sptr self) -> pmt_vector_float
Converts a regular stream into a tagged stream.
All this block does is add length tags in regular intervals. It can be used to connect a regular stream to a gr::tagged_stream_block.
This block is meant to be connected directly to a tagged stream block. If there are blocks between this block and a tagged stream block, make sure they either don’t change the rate, or modify the tag value to make sure the length tags actually represent the packet length.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(stream_to_tagged_stream_sptr self, unsigned int delay)
pc_input_buffers_full_avg(stream_to_tagged_stream_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(stream_to_tagged_stream_sptr self) -> pmt_vector_float
convert a stream of items into a stream of gnuradio/blocks containing nitems_per_block
Constructor Specific Documentation:
Make a stream-to-vector block.
Parameters: |
|
---|
declare_sample_delay(stream_to_vector_sptr self, unsigned int delay)
pc_input_buffers_full_avg(stream_to_vector_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(stream_to_vector_sptr self) -> pmt_vector_float
Convert N streams of 1 item into a 1 stream of N items.
Convert N streams of 1 item into 1 stream of N items. Repeat ad infinitum.
Constructor Specific Documentation:
Make a streams-to-stream block.
Parameters: |
|
---|
declare_sample_delay(streams_to_stream_sptr self, unsigned int delay)
pc_input_buffers_full_avg(streams_to_stream_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(streams_to_stream_sptr self) -> pmt_vector_float
convert N streams of items to 1 stream of vector length N
Constructor Specific Documentation:
Make a stream-to-vector block.
Parameters: |
|
---|
declare_sample_delay(streams_to_vector_sptr self, unsigned int delay)
pc_input_buffers_full_avg(streams_to_vector_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(streams_to_vector_sptr self) -> pmt_vector_float
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.
Constructor Specific Documentation:
Make a stretch block.
Parameters: |
|
---|
declare_sample_delay(stretch_ff_sptr self, unsigned int delay)
pc_input_buffers_full_avg(stretch_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(stretch_ff_sptr self) -> pmt_vector_float
output = input_0 - input_1 - ...)
Subtract across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(sub_cc_sptr self, unsigned int delay)
pc_input_buffers_full_avg(sub_cc_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(sub_cc_sptr self) -> pmt_vector_float
output = input_0 - input_1 - ...)
Subtract across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(sub_ff_sptr self, unsigned int delay)
pc_input_buffers_full_avg(sub_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(sub_ff_sptr self) -> pmt_vector_float
output = input_0 - input_1 - ...)
Subtract across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(sub_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(sub_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(sub_ii_sptr self) -> pmt_vector_float
output = input_0 - input_1 - ...)
Subtract across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(sub_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(sub_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(sub_ss_sptr self) -> pmt_vector_float
Bit bucket that prints out any tag received.
This block collects all tags sent to it on all input ports and displays them to stdout in a formatted way. The parameter is used to identify which debug sink generated the tag, so when connecting a block to this debug sink, an appropriate name is something that identifies the input block.
This block otherwise acts as a NULL sink in that items from the input stream are ignored. It is designed to be able to attach to any block and watch all tags streaming out of that block for debugging purposes.
Specifying a key will allow this block to filter out all other tags and only display tags that match the given key. This can help clean up the output and allow you to focus in on a particular tag of interest.
The tags from the last call to this work function are stored and can be retrieved using the function ‘current_tags’.
Constructor Specific Documentation:
Build a tag debug block
Parameters: |
|
---|
Returns a vector of tag_t items as of the last call to work.
declare_sample_delay(tag_debug_sptr self, unsigned int delay)
Get the current filter key.
Return the total number of tags in the tag queue.
pc_input_buffers_full_avg(tag_debug_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(tag_debug_sptr self) -> pmt_vector_float
Set the display of tags to stdout on/off.
Set a new key to filter with.
Control tag propagation.
Use this block to stop tags from propagating.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(tag_gate_sptr self, unsigned int delay)
pc_input_buffers_full_avg(tag_gate_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(tag_gate_sptr self) -> pmt_vector_float
A file sink that uses tags to save files.
The sink uses a tag with the key ‘burst’ to trigger the saving of the burst data to a new file. If the value of this tag is True, it will open a new file and start writing all incoming data to it. If the tag is False, it will close the file (if already opened). The file names are based on the time when the burst tag was seen. If there is an ‘rx_time’ tag (standard with UHD sources), that is used as the time. If no ‘rx_time’ tag is found, the new time is calculated based off the sample rate of the block.
Constructor Specific Documentation:
Build a tagged_file_sink block.
Parameters: |
|
---|
declare_sample_delay(tagged_file_sink_sptr self, unsigned int delay)
pc_input_buffers_full_avg(tagged_file_sink_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(tagged_file_sink_sptr self) -> pmt_vector_float
Align a stream to a tagged stream item.
Takes an unaligned stream of tagged stream items and aligns to the first item
Constructor Specific Documentation:
Make a tagged stream align
Parameters: |
|
---|
declare_sample_delay(tagged_stream_align_sptr self, unsigned int delay)
pc_input_buffers_full_avg(tagged_stream_align_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(tagged_stream_align_sptr self) -> pmt_vector_float
Allows scaling of a tagged stream length tag.
Searches for a specific tagged stream length tag and multiplies that length by a constant - for constant rate change blocks in a tagged stream
Constructor Specific Documentation:
Make a tagged stream multiply_length block.
Parameters: |
|
---|
declare_sample_delay(tagged_stream_multiply_length_sptr self, unsigned int delay)
pc_input_buffers_full_avg(tagged_stream_multiply_length_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(tagged_stream_multiply_length_sptr self) -> pmt_vector_float
Combines tagged streams.
Takes N streams as input. Each stream is tagged with packet lengths. Packets are output sequentially from each input stream.
The output signal has a new length tag, which is the sum of all individual length tags. The old length tags are discarded.
All other tags are propagated as expected, i.e. they stay associated with the same input item. There are cases when this behaviour is undesirable. One special case is when a tag at the first element (the head item) of one input port must stay on the head item of the output port. To achieve this, set to the port that will receive these special tags.
Constructor Specific Documentation:
Make a tagged stream mux block.
Parameters: |
|
---|
declare_sample_delay(tagged_stream_mux_sptr self, unsigned int delay)
pc_input_buffers_full_avg(tagged_stream_mux_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(tagged_stream_mux_sptr self) -> pmt_vector_float
Turns received stream data and tags into PDUs and sends them through a message port.
The sent message is a PMT-pair (created by pmt::cons()). The first element is a dictionary containing all the tags. The second is a vector containing the actual data.
Constructor Specific Documentation:
Construct a tagged_stream_to_pdu block.
Parameters: |
|
---|
declare_sample_delay(tagged_stream_to_pdu_sptr self, unsigned int delay)
pc_input_buffers_full_avg(tagged_stream_to_pdu_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(tagged_stream_to_pdu_sptr self) -> pmt_vector_float
Send tags at defined interval.
Sends a tag with key ‘strobe’ and a user-defined value (as a PMT) every number of samples. Useful for testing/debugging the tags system.
Because tags are sent with a data stream, this is a source block that acts identical to a null_source block.
Constructor Specific Documentation:
Make a tags stobe block to send tags with value every number of samples.
Parameters: |
|
---|
declare_sample_delay(tags_strobe_sptr self, unsigned int delay)
Get the key of the tags being sent.
Get the number of samples between the tag strobe.
pc_input_buffers_full_avg(tags_strobe_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(tags_strobe_sptr self) -> pmt_vector_float
Change the tag key we are sending
Reset the sending interval.
Reset the value of the tags being sent.
Get the value of the tags being sent.
Output a 1 or zero based on a threshold value.
Test the incoming signal against a threshold. If the signal excedes the value, it will output a 1 until the signal falls below the value.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(threshold_ff_sptr self, unsigned int delay)
pc_input_buffers_full_avg(threshold_ff_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(threshold_ff_sptr self) -> pmt_vector_float
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: |
|
---|
declare_sample_delay(throttle_sptr self, unsigned int delay)
pc_input_buffers_full_avg(throttle_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(throttle_sptr self) -> pmt_vector_float
Get the sample rate in samples per second.
Sets the sample rate in samples per second.
A block that performs various transcendental math operations.
Possible function names can be found in the cmath library. IO may be either complex or real, double or single precision.
Possible type strings: float, double, complex_float, complex_double
output[i] = trans_fcn(input[i])
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(transcendental_sptr self, unsigned int delay)
pc_input_buffers_full_avg(transcendental_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(transcendental_sptr self) -> pmt_vector_float
A vector sink for tagged streams.
Unlike a gr::blocks::vector_sink_f, this only works with tagged streams.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(tsb_vector_sink_b_sptr self, unsigned int delay)
pc_input_buffers_full_avg(tsb_vector_sink_b_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(tsb_vector_sink_b_sptr self) -> pmt_vector_float
Doesn’t include the TSB tags.
A vector sink for tagged streams.
Unlike a gr::blocks::vector_sink_f, this only works with tagged streams.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(tsb_vector_sink_c_sptr self, unsigned int delay)
pc_input_buffers_full_avg(tsb_vector_sink_c_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(tsb_vector_sink_c_sptr self) -> pmt_vector_float
Doesn’t include the TSB tags.
A vector sink for tagged streams.
Unlike a gr::blocks::vector_sink_f, this only works with tagged streams.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(tsb_vector_sink_f_sptr self, unsigned int delay)
pc_input_buffers_full_avg(tsb_vector_sink_f_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(tsb_vector_sink_f_sptr self) -> pmt_vector_float
Doesn’t include the TSB tags.
A vector sink for tagged streams.
Unlike a gr::blocks::vector_sink_f, this only works with tagged streams.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(tsb_vector_sink_i_sptr self, unsigned int delay)
pc_input_buffers_full_avg(tsb_vector_sink_i_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(tsb_vector_sink_i_sptr self) -> pmt_vector_float
Doesn’t include the TSB tags.
A vector sink for tagged streams.
Unlike a gr::blocks::vector_sink_f, this only works with tagged streams.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(tsb_vector_sink_s_sptr self, unsigned int delay)
pc_input_buffers_full_avg(tsb_vector_sink_s_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(tsb_vector_sink_s_sptr self) -> pmt_vector_float
Doesn’t include the TSB tags.
Creates TUNTAP interface and translates traffic to PDUs.
Constructor Specific Documentation:
Construct a TUNTAP PDU interface.
Parameters: |
|
---|
declare_sample_delay(tuntap_pdu_sptr self, unsigned int delay)
pc_input_buffers_full_avg(tuntap_pdu_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(tuntap_pdu_sptr self) -> pmt_vector_float
Convert stream of unsigned chars to a stream of floats.
Constructor Specific Documentation:
Build a uchar to float block.
declare_sample_delay(uchar_to_float_sptr self, unsigned int delay)
pc_input_buffers_full_avg(uchar_to_float_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(uchar_to_float_sptr self) -> pmt_vector_float
Write stream to an UDP socket.
Constructor Specific Documentation:
UDP Sink Constructor.
Parameters: |
|
---|
Change the connection to a new destination.
Calls disconnect() to terminate any current connection first.
declare_sample_delay(udp_sink_sptr self, unsigned int delay)
Send zero-length packet (if eof is requested) then stop sending.
Zero-byte packets can be interpreted as EOF by gr_udp_source. Note that disconnect occurs automatically when the sink is destroyed, but not when its top_block stops.
return the PAYLOAD_SIZE of the socket
pc_input_buffers_full_avg(udp_sink_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(udp_sink_sptr self) -> pmt_vector_float
Read stream from an UDP socket.
Constructor Specific Documentation:
UDP Source Constructor.
Parameters: |
|
---|
Change the connection to a new destination.
Calls disconnect() to terminate any current connection first.
declare_sample_delay(udp_source_sptr self, unsigned int delay)
Cut the connection if we have one set up.
return the port number of the socket
return the PAYLOAD_SIZE of the socket
pc_input_buffers_full_avg(udp_source_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(udp_source_sptr self) -> pmt_vector_float
Converts a byte with k relevent bits to k output bytes with 1 bit in the LSB.
This block picks the K least significant bits from a byte, and expands them into K bytes of 0 or 1.
Example: k = 4 in = [0xf5, 0x08] out = [0,1,0,1, 1,0,0,0]
Constructor Specific Documentation:
Make an unpack_k_bits block.
Parameters: | k – number of bits to unpack. |
---|
declare_sample_delay(unpack_k_bits_bb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(unpack_k_bits_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(unpack_k_bits_bb_sptr self) -> pmt_vector_float
Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
input: stream of unsigned char; output: stream of unsigned char
This is the inverse of gr::blocks::packed_to_unpacked_XX.
The low bits are extracted from each input byte or short. These bits are then packed densely into the output bytes or shorts, such that all 8 or 16 bits of the output bytes or shorts are filled with valid input bits. The right thing is done if bits_per_chunk is not a power of two.
The combination of gr::blocks::packed_to_unpacked_XX followed by gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(unpacked_to_packed_bb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(unpacked_to_packed_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(unpacked_to_packed_bb_sptr self) -> pmt_vector_float
Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
input: stream of int; output: stream of int
This is the inverse of gr::blocks::packed_to_unpacked_XX.
The low bits are extracted from each input byte or short. These bits are then packed densely into the output bytes or shorts, such that all 8 or 16 bits of the output bytes or shorts are filled with valid input bits. The right thing is done if bits_per_chunk is not a power of two.
The combination of gr::blocks::packed_to_unpacked_XX followed by gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(unpacked_to_packed_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(unpacked_to_packed_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(unpacked_to_packed_ii_sptr self) -> pmt_vector_float
Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
input: stream of short; output: stream of short
This is the inverse of gr::blocks::packed_to_unpacked_XX.
The low bits are extracted from each input byte or short. These bits are then packed densely into the output bytes or shorts, such that all 8 or 16 bits of the output bytes or shorts are filled with valid input bits. The right thing is done if bits_per_chunk is not a power of two.
The combination of gr::blocks::packed_to_unpacked_XX followed by gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(unpacked_to_packed_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(unpacked_to_packed_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(unpacked_to_packed_ss_sptr self) -> pmt_vector_float
VCO - Voltage controlled oscillator.
input: float stream of control voltages; output: complex oscillator output
Constructor Specific Documentation:
VCO - Voltage controlled oscillator.
Parameters: |
|
---|
declare_sample_delay(vco_c_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vco_c_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vco_c_sptr self) -> pmt_vector_float
VCO - Voltage controlled oscillator.
input: float stream of control voltages; output: float oscillator output
Constructor Specific Documentation:
VCO - Voltage controlled oscillator.
Parameters: |
|
---|
declare_sample_delay(vco_f_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vco_f_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vco_f_sptr self) -> pmt_vector_float
source of unsigned char’s that gets its data from a vector
Constructor Specific Documentation:
Make vector insert block.
Parameters: |
|
---|
declare_sample_delay(vector_insert_b_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_insert_b_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_insert_b_sptr self) -> pmt_vector_float
source of gr_complex’s that gets its data from a vector
Constructor Specific Documentation:
Make vector insert block.
Parameters: |
|
---|
declare_sample_delay(vector_insert_c_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_insert_c_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_insert_c_sptr self) -> pmt_vector_float
source of float’s that gets its data from a vector
Constructor Specific Documentation:
Make vector insert block.
Parameters: |
|
---|
declare_sample_delay(vector_insert_f_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_insert_f_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_insert_f_sptr self) -> pmt_vector_float
source of int’s that gets its data from a vector
Constructor Specific Documentation:
Make vector insert block.
Parameters: |
|
---|
declare_sample_delay(vector_insert_i_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_insert_i_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_insert_i_sptr self) -> pmt_vector_float
source of short’s that gets its data from a vector
Constructor Specific Documentation:
Make vector insert block.
Parameters: |
|
---|
declare_sample_delay(vector_insert_s_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_insert_s_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_insert_s_sptr self) -> pmt_vector_float
Maps elements from a set of input vectors to a set of output vectors.
If in[i] is the input vector in the i’th stream then the output vector in the j’th stream is:
out[j][k] = in[mapping[j][k][0]][mapping[j][k][1]]
That is mapping is of the form (out_stream1_mapping, out_stream2_mapping, ...) and out_stream1_mapping is of the form (element1_mapping, element2_mapping, ...) and element1_mapping is of the form (in_stream, in_element).
Constructor Specific Documentation:
Build a vector map block.
Parameters: |
|
---|
declare_sample_delay(vector_map_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_map_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_map_sptr self) -> pmt_vector_float
unsigned char sink that writes to a vector
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(vector_sink_b_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_sink_b_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_sink_b_sptr self) -> pmt_vector_float
gr_complex sink that writes to a vector
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(vector_sink_c_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_sink_c_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_sink_c_sptr self) -> pmt_vector_float
float sink that writes to a vector
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(vector_sink_f_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_sink_f_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_sink_f_sptr self) -> pmt_vector_float
int sink that writes to a vector
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(vector_sink_i_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_sink_i_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_sink_i_sptr self) -> pmt_vector_float
short sink that writes to a vector
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(vector_sink_s_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_sink_s_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_sink_s_sptr self) -> pmt_vector_float
Source that streams unsigned char items based on the input vector.
This block produces a stream of samples based on an input vector. In C++, this is a std::vector<unsigned char>, and in Python, this is either a list or tuple. The data can repeat infinitely until the flowgraph is terminated by some other event or, the default, run the data once and stop.
The vector source can also produce stream tags with the data. Pass in a vector of gr::tag_t objects and they will be emitted based on the specified offset of the tag.
GNU Radio provides a utility Python module in gr.tag_utils to convert between tags and Python objects: gr.tag_utils.python_to_tag.
We can create tags as Python lists (or tuples) using the list structure [int offset, pmt key, pmt value, pmt srcid]. It is important to define the list/tuple with the values in the correct order and with the correct data type. A python dictionary can also be used using the keys: “offset”, “key”, “value”, and “srcid” with the same data types as for the lists.
When given a list of tags, the vector source will emit the tags repeatedly by updating the offset relative to the vector stream length. That is, if the vector has 500 items and a tag has an offset of 0, that tag will be placed on item 0, 500, 1000, 1500, etc.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(vector_source_b_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_source_b_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_source_b_sptr self) -> pmt_vector_float
Source that streams gr_complex items based on the input vector.
This block produces a stream of samples based on an input vector. In C++, this is a std::vector<gr_complex>, and in Python, this is either a list or tuple. The data can repeat infinitely until the flowgraph is terminated by some other event or, the default, run the data once and stop.
The vector source can also produce stream tags with the data. Pass in a vector of gr::tag_t objects and they will be emitted based on the specified offset of the tag.
GNU Radio provides a utility Python module in gr.tag_utils to convert between tags and Python objects: gr.tag_utils.python_to_tag.
We can create tags as Python lists (or tuples) using the list structure [int offset, pmt key, pmt value, pmt srcid]. It is important to define the list/tuple with the values in the correct order and with the correct data type. A python dictionary can also be used using the keys: “offset”, “key”, “value”, and “srcid” with the same data types as for the lists.
When given a list of tags, the vector source will emit the tags repeatedly by updating the offset relative to the vector stream length. That is, if the vector has 500 items and a tag has an offset of 0, that tag will be placed on item 0, 500, 1000, 1500, etc.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(vector_source_c_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_source_c_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_source_c_sptr self) -> pmt_vector_float
Source that streams float items based on the input vector.
This block produces a stream of samples based on an input vector. In C++, this is a std::vector<float>, and in Python, this is either a list or tuple. The data can repeat infinitely until the flowgraph is terminated by some other event or, the default, run the data once and stop.
The vector source can also produce stream tags with the data. Pass in a vector of gr::tag_t objects and they will be emitted based on the specified offset of the tag.
GNU Radio provides a utility Python module in gr.tag_utils to convert between tags and Python objects: gr.tag_utils.python_to_tag.
We can create tags as Python lists (or tuples) using the list structure [int offset, pmt key, pmt value, pmt srcid]. It is important to define the list/tuple with the values in the correct order and with the correct data type. A python dictionary can also be used using the keys: “offset”, “key”, “value”, and “srcid” with the same data types as for the lists.
When given a list of tags, the vector source will emit the tags repeatedly by updating the offset relative to the vector stream length. That is, if the vector has 500 items and a tag has an offset of 0, that tag will be placed on item 0, 500, 1000, 1500, etc.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(vector_source_f_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_source_f_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_source_f_sptr self) -> pmt_vector_float
Source that streams int items based on the input vector.
This block produces a stream of samples based on an input vector. In C++, this is a std::vector<int>, and in Python, this is either a list or tuple. The data can repeat infinitely until the flowgraph is terminated by some other event or, the default, run the data once and stop.
The vector source can also produce stream tags with the data. Pass in a vector of gr::tag_t objects and they will be emitted based on the specified offset of the tag.
GNU Radio provides a utility Python module in gr.tag_utils to convert between tags and Python objects: gr.tag_utils.python_to_tag.
We can create tags as Python lists (or tuples) using the list structure [int offset, pmt key, pmt value, pmt srcid]. It is important to define the list/tuple with the values in the correct order and with the correct data type. A python dictionary can also be used using the keys: “offset”, “key”, “value”, and “srcid” with the same data types as for the lists.
When given a list of tags, the vector source will emit the tags repeatedly by updating the offset relative to the vector stream length. That is, if the vector has 500 items and a tag has an offset of 0, that tag will be placed on item 0, 500, 1000, 1500, etc.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(vector_source_i_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_source_i_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_source_i_sptr self) -> pmt_vector_float
Source that streams short items based on the input vector.
This block produces a stream of samples based on an input vector. In C++, this is a std::vector<short>, and in Python, this is either a list or tuple. The data can repeat infinitely until the flowgraph is terminated by some other event or, the default, run the data once and stop.
The vector source can also produce stream tags with the data. Pass in a vector of gr::tag_t objects and they will be emitted based on the specified offset of the tag.
GNU Radio provides a utility Python module in gr.tag_utils to convert between tags and Python objects: gr.tag_utils.python_to_tag.
We can create tags as Python lists (or tuples) using the list structure [int offset, pmt key, pmt value, pmt srcid]. It is important to define the list/tuple with the values in the correct order and with the correct data type. A python dictionary can also be used using the keys: “offset”, “key”, “value”, and “srcid” with the same data types as for the lists.
When given a list of tags, the vector source will emit the tags repeatedly by updating the offset relative to the vector stream length. That is, if the vector has 500 items and a tag has an offset of 0, that tag will be placed on item 0, 500, 1000, 1500, etc.
Constructor Specific Documentation:
Parameters: |
|
---|
declare_sample_delay(vector_source_s_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_source_s_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_source_s_sptr self) -> pmt_vector_float
convert a stream of gnuradio/blocks of nitems_per_block items into a stream of items
Constructor Specific Documentation:
Make vector-to-stream block
Parameters: |
|
---|
declare_sample_delay(vector_to_stream_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_to_stream_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_to_stream_sptr self) -> pmt_vector_float
Convert 1 stream of vectors of length N to N streams of items.
Constructor Specific Documentation:
Make vector-to-streams block
Parameters: |
|
---|
declare_sample_delay(vector_to_streams_sptr self, unsigned int delay)
pc_input_buffers_full_avg(vector_to_streams_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(vector_to_streams_sptr self) -> pmt_vector_float
Write stream to a Microsoft PCM (.wav) file.
Values must be floats within [-1;1]. Check gr_make_wavfile_sink() for extra info.
Constructor Specific Documentation:
Parameters: |
|
---|
Closes the currently active file and completes the WAV header. Thread-safe.
declare_sample_delay(wavfile_sink_sptr self, unsigned int delay)
Opens a new file and writes a WAV header. Thread-safe.
pc_input_buffers_full_avg(wavfile_sink_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(wavfile_sink_sptr self) -> pmt_vector_float
Set bits per sample. This will not affect the WAV file currently opened (see set_sample_rate()). If the value is neither 8 nor 16, the call is ignored and the current value is kept.
Set the sample rate. This will not affect the WAV file currently opened. Any following open() calls will use this new sample rate.
Read stream from a Microsoft PCM (.wav) file, output floats.
Unless otherwise called, values are within [-1;1]. Check gr_make_wavfile_source() for extra info.
Constructor Specific Documentation:
Parameters: |
|
---|
Return the number of bits per sample as specified in the wav file header. Only 8 or 16 bit are supported here.
Return the number of channels in the wav file as specified in the wav file header. This is also the max number of outputs you can have.
declare_sample_delay(wavfile_source_sptr self, unsigned int delay)
pc_input_buffers_full_avg(wavfile_source_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(wavfile_source_sptr self) -> pmt_vector_float
Read the sample rate as specified in the wav file header.
output = input_0 ^ input_1 ^ , ... ^ input_N)
Bitwise boolean xor across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(xor_bb_sptr self, unsigned int delay)
pc_input_buffers_full_avg(xor_bb_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(xor_bb_sptr self) -> pmt_vector_float
output = input_0 ^ input_1 ^ , ... ^ input_N)
Bitwise boolean xor across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(xor_ii_sptr self, unsigned int delay)
pc_input_buffers_full_avg(xor_ii_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(xor_ii_sptr self) -> pmt_vector_float
output = input_0 ^ input_1 ^ , ... ^ input_N)
Bitwise boolean xor across all input streams.
Constructor Specific Documentation:
Parameters: | vlen – |
---|
declare_sample_delay(xor_ss_sptr self, unsigned int delay)
pc_input_buffers_full_avg(xor_ss_sptr self) -> pmt_vector_float
pc_output_buffers_full_avg(xor_ss_sptr self) -> pmt_vector_float