From f2ab263b6fc9c24adc88fb55f2c210dd88e9345a Mon Sep 17 00:00:00 2001 From: Tim O'Shea Date: Sat, 7 Jan 2012 17:52:31 -0500 Subject: Block Modifications: digital.mpsk_receiver_cc: Set reasonable default parameter values for GRC definition digital.ofdm_insert_preamble: Expose enter_preamble() as public, to allow external state changes Cleanup of incorrect forecast behavior Make the flag port optional, incase external preamble triggers are preferred to in-band gr_vector_source: added set_data( data ) and rewind() public methods gr_head: added set_length(int) method to modify head length New Blocks Added: gr_keep_m_in_n: Allows periodic extraction of M items instead of 1 (in keep_1_in_n) gr_pack_k_bits: Complementary block fo gr_unpack_k_bits gr_vector_insert_x: Complement to the gr_head block, inserts a vector into a stream then becomes a pass through --- grc/blocks/block_tree.xml | 3 ++ grc/blocks/gr_keep_m_in_n.xml | 74 ++++++++++++++++++++++++++++++++++++ grc/blocks/gr_pack_k_bits_bb.xml | 30 +++++++++++++++ grc/blocks/gr_vector_insert_x.xml | 80 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 187 insertions(+) create mode 100644 grc/blocks/gr_keep_m_in_n.xml create mode 100644 grc/blocks/gr_pack_k_bits_bb.xml create mode 100644 grc/blocks/gr_vector_insert_x.xml (limited to 'grc') diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml index 18bc050ba..0b0b6854e 100644 --- a/grc/blocks/block_tree.xml +++ b/grc/blocks/block_tree.xml @@ -61,6 +61,7 @@ gr_fft_vxx blks2_logpwrfft_x + gr_vector_insert_x Type Conversions @@ -114,6 +115,7 @@ gr_unpacked_to_packed_xx gr_packed_to_unpacked_xx gr_unpack_k_bits_bb + gr_pack_k_bits_bb gr_chunks_to_symbols_xx gr_map_bb @@ -183,6 +185,7 @@ blks2_rational_resampler_xxx gr_fractional_interpolator_xx gr_keep_one_in_n + gr_keep_m_in_n gr_moving_average_xx gr_iqcomp_cc gr_dc_blocker diff --git a/grc/blocks/gr_keep_m_in_n.xml b/grc/blocks/gr_keep_m_in_n.xml new file mode 100644 index 000000000..a63ef47a6 --- /dev/null +++ b/grc/blocks/gr_keep_m_in_n.xml @@ -0,0 +1,74 @@ + + + + Keep M in N + gr_keep_m_in_n + from gnuradio import gr + gr.keep_m_in_n($type.size, $m, $n, $offset) + set_offset($offset) + + Type + type + enum + + + + + + + + M + m + 1 + int + + + N + n + 2 + int + + + initial offset + offset + 0 + int + + $n > 0 + $m > 0 + $m < $n + + in + $type + $n + + + out + $type + $m + + diff --git a/grc/blocks/gr_pack_k_bits_bb.xml b/grc/blocks/gr_pack_k_bits_bb.xml new file mode 100644 index 000000000..34e64a5d9 --- /dev/null +++ b/grc/blocks/gr_pack_k_bits_bb.xml @@ -0,0 +1,30 @@ + + + + Pack K Bits + gr_pack_k_bits_bb + from gnuradio import gr + gr.pack_k_bits_bb($k) + + K + k + int + + + in + byte + + + out + byte + + + + Pack K unpacked bits (one bit per byte) into a single packed byte containing k bits and 8 - k zeros. + + + diff --git a/grc/blocks/gr_vector_insert_x.xml b/grc/blocks/gr_vector_insert_x.xml new file mode 100644 index 000000000..f9ce1f654 --- /dev/null +++ b/grc/blocks/gr_vector_insert_x.xml @@ -0,0 +1,80 @@ + + + + Vector Insert + gr_vector_insert_x + from gnuradio import gr + gr.vector_insert_$(type.fcn)($vector, $period, $offset) + + Output Type + type + enum + + + + + + + + Vector + vector + 0, 0, 0 + $type.vec_type + + + Periodicity + period + 100 + int + + + Offset + offset + 0 + int + + + in + $type + + + out + $type + + + + Periodicity, the length of the periodicity at which the vector should be inserted at the output. + (i.e. one vector for every N output items) + + Offset sepcifies where in the cycle period we should begin at. + + -- cgit