summaryrefslogtreecommitdiff
path: root/gr-digital
diff options
context:
space:
mode:
Diffstat (limited to 'gr-digital')
-rw-r--r--gr-digital/CMakeLists.txt2
-rw-r--r--gr-digital/examples/ofdm/ofdm_loopback.grc861
-rw-r--r--gr-digital/examples/ofdm/rx_ofdm.grc1333
-rw-r--r--gr-digital/examples/ofdm/tx_ofdm.grc1383
-rw-r--r--gr-digital/grc/digital_block_tree.xml2
-rw-r--r--gr-digital/grc/digital_header_payload_demux.xml4
-rw-r--r--gr-digital/grc/digital_ofdm_chanest_vcvc.xml9
-rw-r--r--gr-digital/grc/digital_ofdm_cyclic_prefixer.xml9
-rw-r--r--gr-digital/grc/digital_ofdm_frame_equalizer_vcvc.xml8
-rw-r--r--gr-digital/grc/digital_ofdm_rx.xml174
-rw-r--r--gr-digital/grc/digital_ofdm_serializer_vcc.xml12
-rw-r--r--gr-digital/grc/digital_ofdm_sync_sc_cfb.xml19
-rw-r--r--gr-digital/grc/digital_ofdm_tx.xml180
-rw-r--r--gr-digital/include/gnuradio/digital/CMakeLists.txt (renamed from gr-digital/include/digital/CMakeLists.txt)0
-rw-r--r--gr-digital/include/gnuradio/digital/additive_scrambler_bb.h (renamed from gr-digital/include/digital/additive_scrambler_bb.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/api.h (renamed from gr-digital/include/digital/api.h)2
-rw-r--r--gr-digital/include/gnuradio/digital/binary_slicer_fb.h (renamed from gr-digital/include/digital/binary_slicer_fb.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/chunks_to_symbols_XX.h.t (renamed from gr-digital/include/digital/chunks_to_symbols_XX.h.t)6
-rw-r--r--gr-digital/include/gnuradio/digital/clock_recovery_mm_cc.h (renamed from gr-digital/include/digital/clock_recovery_mm_cc.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/clock_recovery_mm_ff.h (renamed from gr-digital/include/digital/clock_recovery_mm_ff.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/cma_equalizer_cc.h (renamed from gr-digital/include/digital/cma_equalizer_cc.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/constellation.h (renamed from gr-digital/include/digital/constellation.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/constellation_decoder_cb.h (renamed from gr-digital/include/digital/constellation_decoder_cb.h)8
-rw-r--r--gr-digital/include/gnuradio/digital/constellation_receiver_cb.h (renamed from gr-digital/include/digital/constellation_receiver_cb.h)8
-rw-r--r--gr-digital/include/gnuradio/digital/correlate_access_code_bb.h (renamed from gr-digital/include/digital/correlate_access_code_bb.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/correlate_access_code_tag_bb.h (renamed from gr-digital/include/digital/correlate_access_code_tag_bb.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/costas_loop_cc.h (renamed from gr-digital/include/digital/costas_loop_cc.h)8
-rw-r--r--gr-digital/include/gnuradio/digital/cpmmod_bc.h (renamed from gr-digital/include/digital/cpmmod_bc.h)8
-rw-r--r--gr-digital/include/gnuradio/digital/crc32.h (renamed from gr-digital/include/digital/crc32.h)4
-rw-r--r--gr-digital/include/gnuradio/digital/crc32_bb.h (renamed from gr-digital/include/digital/crc32_bb.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/descrambler_bb.h (renamed from gr-digital/include/digital/descrambler_bb.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/diff_decoder_bb.h (renamed from gr-digital/include/digital/diff_decoder_bb.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/diff_encoder_bb.h (renamed from gr-digital/include/digital/diff_encoder_bb.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/diff_phasor_cc.h (renamed from gr-digital/include/digital/diff_phasor_cc.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/fll_band_edge_cc.h (renamed from gr-digital/include/digital/fll_band_edge_cc.h)8
-rw-r--r--gr-digital/include/gnuradio/digital/framer_sink_1.h (renamed from gr-digital/include/digital/framer_sink_1.h)10
-rw-r--r--gr-digital/include/gnuradio/digital/glfsr.h (renamed from gr-digital/include/digital/glfsr.h)2
-rw-r--r--gr-digital/include/gnuradio/digital/glfsr_source_b.h (renamed from gr-digital/include/digital/glfsr_source_b.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/glfsr_source_f.h (renamed from gr-digital/include/digital/glfsr_source_f.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/header_payload_demux.h (renamed from gr-digital/include/digital/header_payload_demux.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/kurtotic_equalizer_cc.h (renamed from gr-digital/include/digital/kurtotic_equalizer_cc.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/lfsr.h (renamed from gr-digital/include/digital/lfsr.h)2
-rw-r--r--gr-digital/include/gnuradio/digital/lms_dd_equalizer_cc.h (renamed from gr-digital/include/digital/lms_dd_equalizer_cc.h)8
-rw-r--r--gr-digital/include/gnuradio/digital/map_bb.h (renamed from gr-digital/include/digital/map_bb.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/metric_type.h (renamed from gr-digital/include/digital/metric_type.h)0
-rw-r--r--gr-digital/include/gnuradio/digital/mpsk_receiver_cc.h (renamed from gr-digital/include/digital/mpsk_receiver_cc.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/mpsk_snr_est.h (renamed from gr-digital/include/digital/mpsk_snr_est.h)4
-rw-r--r--gr-digital/include/gnuradio/digital/mpsk_snr_est_cc.h (renamed from gr-digital/include/digital/mpsk_snr_est_cc.h)8
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_carrier_allocator_cvc.h (renamed from gr-digital/include/digital/ofdm_carrier_allocator_cvc.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_chanest_vcvc.h (renamed from gr-digital/include/digital/ofdm_chanest_vcvc.h)15
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_cyclic_prefixer.h (renamed from gr-digital/include/digital/ofdm_cyclic_prefixer.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_equalizer_base.h (renamed from gr-digital/include/digital/ofdm_equalizer_base.h)8
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_equalizer_simpledfe.h (renamed from gr-digital/include/digital/ofdm_equalizer_simpledfe.h)8
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_equalizer_static.h (renamed from gr-digital/include/digital/ofdm_equalizer_static.h)8
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_frame_acquisition.h (renamed from gr-digital/include/digital/ofdm_frame_acquisition.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_frame_equalizer_vcvc.h (renamed from gr-digital/include/digital/ofdm_frame_equalizer_vcvc.h)24
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_frame_sink.h (renamed from gr-digital/include/digital/ofdm_frame_sink.h)10
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_insert_preamble.h (renamed from gr-digital/include/digital/ofdm_insert_preamble.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_mapper_bcv.h (renamed from gr-digital/include/digital/ofdm_mapper_bcv.h)10
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_sampler.h (renamed from gr-digital/include/digital/ofdm_sampler.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_serializer_vcc.h (renamed from gr-digital/include/digital/ofdm_serializer_vcc.h)15
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_sync_sc_cfb.h (renamed from gr-digital/include/digital/ofdm_sync_sc_cfb.h)11
-rw-r--r--gr-digital/include/gnuradio/digital/packet_header_default.h (renamed from gr-digital/include/digital/packet_header_default.h)8
-rw-r--r--gr-digital/include/gnuradio/digital/packet_header_ofdm.h (renamed from gr-digital/include/digital/packet_header_ofdm.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/packet_headergenerator_bb.h (renamed from gr-digital/include/digital/packet_headergenerator_bb.h)8
-rw-r--r--gr-digital/include/gnuradio/digital/packet_headerparser_b.h (renamed from gr-digital/include/digital/packet_headerparser_b.h)8
-rw-r--r--gr-digital/include/gnuradio/digital/packet_sink.h (renamed from gr-digital/include/digital/packet_sink.h)10
-rw-r--r--gr-digital/include/gnuradio/digital/pfb_clock_sync_ccf.h (renamed from gr-digital/include/digital/pfb_clock_sync_ccf.h)8
-rw-r--r--gr-digital/include/gnuradio/digital/pfb_clock_sync_fff.h (renamed from gr-digital/include/digital/pfb_clock_sync_fff.h)8
-rw-r--r--gr-digital/include/gnuradio/digital/pn_correlator_cc.h (renamed from gr-digital/include/digital/pn_correlator_cc.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/probe_density_b.h (renamed from gr-digital/include/digital/probe_density_b.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/probe_mpsk_snr_est_c.h (renamed from gr-digital/include/digital/probe_mpsk_snr_est_c.h)8
-rw-r--r--gr-digital/include/gnuradio/digital/scrambler_bb.h (renamed from gr-digital/include/digital/scrambler_bb.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/simple_correlator.h (renamed from gr-digital/include/digital/simple_correlator.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/simple_framer.h (renamed from gr-digital/include/digital/simple_framer.h)6
-rw-r--r--gr-digital/include/gnuradio/digital/simple_framer_sync.h (renamed from gr-digital/include/digital/simple_framer_sync.h)0
-rw-r--r--gr-digital/lib/additive_scrambler_bb_impl.cc8
-rw-r--r--gr-digital/lib/additive_scrambler_bb_impl.h4
-rw-r--r--gr-digital/lib/binary_slicer_fb_impl.cc12
-rw-r--r--gr-digital/lib/binary_slicer_fb_impl.h2
-rw-r--r--gr-digital/lib/chunks_to_symbols_XX_impl.cc.t8
-rw-r--r--gr-digital/lib/chunks_to_symbols_XX_impl.h.t2
-rw-r--r--gr-digital/lib/clock_recovery_mm_cc_impl.cc22
-rw-r--r--gr-digital/lib/clock_recovery_mm_cc_impl.h4
-rw-r--r--gr-digital/lib/clock_recovery_mm_ff_impl.cc12
-rw-r--r--gr-digital/lib/clock_recovery_mm_ff_impl.h4
-rw-r--r--gr-digital/lib/cma_equalizer_cc_impl.cc12
-rw-r--r--gr-digital/lib/cma_equalizer_cc_impl.h6
-rw-r--r--gr-digital/lib/constellation.cc8
-rw-r--r--gr-digital/lib/constellation_decoder_cb_impl.cc8
-rw-r--r--gr-digital/lib/constellation_decoder_cb_impl.h2
-rw-r--r--gr-digital/lib/constellation_receiver_cb_impl.cc13
-rw-r--r--gr-digital/lib/constellation_receiver_cb_impl.h8
-rw-r--r--gr-digital/lib/correlate_access_code_bb_impl.cc10
-rw-r--r--gr-digital/lib/correlate_access_code_bb_impl.h2
-rw-r--r--gr-digital/lib/correlate_access_code_tag_bb_impl.cc10
-rw-r--r--gr-digital/lib/correlate_access_code_tag_bb_impl.h2
-rw-r--r--gr-digital/lib/costas_loop_cc_impl.cc18
-rw-r--r--gr-digital/lib/costas_loop_cc_impl.h2
-rw-r--r--gr-digital/lib/cpmmod_bc_impl.cc8
-rw-r--r--gr-digital/lib/cpmmod_bc_impl.h8
-rw-r--r--gr-digital/lib/crc32.cc2
-rw-r--r--gr-digital/lib/crc32_bb_impl.cc12
-rw-r--r--gr-digital/lib/crc32_bb_impl.h2
-rw-r--r--gr-digital/lib/descrambler_bb_impl.cc8
-rw-r--r--gr-digital/lib/descrambler_bb_impl.h4
-rw-r--r--gr-digital/lib/diff_decoder_bb_impl.cc8
-rw-r--r--gr-digital/lib/diff_decoder_bb_impl.h4
-rw-r--r--gr-digital/lib/diff_encoder_bb_impl.cc8
-rw-r--r--gr-digital/lib/diff_encoder_bb_impl.h2
-rw-r--r--gr-digital/lib/diff_phasor_cc_impl.cc8
-rw-r--r--gr-digital/lib/diff_phasor_cc_impl.h4
-rw-r--r--gr-digital/lib/fll_band_edge_cc_impl.cc10
-rw-r--r--gr-digital/lib/fll_band_edge_cc_impl.h6
-rw-r--r--gr-digital/lib/framer_sink_1_impl.cc20
-rw-r--r--gr-digital/lib/framer_sink_1_impl.h24
-rw-r--r--gr-digital/lib/glfsr.cc2
-rw-r--r--gr-digital/lib/glfsr_source_b_impl.cc8
-rw-r--r--gr-digital/lib/glfsr_source_b_impl.h4
-rw-r--r--gr-digital/lib/glfsr_source_f_impl.cc8
-rw-r--r--gr-digital/lib/glfsr_source_f_impl.h4
-rw-r--r--gr-digital/lib/header_payload_demux_impl.cc18
-rw-r--r--gr-digital/lib/header_payload_demux_impl.h2
-rw-r--r--gr-digital/lib/kurtotic_equalizer_cc_impl.cc8
-rw-r--r--gr-digital/lib/kurtotic_equalizer_cc_impl.h10
-rw-r--r--gr-digital/lib/lms_dd_equalizer_cc_impl.cc10
-rw-r--r--gr-digital/lib/lms_dd_equalizer_cc_impl.h4
-rw-r--r--gr-digital/lib/map_bb_impl.cc8
-rw-r--r--gr-digital/lib/map_bb_impl.h4
-rw-r--r--gr-digital/lib/mpsk_receiver_cc_impl.cc25
-rw-r--r--gr-digital/lib/mpsk_receiver_cc_impl.h10
-rw-r--r--gr-digital/lib/mpsk_snr_est.cc2
-rw-r--r--gr-digital/lib/mpsk_snr_est_cc_impl.cc8
-rw-r--r--gr-digital/lib/mpsk_snr_est_cc_impl.h6
-rw-r--r--gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc10
-rw-r--r--gr-digital/lib/ofdm_carrier_allocator_cvc_impl.h2
-rw-r--r--gr-digital/lib/ofdm_chanest_vcvc_impl.cc57
-rw-r--r--gr-digital/lib/ofdm_chanest_vcvc_impl.h2
-rw-r--r--gr-digital/lib/ofdm_cyclic_prefixer_impl.cc10
-rw-r--r--gr-digital/lib/ofdm_cyclic_prefixer_impl.h2
-rw-r--r--gr-digital/lib/ofdm_equalizer_base.cc9
-rw-r--r--gr-digital/lib/ofdm_equalizer_simpledfe.cc14
-rw-r--r--gr-digital/lib/ofdm_equalizer_static.cc10
-rw-r--r--gr-digital/lib/ofdm_frame_acquisition_impl.cc12
-rw-r--r--gr-digital/lib/ofdm_frame_acquisition_impl.h2
-rw-r--r--gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc88
-rw-r--r--gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.h11
-rw-r--r--gr-digital/lib/ofdm_frame_sink_impl.cc24
-rw-r--r--gr-digital/lib/ofdm_frame_sink_impl.h6
-rw-r--r--gr-digital/lib/ofdm_insert_preamble_impl.cc8
-rw-r--r--gr-digital/lib/ofdm_insert_preamble_impl.h2
-rw-r--r--gr-digital/lib/ofdm_mapper_bcv_impl.cc10
-rw-r--r--gr-digital/lib/ofdm_mapper_bcv_impl.h14
-rw-r--r--gr-digital/lib/ofdm_sampler_impl.cc10
-rw-r--r--gr-digital/lib/ofdm_sampler_impl.h4
-rw-r--r--gr-digital/lib/ofdm_serializer_vcc_impl.cc41
-rw-r--r--gr-digital/lib/ofdm_serializer_vcc_impl.h4
-rw-r--r--gr-digital/lib/ofdm_sync_sc_cfb_impl.cc40
-rw-r--r--gr-digital/lib/ofdm_sync_sc_cfb_impl.h4
-rw-r--r--gr-digital/lib/packet_header_default.cc28
-rw-r--r--gr-digital/lib/packet_header_ofdm.cc15
-rw-r--r--gr-digital/lib/packet_headergenerator_bb_impl.cc8
-rw-r--r--gr-digital/lib/packet_headergenerator_bb_impl.h4
-rw-r--r--gr-digital/lib/packet_headerparser_b_impl.cc16
-rw-r--r--gr-digital/lib/packet_headerparser_b_impl.h2
-rw-r--r--gr-digital/lib/packet_sink_impl.cc16
-rw-r--r--gr-digital/lib/packet_sink_impl.h8
-rw-r--r--gr-digital/lib/pfb_clock_sync_ccf_impl.cc12
-rw-r--r--gr-digital/lib/pfb_clock_sync_ccf_impl.h2
-rw-r--r--gr-digital/lib/pfb_clock_sync_fff_impl.cc12
-rw-r--r--gr-digital/lib/pfb_clock_sync_fff_impl.h2
-rw-r--r--gr-digital/lib/pn_correlator_cc_impl.cc8
-rw-r--r--gr-digital/lib/pn_correlator_cc_impl.h4
-rw-r--r--gr-digital/lib/probe_density_b_impl.cc8
-rw-r--r--gr-digital/lib/probe_density_b_impl.h2
-rw-r--r--gr-digital/lib/probe_mpsk_snr_est_c_impl.cc8
-rw-r--r--gr-digital/lib/probe_mpsk_snr_est_c_impl.h2
-rw-r--r--gr-digital/lib/scrambler_bb_impl.cc8
-rw-r--r--gr-digital/lib/scrambler_bb_impl.h6
-rw-r--r--gr-digital/lib/simple_correlator_impl.cc12
-rw-r--r--gr-digital/lib/simple_correlator_impl.h2
-rw-r--r--gr-digital/lib/simple_framer_impl.cc10
-rw-r--r--gr-digital/lib/simple_framer_impl.h2
-rw-r--r--gr-digital/python/CMakeLists.txt2
-rw-r--r--gr-digital/python/ofdm_txrx.py280
-rwxr-xr-xgr-digital/python/qa_crc32_bb.py20
-rwxr-xr-xgr-digital/python/qa_ofdm_carrier_allocator_cvc.py18
-rwxr-xr-xgr-digital/python/qa_ofdm_chanest_vcvc.py30
-rwxr-xr-xgr-digital/python/qa_ofdm_cyclic_prefixer.py4
-rwxr-xr-xgr-digital/python/qa_ofdm_frame_equalizer_vcvc.py231
-rwxr-xr-xgr-digital/python/qa_ofdm_serializer_vcc.py124
-rwxr-xr-xgr-digital/python/qa_ofdm_sync_sc_cfb.py117
-rwxr-xr-xgr-digital/python/qa_ofdm_txrx.py120
-rwxr-xr-xgr-digital/python/qa_packet_headergenerator_bb.py24
-rwxr-xr-xgr-digital/python/qa_packet_headerparser_b.py16
-rw-r--r--gr-digital/python/utils/tagged_streams.py4
-rw-r--r--gr-digital/swig/CMakeLists.txt4
-rw-r--r--gr-digital/swig/digital_swig.i268
198 files changed, 5111 insertions, 1631 deletions
diff --git a/gr-digital/CMakeLists.txt b/gr-digital/CMakeLists.txt
index 7d5a7541d1..4c7647a4db 100644
--- a/gr-digital/CMakeLists.txt
+++ b/gr-digital/CMakeLists.txt
@@ -91,7 +91,7 @@ CPACK_COMPONENT("digital_swig"
########################################################################
# Add subdirectories
########################################################################
-add_subdirectory(include/digital)
+add_subdirectory(include/gnuradio/digital)
add_subdirectory(lib)
add_subdirectory(doc)
if(ENABLE_PYTHON)
diff --git a/gr-digital/examples/ofdm/ofdm_loopback.grc b/gr-digital/examples/ofdm/ofdm_loopback.grc
new file mode 100644
index 0000000000..45a6ca0869
--- /dev/null
+++ b/gr-digital/examples/ofdm/ofdm_loopback.grc
@@ -0,0 +1,861 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+ <timestamp>Tue May 7 15:42:23 2013</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>ofdm_loopback_example</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>OFDM Loopback Example</value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value>Transmit a pre-defined signal (a complex sine) as OFDM packets.</value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>1280, 1024</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>wx_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(0, -1)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>len_tag_key</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"packet_len"</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(345, 0)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>fft_len</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>64</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(464, 0)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_slider</key>
+ <param>
+ <key>id</key>
+ <value>freq_offset</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Frequency Offset (Multiples of Sub-carrier spacing)</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>-3</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>100</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(652, 285)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_slider</key>
+ <param>
+ <key>id</key>
+ <value>noise_voltage</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Noise Amplitude</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0.01</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>100</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(651, 416)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>import</key>
+ <param>
+ <key>id</key>
+ <value>import_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>import</key>
+ <value>import numpy</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(536, -1)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>import</key>
+ <param>
+ <key>id</key>
+ <value>import_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>import</key>
+ <value>from gnuradio.digital.utils import tagged_streams</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(633, -1)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_ofdm_tx</key>
+ <param>
+ <key>id</key>
+ <value>digital_ofdm_tx_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>fft_len</key>
+ <value>fft_len</value>
+ </param>
+ <param>
+ <key>cp_len</key>
+ <value>fft_len/4</value>
+ </param>
+ <param>
+ <key>packet_len_key</key>
+ <value>len_tag_key</value>
+ </param>
+ <param>
+ <key>occupied_carriers</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>pilot_carriers</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>pilot_symbols</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>sync_word1</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>sync_word2</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>header_mod</key>
+ <value>"BPSK"</value>
+ </param>
+ <param>
+ <key>payload_mod</key>
+ <value>"BPSK"</value>
+ </param>
+ <param>
+ <key>rolloff</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>log</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(390, 78)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_float_to_uchar</key>
+ <param>
+ <key>id</key>
+ <value>blocks_float_to_uchar_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(230, 119)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>tx_signal</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[numpy.sin(2 * numpy.pi * 1.0/8 * x) for x in range(8*2)]</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(176, -1)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_vector_source_x</key>
+ <param>
+ <key>id</key>
+ <value>blocks_vector_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>vector</key>
+ <value>tx_signal</value>
+ </param>
+ <param>
+ <key>tags</key>
+ <value>tagged_streams.make_lengthtags((8*2*gr.sizeof_float,), (0,), tagname=len_tag_key)</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(-1, 101)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_throttle</key>
+ <param>
+ <key>id</key>
+ <value>blocks_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>100e3</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(354, 230)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_tag_gate</key>
+ <param>
+ <key>id</key>
+ <value>blocks_tag_gate_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>propagate_tags</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(539, 230)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_fftsink2</key>
+ <param>
+ <key>id</key>
+ <value>wxgui_fftsink2_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>Rx Spectrum</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>100e3</value>
+ </param>
+ <param>
+ <key>baseband_freq</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>y_per_div</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>y_divs</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>ref_level</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ref_scale</key>
+ <value>2.0</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>1024</value>
+ </param>
+ <param>
+ <key>fft_rate</key>
+ <value>15</value>
+ </param>
+ <param>
+ <key>peak_hold</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>average</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>avg_alpha</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>win</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>freqvar</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(92, 463)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>channel_model</key>
+ <param>
+ <key>id</key>
+ <value>chan_model</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>noise_voltage</key>
+ <value>noise_voltage</value>
+ </param>
+ <param>
+ <key>freq_offset</key>
+ <value>1.0/fft_len * freq_offset</value>
+ </param>
+ <param>
+ <key>epsilon</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>taps</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>seed</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(615, 86)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_ofdm_rx</key>
+ <param>
+ <key>id</key>
+ <value>digital_ofdm_rx_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>fft_len</key>
+ <value>fft_len</value>
+ </param>
+ <param>
+ <key>cp_len</key>
+ <value>fft_len/4</value>
+ </param>
+ <param>
+ <key>packet_len_key</key>
+ <value>"rx_len"</value>
+ </param>
+ <param>
+ <key>occupied_carriers</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>pilot_carriers</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>pilot_symbols</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>sync_word1</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>sync_word2</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>header_mod</key>
+ <value>"BPSK"</value>
+ </param>
+ <param>
+ <key>payload_mod</key>
+ <value>"BPSK"</value>
+ </param>
+ <param>
+ <key>log</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(92, 307)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_uchar_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_uchar_to_float_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(332, 340)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_tag_debug</key>
+ <param>
+ <key>id</key>
+ <value>blocks_tag_debug_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value>Rx Packets</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>display</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(336, 412)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_scopesink2</key>
+ <param>
+ <key>id</key>
+ <value>wxgui_scopesink2_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>Scope Plot</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>v_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>v_offset</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>t_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ac_couple</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>xy_mode</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>trig_mode</key>
+ <value>gr.gr_TRIG_MODE_AUTO</value>
+ </param>
+ <param>
+ <key>y_axis_label</key>
+ <value>Counts</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(504, 314)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>blocks_vector_source_x_0</source_block_id>
+ <sink_block_id>blocks_float_to_uchar_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_ofdm_tx_0</source_block_id>
+ <sink_block_id>chan_model</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_float_to_uchar_0</source_block_id>
+ <sink_block_id>digital_ofdm_tx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>digital_ofdm_rx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>wxgui_fftsink2_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_ofdm_rx_0</source_block_id>
+ <sink_block_id>blocks_uchar_to_float_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_uchar_to_float_0</source_block_id>
+ <sink_block_id>wxgui_scopesink2_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_ofdm_rx_0</source_block_id>
+ <sink_block_id>blocks_tag_debug_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>chan_model</source_block_id>
+ <sink_block_id>blocks_tag_gate_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_tag_gate_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-digital/examples/ofdm/rx_ofdm.grc b/gr-digital/examples/ofdm/rx_ofdm.grc
index 47e165508c..e38b84f65a 100644
--- a/gr-digital/examples/ofdm/rx_ofdm.grc
+++ b/gr-digital/examples/ofdm/rx_ofdm.grc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Thu Feb 14 15:49:35 2013</timestamp>
+ <timestamp>Tue May 14 11:03:11 2013</timestamp>
<block>
<key>options</key>
<param>
@@ -61,22 +61,22 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>import</key>
<param>
<key>id</key>
- <value>pilot_symbols_0</value>
+ <value>import_1</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>((100,),)</value>
+ <key>import</key>
+ <value>from gnuradio.digital.utils import tagged_streams</value>
</param>
<param>
<key>_coordinate</key>
- <value>(762, 64)</value>
+ <value>(163, 0)</value>
</param>
<param>
<key>_rotation</key>
@@ -87,7 +87,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>pilot_carriers</value>
+ <value>fft_len</value>
</param>
<param>
<key>_enabled</key>
@@ -95,11 +95,11 @@
</param>
<param>
<key>value</key>
- <value>((0,),)</value>
+ <value>64</value>
</param>
<param>
<key>_coordinate</key>
- <value>(557, 64)</value>
+ <value>(301, -1)</value>
</param>
<param>
<key>_rotation</key>
@@ -110,7 +110,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>header_formatter</value>
+ <value>payload_mod</value>
</param>
<param>
<key>_enabled</key>
@@ -118,11 +118,11 @@
</param>
<param>
<key>value</key>
- <value>digital.packet_header_ofdm(occupied_carriers, 1, length_tag_name)</value>
+ <value>digital.constellation_qpsk()</value>
</param>
<param>
<key>_coordinate</key>
- <value>(876, 64)</value>
+ <value>(648, 0)</value>
</param>
<param>
<key>_rotation</key>
@@ -133,7 +133,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>pilot_symbols</value>
+ <value>header_mod</value>
</param>
<param>
<key>_enabled</key>
@@ -141,11 +141,11 @@
</param>
<param>
<key>value</key>
- <value>((100,),)</value>
+ <value>digital.constellation_bpsk()</value>
</param>
<param>
<key>_coordinate</key>
- <value>(659, 64)</value>
+ <value>(490, 0)</value>
</param>
<param>
<key>_rotation</key>
@@ -168,7 +168,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(404, 64)</value>
+ <value>(598, 64)</value>
</param>
<param>
<key>_rotation</key>
@@ -176,34 +176,68 @@
</param>
</block>
<block>
- <key>analog_noise_source_x</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>analog_noise_source_x_0</value>
+ <value>pilot_carriers</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>value</key>
+ <value>((-21, -7, 7, 21,),)</value>
</param>
<param>
- <key>noise_type</key>
- <value>analog.GR_GAUSSIAN</value>
+ <key>_coordinate</key>
+ <value>(751, 64)</value>
</param>
<param>
- <key>amp</key>
- <value>1</value>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>pilot_symbols</value>
</param>
<param>
- <key>seed</key>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>((1, 1, 1, -1,),)</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(875, 65)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
<value>0</value>
</param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>sync_word2</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>(0, 0, 0, 0, 0, 1, 1, -1.0, -1, 1.0, 1, 1.0, -1, -1.0, -1, 1.0, 1, -1.0, 1, 1.0, 1, -1.0, -1, -1.0, -1, 1.0, -1, 1.0, -1, 1.0, 1, -1.0, 0, 1.0, 1, -1.0, 1, 1.0, -1, -1.0, 1, -1.0, -1, -1.0, 1, 1.0, 1, -1.0, 1, 1.0, -1, 1.0, -1, -1.0, -1, 1.0, 1, -1.0, 0, 0, 0, 0, 0, 0)</value>
+ </param>
<param>
<key>_coordinate</key>
- <value>(-1, 185)</value>
+ <value>(457, 64)</value>
</param>
<param>
<key>_rotation</key>
@@ -211,26 +245,45 @@
</param>
</block>
<block>
- <key>digital_ofdm_sync_sc_cfb</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>digital_ofdm_sync_sc_cfb_0</value>
+ <value>sync_word1</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>fft_len</key>
- <value>fft_len</value>
+ <key>value</key>
+ <value>(0, 0, 0, 0, 0, 0, 0, -1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, -1.0, 0, 1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, -1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 0, 0, 0, 0, 0)</value>
</param>
<param>
- <key>cp_len</key>
- <value>fft_len/4</value>
+ <key>_coordinate</key>
+ <value>(313, 64)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>3200000</value>
</param>
<param>
<key>_coordinate</key>
- <value>(368, 178)</value>
+ <value>(218, 64)</value>
</param>
<param>
<key>_rotation</key>
@@ -238,22 +291,22 @@
</param>
</block>
<block>
- <key>analog_frequency_modulator_fc</key>
+ <key>virtual_sink</key>
<param>
<key>id</key>
- <value>analog_frequency_modulator_fc_0</value>
+ <value>virtual_sink_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>sensitivity</key>
- <value>-2.0/fft_len</value>
+ <key>stream_id</key>
+ <value>Payload Stream</value>
</param>
<param>
<key>_coordinate</key>
- <value>(692, 175)</value>
+ <value>(968, 374)</value>
</param>
<param>
<key>_rotation</key>
@@ -261,30 +314,53 @@
</param>
</block>
<block>
- <key>blocks_multiply_xx</key>
+ <key>virtual_sink</key>
<param>
<key>id</key>
- <value>blocks_multiply_xx_0</value>
+ <value>virtual_sink_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>stream_id</key>
+ <value>Header Stream</value>
</param>
<param>
- <key>num_inputs</key>
- <value>2</value>
+ <key>_coordinate</key>
+ <value>(969, 305)</value>
</param>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_ofdm_sync_sc_cfb</key>
+ <param>
+ <key>id</key>
+ <value>digital_ofdm_sync_sc_cfb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>fft_len</key>
+ <value>fft_len</value>
+ </param>
+ <param>
+ <key>cp_len</key>
+ <value>fft_len/4</value>
+ </param>
+ <param>
+ <key>use_even_carriers</key>
+ <value>False</value>
</param>
<param>
<key>_coordinate</key>
- <value>(885, 223)</value>
+ <value>(244, 137)</value>
</param>
<param>
<key>_rotation</key>
@@ -292,10 +368,10 @@
</param>
</block>
<block>
- <key>blocks_delay</key>
+ <key>analog_noise_source_x</key>
<param>
<key>id</key>
- <value>blocks_delay_0</value>
+ <value>analog_noise_source_x_0</value>
</param>
<param>
<key>_enabled</key>
@@ -306,20 +382,20 @@
<value>complex</value>
</param>
<param>
- <key>delay</key>
- <value>fft_len+fft_len/4</value>
+ <key>noise_type</key>
+ <value>analog.GR_GAUSSIAN</value>
</param>
<param>
- <key>num_ports</key>
+ <key>amp</key>
<value>1</value>
</param>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>seed</key>
+ <value>0</value>
</param>
<param>
<key>_coordinate</key>
- <value>(368, 253)</value>
+ <value>(0, 220)</value>
</param>
<param>
<key>_rotation</key>
@@ -327,22 +403,30 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>blocks_multiply_xx</key>
<param>
<key>id</key>
- <value>samp_rate</value>
+ <value>blocks_multiply_xx_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>3200000</value>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(0, 91)</value>
+ <value>(798, 137)</value>
</param>
<param>
<key>_rotation</key>
@@ -350,22 +434,30 @@
</param>
</block>
<block>
- <key>import</key>
+ <key>blocks_throttle</key>
<param>
<key>id</key>
- <value>import_1</value>
+ <value>blocks_throttle_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>import</key>
- <value>from gnuradio.digital.utils import tagged_streams</value>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(163, 0)</value>
+ <value>(186, 235)</value>
</param>
<param>
<key>_rotation</key>
@@ -373,22 +465,662 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>uhd_usrp_source</key>
<param>
<key>id</key>
- <value>sync_word</value>
+ <value>uhd_usrp_source_0</value>
</param>
<param>
<key>_enabled</key>
- <value>True</value>
+ <value>False</value>
</param>
<param>
- <key>value</key>
- <value>[0, 0, 0, 0, 0, 0, 0, -1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, -1.0, 0, 1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, -1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 0, 0, 0, 0, 0]</value>
+ <key>type</key>
+ <value>fc32</value>
+ </param>
+ <param>
+ <key>otw</key>
+ <value></value>
+ </param>
+ <param>
+ <key>stream_args</key>
+ <value></value>
+ </param>
+ <param>
+ <key>dev_addr</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sync</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_rate</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>num_mboards</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>clock_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>nchan</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>center_freq0</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain0</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw0</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant11</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant12</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant13</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant14</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant15</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant16</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant17</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant18</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant19</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant20</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant21</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant22</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant23</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant24</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant25</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant26</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant27</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant28</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant29</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant30</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant31</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw31</key>
+ <value>0</value>
</param>
<param>
<key>_coordinate</key>
- <value>(165, 46)</value>
+ <value>(0, 135)</value>
</param>
<param>
<key>_rotation</key>
@@ -396,22 +1128,34 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>blocks_delay</key>
<param>
<key>id</key>
- <value>header_mod</value>
+ <value>blocks_delay_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>digital.constellation_bpsk()</value>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>delay</key>
+ <value>fft_len+fft_len/4</value>
+ </param>
+ <param>
+ <key>num_ports</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(655, 0)</value>
+ <value>(398, 235)</value>
</param>
<param>
<key>_rotation</key>
@@ -422,7 +1166,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>payload_mod</value>
+ <value>length_tag_key</value>
</param>
<param>
<key>_enabled</key>
@@ -430,11 +1174,11 @@
</param>
<param>
<key>value</key>
- <value>digital.constellation_qpsk()</value>
+ <value>"frame_len"</value>
</param>
<param>
<key>_coordinate</key>
- <value>(813, 0)</value>
+ <value>(367, -1)</value>
</param>
<param>
<key>_rotation</key>
@@ -445,7 +1189,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>n_sync_symbols</value>
+ <value>header_formatter</value>
</param>
<param>
<key>_enabled</key>
@@ -453,11 +1197,11 @@
</param>
<param>
<key>value</key>
- <value>1</value>
+ <value>digital.packet_header_ofdm(occupied_carriers, 1, "packet_len", length_tag_key)</value>
</param>
<param>
<key>_coordinate</key>
- <value>(168, 108)</value>
+ <value>(811, -1)</value>
</param>
<param>
<key>_rotation</key>
@@ -465,30 +1209,46 @@
</param>
</block>
<block>
- <key>blocks_throttle</key>
+ <key>digital_header_payload_demux</key>
<param>
<key>id</key>
- <value>blocks_throttle_0</value>
+ <value>digital_header_payload_demux_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>header_len</key>
+ <value>3</value>
</param>
<param>
- <key>samples_per_second</key>
- <value>samp_rate</value>
+ <key>items_per_symbol</key>
+ <value>fft_len</value>
</param>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>guard_interval</key>
+ <value>fft_len/4</value>
+ </param>
+ <param>
+ <key>length_tag_key</key>
+ <value>length_tag_key</value>
+ </param>
+ <param>
+ <key>trigger_tag_key</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>output_symbols</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
</param>
<param>
<key>_coordinate</key>
- <value>(181, 200)</value>
+ <value>(678, 298)</value>
</param>
<param>
<key>_rotation</key>
@@ -496,22 +1256,42 @@
</param>
</block>
<block>
- <key>digital_constellation_decoder_cb</key>
+ <key>digital_ofdm_chanest_vcvc</key>
<param>
<key>id</key>
- <value>digital_constellation_decoder_cb_0_0</value>
+ <value>digital_ofdm_chanest_vcvc_1</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>constellation</key>
- <value>header_mod.base()</value>
+ <key>sync_symbol1</key>
+ <value>sync_word1</value>
+ </param>
+ <param>
+ <key>sync_symbol2</key>
+ <value>sync_word2</value>
+ </param>
+ <param>
+ <key>n_data_symbols</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>eq_noise_red_len</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max_carr_offset</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>force_one_symbol</key>
+ <value>False</value>
</param>
<param>
<key>_coordinate</key>
- <value>(854, 343)</value>
+ <value>(453, 520)</value>
</param>
<param>
<key>_rotation</key>
@@ -533,6 +1313,10 @@
<value>fft_len</value>
</param>
<param>
+ <key>cp_len</key>
+ <value>fft_len/4</value>
+ </param>
+ <param>
<key>equalizer</key>
<value>digital.ofdm_equalizer_simpledfe(fft_len, header_mod.base(), occupied_carriers, pilot_carriers, pilot_symbols).base()</value>
</param>
@@ -546,7 +1330,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(421, 320)</value>
+ <value>(698, 520)</value>
</param>
<param>
<key>_rotation</key>
@@ -569,73 +1353,77 @@
</param>
<param>
<key>_coordinate</key>
- <value>(651, 466)</value>
+ <value>(919, 501)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>90</value>
</param>
</block>
<block>
- <key>fft_vxx</key>
+ <key>digital_ofdm_serializer_vcc</key>
<param>
<key>id</key>
- <value>fft_vxx_0</value>
+ <value>digital_ofdm_serializer_vcc_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>fft_len</key>
+ <value>fft_len</value>
</param>
<param>
- <key>fft_size</key>
- <value>fft_len</value>
+ <key>occupied_carriers</key>
+ <value>occupied_carriers</value>
</param>
<param>
- <key>forward</key>
- <value>True</value>
+ <key>len_tag_key</key>
+ <value>length_tag_key</value>
</param>
<param>
- <key>window</key>
- <value></value>
+ <key>packet_len_tag_key</key>
+ <value>""</value>
</param>
<param>
- <key>shift</key>
- <value>True</value>
+ <key>symbols_skipped</key>
+ <value>0</value>
</param>
<param>
- <key>nthreads</key>
- <value>1</value>
+ <key>carr_offset_key</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>input_is_shifted</key>
+ <value>True</value>
</param>
<param>
<key>_coordinate</key>
- <value>(53, 429)</value>
+ <value>(187, 678)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>variable</key>
+ <key>digital_constellation_decoder_cb</key>
<param>
<key>id</key>
- <value>fft_len</value>
+ <value>digital_constellation_decoder_cb_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>64</value>
+ <key>constellation</key>
+ <value>header_mod.base()</value>
</param>
<param>
<key>_coordinate</key>
- <value>(301, -1)</value>
+ <value>(449, 702)</value>
</param>
<param>
<key>_rotation</key>
@@ -643,22 +1431,22 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>virtual_source</key>
<param>
<key>id</key>
- <value>length_tag_name</value>
+ <value>virtual_source_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>"frame_len"</value>
+ <key>stream_id</key>
+ <value>Payload Stream</value>
</param>
<param>
<key>_coordinate</key>
- <value>(367, -1)</value>
+ <value>(0, 814)</value>
</param>
<param>
<key>_rotation</key>
@@ -666,22 +1454,38 @@
</param>
</block>
<block>
- <key>digital_constellation_decoder_cb</key>
+ <key>blocks_tag_debug</key>
<param>
<key>id</key>
- <value>digital_constellation_decoder_cb_0</value>
+ <value>blocks_tag_debug_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>constellation</key>
- <value>payload_mod.base()</value>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value>Rx Packets</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>display</key>
+ <value>True</value>
</param>
<param>
<key>_coordinate</key>
- <value>(718, 635)</value>
+ <value>(904, 948)</value>
</param>
<param>
<key>_rotation</key>
@@ -689,26 +1493,22 @@
</param>
</block>
<block>
- <key>blocks_null_sink</key>
+ <key>digital_constellation_decoder_cb</key>
<param>
<key>id</key>
- <value>blocks_null_sink_0</value>
+ <value>digital_constellation_decoder_cb_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>byte</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
+ <key>constellation</key>
+ <value>payload_mod.base()</value>
</param>
<param>
<key>_coordinate</key>
- <value>(938, 638)</value>
+ <value>(416, 956)</value>
</param>
<param>
<key>_rotation</key>
@@ -716,34 +1516,26 @@
</param>
</block>
<block>
- <key>digital_ofdm_frame_equalizer_vcvc</key>
+ <key>digital_crc32_bb</key>
<param>
<key>id</key>
- <value>digital_ofdm_frame_equalizer_vcvc_0</value>
+ <value>digital_crc32_bb_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>fft_len</key>
- <value>fft_len</value>
- </param>
- <param>
- <key>equalizer</key>
- <value>digital.ofdm_equalizer_simpledfe(fft_len, header_mod.base(), occupied_carriers, pilot_carriers, pilot_symbols, n_sync_symbols).base()</value>
- </param>
- <param>
- <key>len_tag_key</key>
- <value>length_tag_key</value>
+ <key>check</key>
+ <value>False</value>
</param>
<param>
- <key>propagate_channel_state</key>
- <value>False</value>
+ <key>lengthtagname</key>
+ <value>"packet_len"</value>
</param>
<param>
<key>_coordinate</key>
- <value>(265, 612)</value>
+ <value>(663, 948)</value>
</param>
<param>
<key>_rotation</key>
@@ -754,7 +1546,7 @@
<key>fft_vxx</key>
<param>
<key>id</key>
- <value>fft_vxx_0_0</value>
+ <value>fft_vxx_0</value>
</param>
<param>
<key>_enabled</key>
@@ -786,7 +1578,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(57, 605)</value>
+ <value>(223, 512)</value>
</param>
<param>
<key>_rotation</key>
@@ -794,42 +1586,45 @@
</param>
</block>
<block>
- <key>digital_ofdm_serializer_vcc</key>
+ <key>virtual_source</key>
<param>
<key>id</key>
- <value>digital_ofdm_serializer_vcc_0</value>
+ <value>virtual_source_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>fft_len</key>
- <value>fft_len</value>
+ <key>stream_id</key>
+ <value>Header Stream</value>
</param>
<param>
- <key>occupied_carriers</key>
- <value>occupied_carriers</value>
+ <key>_coordinate</key>
+ <value>(1, 544)</value>
</param>
<param>
- <key>len_tag_key</key>
- <value>length_tag_name</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>analog_frequency_modulator_fc</key>
<param>
- <key>packet_len_tag_key</key>
- <value>""</value>
+ <key>id</key>
+ <value>analog_frequency_modulator_fc_0</value>
</param>
<param>
- <key>symbols_skipped</key>
- <value>0</value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
- <key>input_is_shifted</key>
- <value>True</value>
+ <key>sensitivity</key>
+ <value>-2.0/fft_len</value>
</param>
<param>
<key>_coordinate</key>
- <value>(649, 305)</value>
+ <value>(578, 133)</value>
</param>
<param>
<key>_rotation</key>
@@ -837,42 +1632,42 @@
</param>
</block>
<block>
- <key>digital_ofdm_serializer_vcc</key>
+ <key>fft_vxx</key>
<param>
<key>id</key>
- <value>digital_ofdm_serializer_vcc_1</value>
+ <value>fft_vxx_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>fft_len</key>
- <value>fft_len</value>
+ <key>type</key>
+ <value>complex</value>
</param>
<param>
- <key>occupied_carriers</key>
- <value>occupied_carriers</value>
+ <key>fft_size</key>
+ <value>fft_len</value>
</param>
<param>
- <key>len_tag_key</key>
- <value>length_tag_key</value>
+ <key>forward</key>
+ <value>True</value>
</param>
<param>
- <key>packet_len_tag_key</key>
- <value>""</value>
+ <key>window</key>
+ <value></value>
</param>
<param>
- <key>symbols_skipped</key>
- <value>1</value>
+ <key>shift</key>
+ <value>True</value>
</param>
<param>
- <key>input_is_shifted</key>
- <value>True</value>
+ <key>nthreads</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(496, 597)</value>
+ <value>(218, 782)</value>
</param>
<param>
<key>_rotation</key>
@@ -880,42 +1675,46 @@
</param>
</block>
<block>
- <key>digital_ofdm_chanest_vcvc</key>
+ <key>digital_ofdm_serializer_vcc</key>
<param>
<key>id</key>
- <value>digital_ofdm_chanest_vcvc_0</value>
+ <value>digital_ofdm_serializer_vcc_1</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>sync_symbol1</key>
- <value>sync_word</value>
+ <key>fft_len</key>
+ <value>fft_len</value>
</param>
<param>
- <key>sync_symbol2</key>
- <value>()</value>
+ <key>occupied_carriers</key>
+ <value>occupied_carriers</value>
</param>
<param>
- <key>n_data_symbols</key>
- <value>n_sync_symbols</value>
+ <key>len_tag_key</key>
+ <value>length_tag_key</value>
</param>
<param>
- <key>eq_noise_red_len</key>
+ <key>packet_len_tag_key</key>
+ <value>"packet_len"</value>
+ </param>
+ <param>
+ <key>symbols_skipped</key>
<value>0</value>
</param>
<param>
- <key>max_carr_offset</key>
- <value>-1</value>
+ <key>carr_offset_key</key>
+ <value>""</value>
</param>
<param>
- <key>force_one_symbol</key>
- <value>False</value>
+ <key>input_is_shifted</key>
+ <value>True</value>
</param>
<param>
<key>_coordinate</key>
- <value>(52, 305)</value>
+ <value>(778, 790)</value>
</param>
<param>
<key>_rotation</key>
@@ -923,73 +1722,83 @@
</param>
</block>
<block>
- <key>digital_header_payload_demux</key>
+ <key>digital_ofdm_frame_equalizer_vcvc</key>
<param>
<key>id</key>
- <value>digital_header_payload_demux_0</value>
+ <value>digital_ofdm_frame_equalizer_vcvc_1</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>header_len</key>
- <value>2</value>
- </param>
- <param>
- <key>items_per_symbol</key>
+ <key>fft_len</key>
<value>fft_len</value>
</param>
<param>
- <key>guard_interval</key>
+ <key>cp_len</key>
<value>fft_len/4</value>
</param>
<param>
- <key>length_tag_key</key>
- <value>length_tag_name</value>
+ <key>equalizer</key>
+ <value>digital.ofdm_equalizer_simpledfe(fft_len, header_mod.base(), occupied_carriers, pilot_carriers, pilot_symbols, 2).base()</value>
</param>
<param>
- <key>trigger_tag_key</key>
- <value>""</value>
+ <key>len_tag_key</key>
+ <value>length_tag_key</value>
</param>
<param>
- <key>output_symbols</key>
+ <key>propagate_channel_state</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
- </param>
- <param>
<key>_coordinate</key>
- <value>(340, 461)</value>
+ <value>(474, 782)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<connection>
- <source_block_id>fft_vxx_0</source_block_id>
- <sink_block_id>digital_ofdm_chanest_vcvc_0</sink_block_id>
+ <source_block_id>digital_ofdm_frame_equalizer_vcvc_0_0</source_block_id>
+ <sink_block_id>digital_ofdm_serializer_vcc_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>analog_frequency_modulator_fc_0</source_block_id>
- <sink_block_id>blocks_multiply_xx_0</sink_block_id>
+ <source_block_id>virtual_source_0</source_block_id>
+ <sink_block_id>fft_vxx_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_sync_sc_cfb_0</source_block_id>
- <sink_block_id>analog_frequency_modulator_fc_0</sink_block_id>
+ <source_block_id>digital_packet_headerparser_b_0</source_block_id>
+ <sink_block_id>digital_header_payload_demux_0</sink_block_id>
+ <source_key>header_data</source_key>
+ <sink_key>header_data</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_constellation_decoder_cb_0_0</source_block_id>
+ <sink_block_id>digital_packet_headerparser_b_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>analog_noise_source_x_0</source_block_id>
- <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_block_id>digital_ofdm_serializer_vcc_0</source_block_id>
+ <sink_block_id>digital_constellation_decoder_cb_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_header_payload_demux_0</source_block_id>
+ <sink_block_id>virtual_sink_0_0</sink_block_id>
+ <source_key>1</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_header_payload_demux_0</source_block_id>
+ <sink_block_id>virtual_sink_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
@@ -1000,26 +1809,26 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_throttle_0</source_block_id>
- <sink_block_id>blocks_delay_0</sink_block_id>
+ <source_block_id>uhd_usrp_source_0</source_block_id>
+ <sink_block_id>digital_ofdm_sync_sc_cfb_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_delay_0</source_block_id>
- <sink_block_id>blocks_multiply_xx_0</sink_block_id>
+ <source_block_id>analog_noise_source_x_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
<source_key>0</source_key>
- <sink_key>1</sink_key>
+ <sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_constellation_decoder_cb_0_0</source_block_id>
- <sink_block_id>digital_packet_headerparser_b_0</sink_block_id>
+ <source_block_id>analog_frequency_modulator_fc_0</source_block_id>
+ <sink_block_id>blocks_multiply_xx_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_serializer_vcc_0</source_block_id>
- <sink_block_id>digital_constellation_decoder_cb_0_0</sink_block_id>
+ <source_block_id>digital_ofdm_sync_sc_cfb_0</source_block_id>
+ <sink_block_id>analog_frequency_modulator_fc_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
@@ -1030,50 +1839,50 @@
<sink_key>1</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_chanest_vcvc_0</source_block_id>
- <sink_block_id>digital_ofdm_frame_equalizer_vcvc_0_0</sink_block_id>
+ <source_block_id>blocks_multiply_xx_0</source_block_id>
+ <sink_block_id>digital_header_payload_demux_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_frame_equalizer_vcvc_0_0</source_block_id>
- <sink_block_id>digital_ofdm_serializer_vcc_0</sink_block_id>
+ <source_block_id>blocks_delay_0</source_block_id>
+ <sink_block_id>blocks_multiply_xx_0</sink_block_id>
<source_key>0</source_key>
- <sink_key>0</sink_key>
+ <sink_key>1</sink_key>
</connection>
<connection>
- <source_block_id>digital_packet_headerparser_b_0</source_block_id>
- <sink_block_id>digital_header_payload_demux_0</sink_block_id>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>blocks_delay_0</sink_block_id>
<source_key>0</source_key>
- <sink_key>2</sink_key>
+ <sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_header_payload_demux_0</source_block_id>
- <sink_block_id>fft_vxx_0</sink_block_id>
+ <source_block_id>uhd_usrp_source_0</source_block_id>
+ <sink_block_id>blocks_delay_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_header_payload_demux_0</source_block_id>
- <sink_block_id>fft_vxx_0_0</sink_block_id>
- <source_key>1</source_key>
+ <source_block_id>fft_vxx_0</source_block_id>
+ <sink_block_id>digital_ofdm_chanest_vcvc_1</sink_block_id>
+ <source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_multiply_xx_0</source_block_id>
- <sink_block_id>digital_header_payload_demux_0</sink_block_id>
+ <source_block_id>digital_ofdm_chanest_vcvc_1</source_block_id>
+ <sink_block_id>digital_ofdm_frame_equalizer_vcvc_0_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_constellation_decoder_cb_0</source_block_id>
- <sink_block_id>blocks_null_sink_0</sink_block_id>
+ <source_block_id>digital_crc32_bb_0</source_block_id>
+ <sink_block_id>blocks_tag_debug_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_frame_equalizer_vcvc_0</source_block_id>
- <sink_block_id>digital_ofdm_serializer_vcc_1</sink_block_id>
+ <source_block_id>digital_constellation_decoder_cb_0</source_block_id>
+ <sink_block_id>digital_crc32_bb_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
@@ -1084,8 +1893,20 @@
<sink_key>0</sink_key>
</connection>
<connection>
+ <source_block_id>virtual_source_0_0</source_block_id>
+ <sink_block_id>fft_vxx_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
<source_block_id>fft_vxx_0_0</source_block_id>
- <sink_block_id>digital_ofdm_frame_equalizer_vcvc_0</sink_block_id>
+ <sink_block_id>digital_ofdm_frame_equalizer_vcvc_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_ofdm_frame_equalizer_vcvc_1</source_block_id>
+ <sink_block_id>digital_ofdm_serializer_vcc_1</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
diff --git a/gr-digital/examples/ofdm/tx_ofdm.grc b/gr-digital/examples/ofdm/tx_ofdm.grc
index a2deb05f9f..dcaeed2e72 100644
--- a/gr-digital/examples/ofdm/tx_ofdm.grc
+++ b/gr-digital/examples/ofdm/tx_ofdm.grc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Tue Feb 5 14:47:32 2013</timestamp>
+ <timestamp>Tue May 14 10:52:12 2013</timestamp>
<block>
<key>options</key>
<param>
@@ -29,7 +29,7 @@
</param>
<param>
<key>generate_options</key>
- <value>no_gui</value>
+ <value>wx_gui</value>
</param>
<param>
<key>category</key>
@@ -61,22 +61,22 @@
</param>
</block>
<block>
- <key>import</key>
+ <key>virtual_source</key>
<param>
<key>id</key>
- <value>import_1</value>
+ <value>virtual_source_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>import</key>
- <value>from gnuradio.digital.utils import tagged_streams</value>
+ <key>stream_id</key>
+ <value>Payload Bits</value>
</param>
<param>
<key>_coordinate</key>
- <value>(164, 45)</value>
+ <value>(0, 458)</value>
</param>
<param>
<key>_rotation</key>
@@ -84,22 +84,34 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>blocks_tagged_stream_mux</key>
<param>
<key>id</key>
- <value>length_tag_name</value>
+ <value>blocks_tagged_stream_mux_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>"packet_len"</value>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>ninputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>lengthtagname</key>
+ <value>length_tag_name</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(399, 0)</value>
+ <value>(510, 428)</value>
</param>
<param>
<key>_rotation</key>
@@ -107,22 +119,22 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>virtual_sink</key>
<param>
<key>id</key>
- <value>pilot_symbols_0</value>
+ <value>virtual_sink_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>((100,),)</value>
+ <key>stream_id</key>
+ <value>Payload Bits</value>
</param>
<param>
<key>_coordinate</key>
- <value>(735, 63)</value>
+ <value>(746, 312)</value>
</param>
<param>
<key>_rotation</key>
@@ -130,22 +142,22 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>virtual_source</key>
<param>
<key>id</key>
- <value>occupied_carriers</value>
+ <value>virtual_source_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>(range(-26, -21) + range(-20, -7) + range(-6, 0) + range(1, 7) + range(8, 21) + range(22, 27),)</value>
+ <key>stream_id</key>
+ <value>Header Bits</value>
</param>
<param>
<key>_coordinate</key>
- <value>(377, 63)</value>
+ <value>(0, 384)</value>
</param>
<param>
<key>_rotation</key>
@@ -153,22 +165,22 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>digital_packet_headergenerator_bb</key>
<param>
<key>id</key>
- <value>pilot_symbols</value>
+ <value>digital_packet_headergenerator_bb_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>((100,),)</value>
+ <key>header_formatter</key>
+ <value>header_formatter.formatter()</value>
</param>
<param>
<key>_coordinate</key>
- <value>(632, 63)</value>
+ <value>(514, 231)</value>
</param>
<param>
<key>_rotation</key>
@@ -176,22 +188,34 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>blocks_repack_bits_bb</key>
<param>
<key>id</key>
- <value>pilot_carriers</value>
+ <value>blocks_repack_bits_bb_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>((0,),)</value>
+ <key>k</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>l</key>
+ <value>payload_mod.bits_per_symbol()</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>length_tag_name</value>
+ </param>
+ <param>
+ <key>align_output</key>
+ <value>False</value>
</param>
<param>
<key>_coordinate</key>
- <value>(530, 63)</value>
+ <value>(522, 289)</value>
</param>
<param>
<key>_rotation</key>
@@ -199,22 +223,22 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>virtual_sink</key>
<param>
<key>id</key>
- <value>fft_len</value>
+ <value>header_bits</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>64</value>
+ <key>stream_id</key>
+ <value>Header Bits</value>
</param>
<param>
<key>_coordinate</key>
- <value>(311, 63)</value>
+ <value>(748, 231)</value>
</param>
<param>
<key>_rotation</key>
@@ -222,22 +246,26 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>digital_crc32_bb</key>
<param>
<key>id</key>
- <value>header_mod</value>
+ <value>digital_crc32_bb_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>digital.constellation_bpsk()</value>
+ <key>check</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>lengthtagname</key>
+ <value>length_tag_name</value>
</param>
<param>
<key>_coordinate</key>
- <value>(620, 0)</value>
+ <value>(242, 223)</value>
</param>
<param>
<key>_rotation</key>
@@ -248,7 +276,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>payload_mod</value>
+ <value>fft_len</value>
</param>
<param>
<key>_enabled</key>
@@ -256,11 +284,11 @@
</param>
<param>
<key>value</key>
- <value>digital.constellation_qpsk()</value>
+ <value>64</value>
</param>
<param>
<key>_coordinate</key>
- <value>(783, 0)</value>
+ <value>(181, -1)</value>
</param>
<param>
<key>_rotation</key>
@@ -268,30 +296,22 @@
</param>
</block>
<block>
- <key>blocks_throttle</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>blocks_throttle_0</value>
+ <value>length_tag_name</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>byte</value>
- </param>
- <param>
- <key>samples_per_second</key>
- <value>bit_rate/8</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
+ <key>value</key>
+ <value>"packet_len"</value>
</param>
<param>
<key>_coordinate</key>
- <value>(234, 167)</value>
+ <value>(352, 0)</value>
</param>
<param>
<key>_rotation</key>
@@ -299,22 +319,22 @@
</param>
</block>
<block>
- <key>import</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>import_0</value>
+ <value>packet_len</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>import</key>
- <value>import numpy</value>
+ <key>value</key>
+ <value>96</value>
</param>
<param>
<key>_coordinate</key>
- <value>(164, 0)</value>
+ <value>(476, 0)</value>
</param>
<param>
<key>_rotation</key>
@@ -322,22 +342,22 @@
</param>
</block>
<block>
- <key>import</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>import_0_0</value>
+ <value>header_mod</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>import</key>
- <value>import random</value>
+ <key>value</key>
+ <value>digital.constellation_bpsk()</value>
</param>
<param>
<key>_coordinate</key>
- <value>(-1, 90)</value>
+ <value>(567, 0)</value>
</param>
<param>
<key>_rotation</key>
@@ -348,7 +368,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>sync_word</value>
+ <value>payload_mod</value>
</param>
<param>
<key>_enabled</key>
@@ -356,11 +376,11 @@
</param>
<param>
<key>value</key>
- <value>[0, 0, 0, 0, 0, 0, 0, -1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, -1.0, 0, 1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, -1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 0, 0, 0, 0, 0]</value>
+ <value>digital.constellation_qpsk()</value>
</param>
<param>
<key>_coordinate</key>
- <value>(95, 90)</value>
+ <value>(734, 0)</value>
</param>
<param>
<key>_rotation</key>
@@ -383,7 +403,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(234, 91)</value>
+ <value>(898, -1)</value>
</param>
<param>
<key>_rotation</key>
@@ -394,7 +414,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>header_formatter</value>
+ <value>samp_rate</value>
</param>
<param>
<key>_enabled</key>
@@ -402,11 +422,11 @@
</param>
<param>
<key>value</key>
- <value>digital.packet_header_ofdm(occupied_carriers, 1, length_tag_name)</value>
+ <value>100000</value>
</param>
<param>
<key>_coordinate</key>
- <value>(849, 63)</value>
+ <value>(255, 0)</value>
</param>
<param>
<key>_rotation</key>
@@ -414,38 +434,45 @@
</param>
</block>
<block>
- <key>blocks_vector_source_x</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>blocks_vector_source_x_1</value>
+ <value>sync_word2</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>byte</value>
+ <key>value</key>
+ <value>(0, 0, 0, 0, 0, 1, 1, -1.0, -1, 1.0, 1, 1.0, -1, -1.0, -1, 1.0, 1, -1.0, 1, 1.0, 1, -1.0, -1, -1.0, -1, 1.0, -1, 1.0, -1, 1.0, 1, -1.0, 0, 1.0, 1, -1.0, 1, 1.0, -1, -1.0, 1, -1.0, -1, -1.0, 1, 1.0, 1, -1.0, 1, 1.0, -1, 1.0, -1, -1.0, -1, 1.0, 1, -1.0, 0, 0, 0, 0, 0, 0)</value>
</param>
<param>
- <key>vector</key>
- <value>range(packet_len)</value>
+ <key>_coordinate</key>
+ <value>(496, 128)</value>
</param>
<param>
- <key>tags</key>
- <value>tagged_streams.make_lengthtags((packet_len,), (0,), length_tag_name)</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>variable</key>
<param>
- <key>repeat</key>
+ <key>id</key>
+ <value>sync_word1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>value</key>
+ <value>(0, 0, 0, 0, 0, 0, 0, -1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, -1.0, 0, 1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, -1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 0, 0, 0, 0, 0)</value>
</param>
<param>
<key>_coordinate</key>
- <value>(-1, 152)</value>
+ <value>(352, 128)</value>
</param>
<param>
<key>_rotation</key>
@@ -456,7 +483,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>packet_len</value>
+ <value>occupied_carriers</value>
</param>
<param>
<key>_enabled</key>
@@ -464,11 +491,11 @@
</param>
<param>
<key>value</key>
- <value>96</value>
+ <value>(range(-26, -21) + range(-20, -7) + range(-6, 0) + range(1, 7) + range(8, 21) + range(22, 27),)</value>
</param>
<param>
<key>_coordinate</key>
- <value>(528, 0)</value>
+ <value>(329, 64)</value>
</param>
<param>
<key>_rotation</key>
@@ -476,22 +503,22 @@
</param>
</block>
<block>
- <key>digital_packet_headergenerator_bb</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>digital_packet_headergenerator_bb_0</value>
+ <value>pilot_carriers</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>header_formatter</key>
- <value>header_formatter.formatter()</value>
+ <key>value</key>
+ <value>((-21, -7, 7, 21,),)</value>
</param>
<param>
<key>_coordinate</key>
- <value>(761, 167)</value>
+ <value>(480, 64)</value>
</param>
<param>
<key>_rotation</key>
@@ -502,7 +529,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>bit_rate</value>
+ <value>header_formatter</value>
</param>
<param>
<key>_enabled</key>
@@ -510,11 +537,11 @@
</param>
<param>
<key>value</key>
- <value>3200000</value>
+ <value>digital.packet_header_ofdm(occupied_carriers, 1, length_tag_name)</value>
</param>
<param>
<key>_coordinate</key>
- <value>(311, 0)</value>
+ <value>(708, 64)</value>
</param>
<param>
<key>_rotation</key>
@@ -522,123 +549,156 @@
</param>
</block>
<block>
- <key>blocks_repack_bits_bb</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>blocks_repack_bits_bb_0</value>
+ <value>pilot_symbols</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>k</key>
- <value>8</value>
+ <key>value</key>
+ <value>((1, 1, 1, -1,),)</value>
</param>
<param>
- <key>l</key>
- <value>payload_mod.bits_per_symbol()</value>
+ <key>_coordinate</key>
+ <value>(601, 64)</value>
</param>
<param>
- <key>len_tag_key</key>
- <value>length_tag_name</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>import</key>
<param>
- <key>align_output</key>
- <value>False</value>
+ <key>id</key>
+ <value>import_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>import</key>
+ <value>import numpy</value>
</param>
<param>
<key>_coordinate</key>
- <value>(516, 228)</value>
+ <value>(237, 93)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>digital_chunks_to_symbols_xx</key>
+ <key>import</key>
<param>
<key>id</key>
- <value>digital_chunks_to_symbols_xx_0_0</value>
+ <value>import_1</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>in_type</key>
- <value>byte</value>
+ <key>import</key>
+ <value>from gnuradio.digital.utils import tagged_streams</value>
</param>
<param>
- <key>out_type</key>
- <value>complex</value>
+ <key>_coordinate</key>
+ <value>(99, 93)</value>
</param>
<param>
- <key>symbol_table</key>
- <value>payload_mod.points()</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>import</key>
<param>
- <key>dimension</key>
- <value>1</value>
+ <key>id</key>
+ <value>import_0_0</value>
</param>
<param>
- <key>num_ports</key>
- <value>1</value>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>import</key>
+ <value>import random</value>
</param>
<param>
<key>_coordinate</key>
- <value>(279, 243)</value>
+ <value>(3, 94)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>digital_chunks_to_symbols_xx</key>
+ <key>virtual_source</key>
<param>
<key>id</key>
- <value>digital_chunks_to_symbols_xx_0</value>
+ <value>virtual_source_0_0_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>in_type</key>
- <value>byte</value>
+ <key>stream_id</key>
+ <value>Time Domain</value>
</param>
<param>
- <key>out_type</key>
- <value>complex</value>
+ <key>_coordinate</key>
+ <value>(1, 747)</value>
</param>
<param>
- <key>symbol_table</key>
- <value>header_mod.points()</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>blocks_multiply_const_vxx</key>
<param>
- <key>dimension</key>
- <value>1</value>
+ <key>id</key>
+ <value>blocks_multiply_const_vxx_0</value>
</param>
<param>
- <key>num_ports</key>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>const</key>
+ <value>0.05</value>
+ </param>
+ <param>
+ <key>vlen</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(319, 305)</value>
+ <value>(209, 747)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>blocks_tagged_stream_mux</key>
+ <key>wxgui_scopesink2</key>
<param>
<key>id</key>
- <value>blocks_tagged_stream_mux_0</value>
+ <value>wxgui_scopesink2_0</value>
</param>
<param>
<key>_enabled</key>
@@ -649,59 +709,91 @@
<value>complex</value>
</param>
<param>
- <key>ninputs</key>
- <value>2</value>
+ <key>title</key>
+ <value>Scope Plot</value>
</param>
<param>
- <key>lengthtagname</key>
- <value>length_tag_name</value>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
</param>
<param>
- <key>vlen</key>
+ <key>v_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>v_offset</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>t_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ac_couple</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>xy_mode</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
<value>1</value>
</param>
<param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>trig_mode</key>
+ <value>wxgui.TRIG_MODE_AUTO</value>
+ </param>
+ <param>
+ <key>y_axis_label</key>
+ <value>Counts</value>
+ </param>
+ <param>
<key>_coordinate</key>
- <value>(44, 254)</value>
+ <value>(584, 724)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>digital_ofdm_carrier_allocator_cvc</key>
+ <key>blocks_throttle</key>
<param>
<key>id</key>
- <value>digital_ofdm_carrier_allocator_cvc_0</value>
+ <value>blocks_throttle_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>fft_len</key>
- <value>fft_len</value>
- </param>
- <param>
- <key>occupied_carriers</key>
- <value>occupied_carriers</value>
- </param>
- <param>
- <key>pilot_carriers</key>
- <value>pilot_carriers</value>
+ <key>type</key>
+ <value>complex</value>
</param>
<param>
- <key>pilot_symbols</key>
- <value>pilot_symbols</value>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
</param>
<param>
- <key>len_tag_key</key>
- <value>length_tag_name</value>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(56, 453)</value>
+ <value>(402, 747)</value>
</param>
<param>
<key>_rotation</key>
@@ -709,38 +801,685 @@
</param>
</block>
<block>
- <key>blocks_vector_source_x</key>
+ <key>uhd_usrp_sink</key>
<param>
<key>id</key>
- <value>sync_word_source</value>
+ <value>uhd_usrp_sink_0</value>
</param>
<param>
<key>_enabled</key>
- <value>True</value>
+ <value>False</value>
</param>
<param>
<key>type</key>
- <value>complex</value>
+ <value>fc32</value>
</param>
<param>
- <key>vector</key>
- <value>numpy.array(sync_word) * numpy.sqrt(2)</value>
+ <key>otw</key>
+ <value></value>
</param>
<param>
- <key>tags</key>
- <value>tagged_streams.make_lengthtags((len(sync_word)/fft_len,), (0,), length_tag_name)</value>
+ <key>stream_args</key>
+ <value></value>
</param>
<param>
- <key>repeat</key>
+ <key>dev_addr</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sync</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_rate</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>num_mboards</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>clock_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>nchan</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>center_freq0</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain0</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw0</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant11</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant12</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant13</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant14</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant15</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant16</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant17</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant18</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant19</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant20</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant21</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant22</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant23</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant24</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant25</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant26</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant27</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant28</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant29</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant30</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant31</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(401, 670)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>virtual_sink</key>
+ <param>
+ <key>id</key>
+ <value>virtual_sink_0_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>vlen</key>
- <value>fft_len</value>
+ <key>stream_id</key>
+ <value>Pre-OFDM</value>
</param>
<param>
<key>_coordinate</key>
- <value>(56, 356)</value>
+ <value>(745, 441)</value>
</param>
<param>
<key>_rotation</key>
@@ -748,10 +1487,10 @@
</param>
</block>
<block>
- <key>blocks_tagged_stream_mux</key>
+ <key>blocks_vector_source_x</key>
<param>
<key>id</key>
- <value>blocks_tagged_stream_mux_1</value>
+ <value>blocks_vector_source_x_0</value>
</param>
<param>
<key>_enabled</key>
@@ -759,23 +1498,27 @@
</param>
<param>
<key>type</key>
- <value>complex</value>
+ <value>byte</value>
</param>
<param>
- <key>ninputs</key>
- <value>2</value>
+ <key>vector</key>
+ <value>range(packet_len)</value>
</param>
<param>
- <key>lengthtagname</key>
- <value>length_tag_name</value>
+ <key>tags</key>
+ <value>tagged_streams.make_lengthtags((packet_len,), (0,), length_tag_name)</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
</param>
<param>
<key>vlen</key>
- <value>fft_len</value>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(374, 382)</value>
+ <value>(0, 215)</value>
</param>
<param>
<key>_rotation</key>
@@ -783,81 +1526,81 @@
</param>
</block>
<block>
- <key>fft_vxx</key>
+ <key>digital_chunks_to_symbols_xx</key>
<param>
<key>id</key>
- <value>fft_vxx_0</value>
+ <value>digital_chunks_to_symbols_xx_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
- </param>
- <param>
- <key>fft_size</key>
- <value>fft_len</value>
+ <key>in_type</key>
+ <value>byte</value>
</param>
<param>
- <key>forward</key>
- <value>False</value>
+ <key>out_type</key>
+ <value>complex</value>
</param>
<param>
- <key>window</key>
- <value></value>
+ <key>symbol_table</key>
+ <value>payload_mod.points()</value>
</param>
<param>
- <key>shift</key>
- <value>False</value>
+ <key>dimension</key>
+ <value>1</value>
</param>
<param>
- <key>nthreads</key>
+ <key>num_ports</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(765, 498)</value>
+ <value>(212, 450)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>digital_ofdm_cyclic_prefixer</key>
+ <key>digital_chunks_to_symbols_xx</key>
<param>
<key>id</key>
- <value>digital_ofdm_cyclic_prefixer_0</value>
+ <value>digital_chunks_to_symbols_xx_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>input_size</key>
- <value>fft_len</value>
+ <key>in_type</key>
+ <value>byte</value>
</param>
<param>
- <key>output_size</key>
- <value>fft_len+fft_len/4</value>
+ <key>out_type</key>
+ <value>complex</value>
</param>
<param>
- <key>rolloff</key>
- <value>rolloff</value>
+ <key>symbol_table</key>
+ <value>header_mod.points()</value>
</param>
<param>
- <key>tagname</key>
- <value>length_tag_name</value>
+ <key>dimension</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>num_ports</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(488, 505)</value>
+ <value>(214, 376)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
@@ -868,7 +1611,7 @@
</param>
<param>
<key>_enabled</key>
- <value>False</value>
+ <value>True</value>
</param>
<param>
<key>type</key>
@@ -880,7 +1623,7 @@
</param>
<param>
<key>samp_rate</key>
- <value>1.0</value>
+ <value>samp_rate</value>
</param>
<param>
<key>baseband_freq</key>
@@ -896,7 +1639,7 @@
</param>
<param>
<key>ref_level</key>
- <value>50</value>
+ <value>0</value>
</param>
<param>
<key>ref_scale</key>
@@ -944,61 +1687,108 @@
</param>
<param>
<key>_coordinate</key>
- <value>(291, 460)</value>
+ <value>(402, 796)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>blocks_null_sink</key>
+ <key>virtual_source</key>
<param>
<key>id</key>
- <value>blocks_null_sink_0</value>
+ <value>virtual_source_0_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>stream_id</key>
+ <value>Pre-OFDM</value>
</param>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>_coordinate</key>
+ <value>(0, 578)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_ofdm_carrier_allocator_cvc</key>
+ <param>
+ <key>id</key>
+ <value>digital_ofdm_carrier_allocator_cvc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>fft_len</key>
+ <value>fft_len</value>
+ </param>
+ <param>
+ <key>occupied_carriers</key>
+ <value>occupied_carriers</value>
+ </param>
+ <param>
+ <key>pilot_carriers</key>
+ <value>pilot_carriers</value>
+ </param>
+ <param>
+ <key>pilot_symbols</key>
+ <value>pilot_symbols</value>
+ </param>
+ <param>
+ <key>sync_words</key>
+ <value>(sync_word1, sync_word2)</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>length_tag_name</value>
</param>
<param>
<key>_coordinate</key>
- <value>(438, 633)</value>
+ <value>(191, 540)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>digital_crc32_bb</key>
+ <key>digital_ofdm_cyclic_prefixer</key>
<param>
<key>id</key>
- <value>digital_crc32_bb_0</value>
+ <value>digital_ofdm_cyclic_prefixer_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>check</key>
- <value>False</value>
+ <key>input_size</key>
+ <value>fft_len</value>
</param>
<param>
- <key>lengthtagname</key>
+ <key>cp_len</key>
+ <value>fft_len/4</value>
+ </param>
+ <param>
+ <key>rolloff</key>
+ <value>rolloff</value>
+ </param>
+ <param>
+ <key>tagname</key>
<value>length_tag_name</value>
</param>
<param>
<key>_coordinate</key>
- <value>(472, 159)</value>
+ <value>(631, 563)</value>
</param>
<param>
<key>_rotation</key>
@@ -1006,38 +1796,65 @@
</param>
</block>
<block>
- <key>blocks_tag_debug</key>
+ <key>virtual_sink</key>
<param>
<key>id</key>
- <value>blocks_tag_debug_0</value>
+ <value>virtual_sink_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>byte</value>
+ <key>stream_id</key>
+ <value>Time Domain</value>
</param>
<param>
- <key>name</key>
- <value>tdb</value>
+ <key>_coordinate</key>
+ <value>(855, 578)</value>
</param>
<param>
- <key>num_inputs</key>
- <value>1</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>fft_vxx</key>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>id</key>
+ <value>fft_vxx_0</value>
</param>
<param>
- <key>display</key>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>fft_len</value>
+ </param>
+ <param>
+ <key>forward</key>
<value>False</value>
</param>
<param>
+ <key>window</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>shift</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>nthreads</key>
+ <value>1</value>
+ </param>
+ <param>
<key>_coordinate</key>
- <value>(819, 232)</value>
+ <value>(414, 548)</value>
</param>
<param>
<key>_rotation</key>
@@ -1045,14 +1862,20 @@
</param>
</block>
<connection>
- <source_block_id>blocks_vector_source_x_1</source_block_id>
- <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_block_id>blocks_tagged_stream_mux_0</source_block_id>
+ <sink_block_id>virtual_sink_0_0_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_throttle_0</source_block_id>
- <sink_block_id>digital_crc32_bb_0</sink_block_id>
+ <source_block_id>virtual_source_0_0</source_block_id>
+ <sink_block_id>digital_chunks_to_symbols_xx_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0</source_block_id>
+ <sink_block_id>digital_chunks_to_symbols_xx_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
@@ -1063,34 +1886,34 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_tagged_stream_mux_0</source_block_id>
- <sink_block_id>digital_ofdm_carrier_allocator_cvc_0</sink_block_id>
+ <source_block_id>digital_crc32_bb_0</source_block_id>
+ <sink_block_id>blocks_repack_bits_bb_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_carrier_allocator_cvc_0</source_block_id>
- <sink_block_id>blocks_tagged_stream_mux_1</sink_block_id>
+ <source_block_id>digital_packet_headergenerator_bb_0</source_block_id>
+ <sink_block_id>header_bits</sink_block_id>
<source_key>0</source_key>
- <sink_key>1</sink_key>
+ <sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>sync_word_source</source_block_id>
- <sink_block_id>blocks_tagged_stream_mux_1</sink_block_id>
+ <source_block_id>blocks_repack_bits_bb_0</source_block_id>
+ <sink_block_id>virtual_sink_0_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_packet_headergenerator_bb_0</source_block_id>
- <sink_block_id>digital_chunks_to_symbols_xx_0</sink_block_id>
+ <source_block_id>blocks_vector_source_x_0</source_block_id>
+ <sink_block_id>digital_crc32_bb_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_repack_bits_bb_0</source_block_id>
- <sink_block_id>digital_chunks_to_symbols_xx_0_0</sink_block_id>
+ <source_block_id>digital_chunks_to_symbols_xx_0_0</source_block_id>
+ <sink_block_id>blocks_tagged_stream_mux_0</sink_block_id>
<source_key>0</source_key>
- <sink_key>0</sink_key>
+ <sink_key>1</sink_key>
</connection>
<connection>
<source_block_id>digital_chunks_to_symbols_xx_0</source_block_id>
@@ -1099,44 +1922,56 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_chunks_to_symbols_xx_0_0</source_block_id>
- <sink_block_id>blocks_tagged_stream_mux_0</sink_block_id>
+ <source_block_id>virtual_source_0_0_0_0</source_block_id>
+ <sink_block_id>blocks_multiply_const_vxx_0</sink_block_id>
<source_key>0</source_key>
- <sink_key>1</sink_key>
+ <sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_crc32_bb_0</source_block_id>
- <sink_block_id>blocks_repack_bits_bb_0</sink_block_id>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>wxgui_scopesink2_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_tagged_stream_mux_1</source_block_id>
- <sink_block_id>fft_vxx_0</sink_block_id>
+ <source_block_id>blocks_multiply_const_vxx_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_cyclic_prefixer_0</source_block_id>
+ <source_block_id>blocks_multiply_const_vxx_0</source_block_id>
<sink_block_id>wxgui_fftsink2_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>fft_vxx_0</source_block_id>
- <sink_block_id>digital_ofdm_cyclic_prefixer_0</sink_block_id>
+ <source_block_id>blocks_multiply_const_vxx_0</source_block_id>
+ <sink_block_id>uhd_usrp_sink_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_cyclic_prefixer_0</source_block_id>
- <sink_block_id>blocks_null_sink_0</sink_block_id>
+ <source_block_id>virtual_source_0_0_0</source_block_id>
+ <sink_block_id>digital_ofdm_carrier_allocator_cvc_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_crc32_bb_0</source_block_id>
- <sink_block_id>blocks_tag_debug_0</sink_block_id>
+ <source_block_id>digital_ofdm_carrier_allocator_cvc_0</source_block_id>
+ <sink_block_id>fft_vxx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fft_vxx_0</source_block_id>
+ <sink_block_id>digital_ofdm_cyclic_prefixer_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_ofdm_cyclic_prefixer_0</source_block_id>
+ <sink_block_id>virtual_sink_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
diff --git a/gr-digital/grc/digital_block_tree.xml b/gr-digital/grc/digital_block_tree.xml
index 048348f7c5..d1033e8572 100644
--- a/gr-digital/grc/digital_block_tree.xml
+++ b/gr-digital/grc/digital_block_tree.xml
@@ -87,10 +87,12 @@
<block>digital_ofdm_frame_equalizer_vcvc</block>
<block>digital_ofdm_frame_sink</block>
<block>digital_ofdm_insert_preamble</block>
+ <block>digital_ofdm_rx</block>
<block>digital_ofdm_sampler</block>
<block>digital_ofdm_serializer_vcc</block>
<block>digital_ofdm_sync_pn</block>
<block>digital_ofdm_sync_sc_cfb</block>
+ <block>digital_ofdm_tx</block>
</cat>
<cat>
<name>Symbol Coding</name>
diff --git a/gr-digital/grc/digital_header_payload_demux.xml b/gr-digital/grc/digital_header_payload_demux.xml
index b29d86435b..0925b75809 100644
--- a/gr-digital/grc/digital_header_payload_demux.xml
+++ b/gr-digital/grc/digital_header_payload_demux.xml
@@ -1,5 +1,5 @@
<block>
- <name>Header payload demux</name>
+ <name>Header/Payload Demux</name>
<key>digital_header_payload_demux</key>
<import>from gnuradio import digital</import>
<make>digital.header_payload_demux($header_len, $items_per_symbol, $guard_interval, $length_tag_key, $trigger_tag_key, $output_symbols, $(type.itemsize))</make>
@@ -18,6 +18,7 @@
<key>guard_interval</key>
<value>0</value>
<type>int</type>
+ <hide>#if $guard_interval then 'none' else 'part'#</hide>
</param>
<param>
<name>Length tag key</name>
@@ -30,6 +31,7 @@
<key>trigger_tag_key</key>
<value>""</value>
<type>string</type>
+ <hide>#if $trigger_tag_key then 'none' else 'part'#</hide>
</param>
<param>
<name>Output Format</name>
diff --git a/gr-digital/grc/digital_ofdm_chanest_vcvc.xml b/gr-digital/grc/digital_ofdm_chanest_vcvc.xml
index e8b1571eb6..5cc2145456 100644
--- a/gr-digital/grc/digital_ofdm_chanest_vcvc.xml
+++ b/gr-digital/grc/digital_ofdm_chanest_vcvc.xml
@@ -1,16 +1,16 @@
<?xml version="1.0"?>
<block>
- <name>OFDM channel &amp; coarse frequency offset estimation</name>
+ <name>OFDM Channel Estimation</name>
<key>digital_ofdm_chanest_vcvc</key>
<import>from gnuradio import digital</import>
<make>digital.ofdm_chanest_vcvc($sync_symbol1, $sync_symbol2, $n_data_symbols, $eq_noise_red_len, $max_carr_offset, $force_one_symbol)</make>
<param>
- <name>Synchronisation preamble symbol 1</name>
+ <name>Synch. symbol 1</name>
<key>sync_symbol1</key>
<type>complex_vector</type>
</param>
<param>
- <name>Synchronisation preamble symbol 2</name>
+ <name>Synch. symbol 2</name>
<key>sync_symbol2</key>
<value>()</value>
<type>complex_vector</type>
@@ -26,17 +26,20 @@
<key>eq_noise_red_len</key>
<value>0</value>
<type>int</type>
+ <hide>all</hide>
</param>
<param>
<name>Maximum carrier offset</name>
<key>max_carr_offset</key>
<value>-1</value>
<type>int</type>
+ <hide>#if $max_carr_offset &lt; 0 then 'part' else 'none'#</hide>
</param>
<param>
<name>Force One Synchronisation Symbol</name>
<key>force_one_symbol</key>
<type>enum</type>
+ <hide>#if not $force_one_symbol then 'part' else 'none'#</hide>
<option>
<name>No</name>
<key>False</key>
diff --git a/gr-digital/grc/digital_ofdm_cyclic_prefixer.xml b/gr-digital/grc/digital_ofdm_cyclic_prefixer.xml
index 80bf339cbe..ec5e027047 100644
--- a/gr-digital/grc/digital_ofdm_cyclic_prefixer.xml
+++ b/gr-digital/grc/digital_ofdm_cyclic_prefixer.xml
@@ -29,7 +29,7 @@
<name>OFDM Cyclic Prefixer</name>
<key>digital_ofdm_cyclic_prefixer</key>
<import>from gnuradio import digital</import>
- <make>digital.ofdm_cyclic_prefixer($input_size, $output_size, $rolloff, $tagname)</make>
+ <make>digital.ofdm_cyclic_prefixer($input_size, $input_size+$cp_len, $rolloff, $tagname)</make>
<param>
<name>FFT Length</name>
<key>input_size</key>
@@ -37,9 +37,9 @@
<type>int</type>
</param>
<param>
- <name>Output Size (FFT length + CP length)</name>
- <key>output_size</key>
- <value>fft_len+fft_len/4</value>
+ <name>CP Length</name>
+ <key>cp_len</key>
+ <value>fft_len/4</value>
<type>int</type>
</param>
<param>
@@ -47,6 +47,7 @@
<key>rolloff</key>
<value>0</value>
<type>int</type>
+ <hide>#if $rolloff then 'none' else 'part'#</hide>
</param>
<param>
<name>Length Tag Key</name>
diff --git a/gr-digital/grc/digital_ofdm_frame_equalizer_vcvc.xml b/gr-digital/grc/digital_ofdm_frame_equalizer_vcvc.xml
index 330b29a2fb..28b33ef3c5 100644
--- a/gr-digital/grc/digital_ofdm_frame_equalizer_vcvc.xml
+++ b/gr-digital/grc/digital_ofdm_frame_equalizer_vcvc.xml
@@ -2,7 +2,7 @@
<name>OFDM Frame Equalizer</name>
<key>digital_ofdm_frame_equalizer_vcvc</key>
<import>from gnuradio import digital</import>
- <make>digital.ofdm_frame_equalizer_vcvc($equalizer, $len_tag_key, $propagate_channel_state)</make>
+ <make>digital.ofdm_frame_equalizer_vcvc($equalizer, $cp_len, $len_tag_key, $propagate_channel_state)</make>
<param>
<name>FFT length</name>
<key>fft_len</key>
@@ -10,6 +10,12 @@
<type>int</type>
</param>
<param>
+ <name>CP length</name>
+ <key>cp_len</key>
+ <value>fft_len/4</value>
+ <type>int</type>
+ </param>
+ <param>
<name>Equalizer</name>
<key>equalizer</key>
<type>raw</type>
diff --git a/gr-digital/grc/digital_ofdm_rx.xml b/gr-digital/grc/digital_ofdm_rx.xml
new file mode 100644
index 0000000000..38222265a7
--- /dev/null
+++ b/gr-digital/grc/digital_ofdm_rx.xml
@@ -0,0 +1,174 @@
+<?xml version="1.0"?>
+<block>
+ <name>OFDM Receiver</name>
+ <key>digital_ofdm_rx</key>
+ <import>from gnuradio import digital</import>
+ <make>digital.ofdm_rx(
+ fft_len=$fft_len, cp_len=$cp_len,
+ frame_length_tag_key='frame_'+$packet_len_key,
+ packet_length_tag_key=$packet_len_key,
+ #if $occupied_carriers()
+ occupied_carriers=$occupied_carriers,
+ #end if
+ #if $occupied_carriers()
+ pilot_carriers=$pilot_carriers,
+ #end if
+ #if $occupied_carriers()
+ pilot_symbols=$pilot_symbols,
+ #end if
+ #if $sync_word1()
+ sync_word1=$sync_word1,
+ #end if
+ #if $sync_word2()
+ sync_word2=$sync_word2,
+ #end if
+ bps_header=$header_mod.bps,
+ bps_payload=$payload_mod.bps,
+ debug_log=$log
+ )</make>
+ <param>
+ <name>FFT Length</name>
+ <key>fft_len</key>
+ <value>64</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Cyclic Prefix Length</name>
+ <key>cp_len</key>
+ <value>16</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Packet Length Tag Key</name>
+ <key>packet_len_key</key>
+ <value>"length"</value>
+ <type>string</type>
+ </param>
+ <param>
+ <name>Occupied Carriers</name>
+ <key>occupied_carriers</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $occupied_carriers()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Pilot Carriers</name>
+ <key>pilot_carriers</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $pilot_carriers()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Pilot Symbols</name>
+ <key>pilot_symbols</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $pilot_symbols()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Sync Word 1</name>
+ <key>sync_word1</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $sync_word1()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Sync Word 2</name>
+ <key>sync_word2</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $sync_word2()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Header Modulation</name>
+ <key>header_mod</key>
+ <type>enum</type>
+ <option>
+ <name>BPSK</name>
+ <key>"BPSK"</key>
+ <opt>bps:1</opt>
+ </option>
+ <option>
+ <name>QPSK</name>
+ <key>"QPSK"</key>
+ <opt>bps:2</opt>
+ </option>
+ </param>
+ <param>
+ <name>Payload Modulation</name>
+ <key>payload_mod</key>
+ <type>enum</type>
+ <option>
+ <name>BPSK</name>
+ <key>"BPSK"</key>
+ <opt>bps:1</opt>
+ </option>
+ <option>
+ <name>QPSK</name>
+ <key>"QPSK"</key>
+ <opt>bps:2</opt>
+ </option>
+ <option>
+ <name>8-PSK</name>
+ <key>"8-PSK"</key>
+ <opt>bps:3</opt>
+ </option>
+ </param>
+ <param>
+ <name>Log Debug Info</name>
+ <key>log</key>
+ <value>False</value>
+ <type>enum</type>
+ <hide> #if $log then 'none' else 'part'#</hide>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ </param>
+ <check>$fft_len &gt; 0</check>
+ <check>$cp_len &gt; 0</check>
+ <check>$cp_len &lt; $fft_len</check>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>byte</type>
+ </source>
+</block>
+
diff --git a/gr-digital/grc/digital_ofdm_serializer_vcc.xml b/gr-digital/grc/digital_ofdm_serializer_vcc.xml
index c7596bbb0d..1c09cd94fc 100644
--- a/gr-digital/grc/digital_ofdm_serializer_vcc.xml
+++ b/gr-digital/grc/digital_ofdm_serializer_vcc.xml
@@ -3,7 +3,7 @@
<name>OFDM Serializer</name>
<key>digital_ofdm_serializer_vcc</key>
<import>from gnuradio import digital</import>
- <make>digital.ofdm_serializer_vcc($fft_len, $occupied_carriers, $len_tag_key, $packet_len_tag_key, $symbols_skipped, $input_is_shifted)</make>
+ <make>digital.ofdm_serializer_vcc($fft_len, $occupied_carriers, $len_tag_key, $packet_len_tag_key, $symbols_skipped, $carr_offset_key, $input_is_shifted)</make>
<param>
<name>FFT length</name>
<key>fft_len</key>
@@ -25,18 +25,28 @@
<key>packet_len_tag_key</key>
<value>""</value>
<type>string</type>
+ <hide>#if $packet_len_tag_key then 'none' else 'part'#</hide>
</param>
<param>
<name>Symbols skipped</name>
<key>symbols_skipped</key>
<value>0</value>
<type>int</type>
+ <hide>#if $symbols_skipped then 'none' else 'part'#</hide>
+ </param>
+ <param>
+ <name>Carrier Offset Key</name>
+ <key>carr_offset_key</key>
+ <value>""</value>
+ <type>string</type>
+ <hide>#if $carr_offset_key then 'none' else 'part'#</hide>
</param>
<param>
<name>Input is shifted</name>
<key>input_is_shifted</key>
<value>True</value>
<type>bool</type>
+ <hide>#if $input_is_shifted then 'part' else 'none'#</hide>
</param>
<sink>
<name>in</name>
diff --git a/gr-digital/grc/digital_ofdm_sync_sc_cfb.xml b/gr-digital/grc/digital_ofdm_sync_sc_cfb.xml
index 7865d248d5..4238df761c 100644
--- a/gr-digital/grc/digital_ofdm_sync_sc_cfb.xml
+++ b/gr-digital/grc/digital_ofdm_sync_sc_cfb.xml
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<block>
- <name>Schmidl &amp; Cox OFDM synchronisation</name>
+ <name>Schmidl &amp; Cox OFDM synch.</name>
<key>digital_ofdm_sync_sc_cfb</key>
<import>from gnuradio import digital</import>
- <make>digital.ofdm_sync_sc_cfb($fft_len, $cp_len)</make>
+ <make>digital.ofdm_sync_sc_cfb($fft_len, $cp_len, $use_even_carriers)</make>
<param>
<name>FFT length</name>
<key>fft_len</key>
@@ -14,6 +14,21 @@
<key>cp_len</key>
<type>int</type>
</param>
+ <param>
+ <name>Preamble Carriers</name>
+ <key>use_even_carriers</key>
+ <value>False</value>
+ <type>enum</type>
+ <hide>part</hide>
+ <option>
+ <name>Odd</name>
+ <key>False</key>
+ </option>
+ <option>
+ <name>Even</name>
+ <key>True</key>
+ </option>
+ </param>
<sink>
<name>in</name>
<type>complex</type>
diff --git a/gr-digital/grc/digital_ofdm_tx.xml b/gr-digital/grc/digital_ofdm_tx.xml
new file mode 100644
index 0000000000..034d34a2a5
--- /dev/null
+++ b/gr-digital/grc/digital_ofdm_tx.xml
@@ -0,0 +1,180 @@
+<?xml version="1.0"?>
+<block>
+ <name>OFDM Transmitter</name>
+ <key>digital_ofdm_tx</key>
+ <import>from gnuradio import digital</import>
+ <make>digital.ofdm_tx(
+ fft_len=$fft_len, cp_len=$cp_len,
+ packet_length_tag_key=$packet_len_key,
+ #if $occupied_carriers()
+ occupied_carriers=$occupied_carriers,
+ #end if
+ #if $occupied_carriers()
+ pilot_carriers=$pilot_carriers,
+ #end if
+ #if $occupied_carriers()
+ pilot_symbols=$pilot_symbols,
+ #end if
+ #if $sync_word1()
+ sync_word1=$sync_word1,
+ #end if
+ #if $sync_word2()
+ sync_word2=$sync_word2,
+ #end if
+ bps_header=$header_mod.bps,
+ bps_payload=$payload_mod.bps,
+ rolloff=$rolloff,
+ debug_log=$log
+ )</make>
+ <param>
+ <name>FFT Length</name>
+ <key>fft_len</key>
+ <value>64</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Cyclic Prefix Length</name>
+ <key>cp_len</key>
+ <value>16</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Length Tag Name</name>
+ <key>packet_len_key</key>
+ <value>length</value>
+ <type>string</type>
+ </param>
+ <param>
+ <name>Occupied Carriers</name>
+ <key>occupied_carriers</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $occupied_carriers()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Pilot Carriers</name>
+ <key>pilot_carriers</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $pilot_carriers()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Pilot Symbols</name>
+ <key>pilot_symbols</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $pilot_symbols()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Sync Word 1</name>
+ <key>sync_word1</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $sync_word1()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Sync Word 2</name>
+ <key>sync_word2</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $sync_word2()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Header Modulation</name>
+ <key>header_mod</key>
+ <type>enum</type>
+ <option>
+ <name>BPSK</name>
+ <key>"BPSK"</key>
+ <opt>bps:1</opt>
+ </option>
+ <option>
+ <name>QPSK</name>
+ <key>"QPSK"</key>
+ <opt>bps:2</opt>
+ </option>
+ </param>
+ <param>
+ <name>Payload Modulation</name>
+ <key>payload_mod</key>
+ <type>enum</type>
+ <option>
+ <name>BPSK</name>
+ <key>"BPSK"</key>
+ <opt>bps:1</opt>
+ </option>
+ <option>
+ <name>QPSK</name>
+ <key>"QPSK"</key>
+ <opt>bps:2</opt>
+ </option>
+ <option>
+ <name>8-PSK</name>
+ <key>"8-PSK"</key>
+ <opt>bps:3</opt>
+ </option>
+ </param>
+ <param>
+ <name>Rolloff length (samples)</name>
+ <key>rolloff</key>
+ <value>0</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Log Debug Info</name>
+ <key>log</key>
+ <value>False</value>
+ <type>enum</type>
+ <hide> #if $log then 'none' else 'part'#</hide>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ </param>
+ <check>$fft_len &gt; 0</check>
+ <check>$cp_len &gt; 0</check>
+ <check>$cp_len &lt; $fft_len</check>
+ <check>$rolloff &gt;= 0</check>
+ <sink>
+ <name>in</name>
+ <type>byte</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+</block>
diff --git a/gr-digital/include/digital/CMakeLists.txt b/gr-digital/include/gnuradio/digital/CMakeLists.txt
index 275da16d87..275da16d87 100644
--- a/gr-digital/include/digital/CMakeLists.txt
+++ b/gr-digital/include/gnuradio/digital/CMakeLists.txt
diff --git a/gr-digital/include/digital/additive_scrambler_bb.h b/gr-digital/include/gnuradio/digital/additive_scrambler_bb.h
index bc4d4b36e9..73fd395d67 100644
--- a/gr-digital/include/digital/additive_scrambler_bb.h
+++ b/gr-digital/include/gnuradio/digital/additive_scrambler_bb.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_ADDITIVE_SCRAMBLER_BB_H
#define INCLUDED_DIGITAL_ADDITIVE_SCRAMBLER_BB_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
@@ -45,7 +45,7 @@ namespace gr {
* processed, the shift register is reset to the seed value.
* This allows processing fixed length vectors of samples.
*/
- class DIGITAL_API additive_scrambler_bb : virtual public gr_sync_block
+ class DIGITAL_API additive_scrambler_bb : virtual public sync_block
{
public:
// gr::digital::additive_scrambler_bb::sptr
diff --git a/gr-digital/include/digital/api.h b/gr-digital/include/gnuradio/digital/api.h
index 815f7b6627..71ca19ad58 100644
--- a/gr-digital/include/digital/api.h
+++ b/gr-digital/include/gnuradio/digital/api.h
@@ -22,7 +22,7 @@
#ifndef INCLUDED_DIGITAL_API_H
#define INCLUDED_DIGITAL_API_H
-#include <attributes.h>
+#include <gnuradio/attributes.h>
#ifdef gnuradio_digital_EXPORTS
# define DIGITAL_API __GR_ATTR_EXPORT
diff --git a/gr-digital/include/digital/binary_slicer_fb.h b/gr-digital/include/gnuradio/digital/binary_slicer_fb.h
index 47e0246094..ef83a9dbd4 100644
--- a/gr-digital/include/digital/binary_slicer_fb.h
+++ b/gr-digital/include/gnuradio/digital/binary_slicer_fb.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_BINARY_SLICER_FB_H
#define INCLUDED_DIGITAL_BINARY_SLICER_FB_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
@@ -37,7 +37,7 @@ namespace gr {
* x < 0 --> 0
* x >= 0 --> 1
*/
- class DIGITAL_API binary_slicer_fb : virtual public gr_sync_block
+ class DIGITAL_API binary_slicer_fb : virtual public sync_block
{
public:
// gr::digital::binary_slicer_fb::sptr
diff --git a/gr-digital/include/digital/chunks_to_symbols_XX.h.t b/gr-digital/include/gnuradio/digital/chunks_to_symbols_XX.h.t
index b0ae07bc9e..cbc3b474ce 100644
--- a/gr-digital/include/digital/chunks_to_symbols_XX.h.t
+++ b/gr-digital/include/gnuradio/digital/chunks_to_symbols_XX.h.t
@@ -25,8 +25,8 @@
#ifndef @GUARD_NAME@
#define @GUARD_NAME@
-#include <digital/api.h>
-#include <gr_sync_interpolator.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_interpolator.h>
namespace gr {
namespace digital {
@@ -51,7 +51,7 @@ namespace gr {
* \sa gr::digital::chunks_to_symbols_bf, gr::digital::chunks_to_symbols_bc.
* \sa gr::digital::chunks_to_symbols_sf, gr::digital::chunks_to_symbols_sc.
*/
- class DIGITAL_API @NAME@ : virtual public gr_sync_interpolator
+ class DIGITAL_API @NAME@ : virtual public sync_interpolator
{
public:
// gr::digital::@BASE_NAME@::sptr
diff --git a/gr-digital/include/digital/clock_recovery_mm_cc.h b/gr-digital/include/gnuradio/digital/clock_recovery_mm_cc.h
index a7917e528a..9bca249afd 100644
--- a/gr-digital/include/digital/clock_recovery_mm_cc.h
+++ b/gr-digital/include/gnuradio/digital/clock_recovery_mm_cc.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_CLOCK_RECOVERY_MM_CC_H
#define INCLUDED_DIGITAL_CLOCK_RECOVERY_MM_CC_H
-#include <digital/api.h>
-#include <gr_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/block.h>
namespace gr {
namespace digital {
@@ -44,7 +44,7 @@ namespace gr {
* and Muller algorithm," Electronics Letters, Vol. 31, no. 13, 22
* June 1995, pp. 1032 - 1033.
*/
- class DIGITAL_API clock_recovery_mm_cc : virtual public gr_block
+ class DIGITAL_API clock_recovery_mm_cc : virtual public block
{
public:
// gr::digital::clock_recovery_mm_cc::sptr
diff --git a/gr-digital/include/digital/clock_recovery_mm_ff.h b/gr-digital/include/gnuradio/digital/clock_recovery_mm_ff.h
index 491f3ec21a..9637546ed4 100644
--- a/gr-digital/include/digital/clock_recovery_mm_ff.h
+++ b/gr-digital/include/gnuradio/digital/clock_recovery_mm_ff.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_CLOCK_RECOVERY_MM_FF_H
#define INCLUDED_DIGITAL_CLOCK_RECOVERY_MM_FF_H
-#include <digital/api.h>
-#include <gr_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/block.h>
namespace gr {
namespace digital {
@@ -41,7 +41,7 @@ namespace gr {
* Estimation and Signal Processing" by Heinrich Meyr, Marc
* Moeneclaey, & Stefan Fechtel. ISBN 0-471-50275-8.
*/
- class DIGITAL_API clock_recovery_mm_ff : virtual public gr_block
+ class DIGITAL_API clock_recovery_mm_ff : virtual public block
{
public:
// gr::digital::clock_recovery_mm_ff::sptr
diff --git a/gr-digital/include/digital/cma_equalizer_cc.h b/gr-digital/include/gnuradio/digital/cma_equalizer_cc.h
index 0ccd1c21ba..108c2cfc7d 100644
--- a/gr-digital/include/digital/cma_equalizer_cc.h
+++ b/gr-digital/include/gnuradio/digital/cma_equalizer_cc.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_CMA_EQUALIZER_CC_H
#define INCLUDED_DIGITAL_CMA_EQUALIZER_CC_H
-#include <digital/api.h>
-#include <gr_sync_decimator.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_decimator.h>
namespace gr {
namespace digital {
@@ -41,7 +41,7 @@ namespace gr {
* Transactions on Communications, Vol. 28, No. 11, pp. 1867 -
* 1875, 1980.
*/
- class DIGITAL_API cma_equalizer_cc: virtual public gr_sync_decimator
+ class DIGITAL_API cma_equalizer_cc: virtual public sync_decimator
{
protected:
virtual gr_complex error(const gr_complex &out) = 0;
diff --git a/gr-digital/include/digital/constellation.h b/gr-digital/include/gnuradio/digital/constellation.h
index a5e490b428..f8b99bb9c5 100644
--- a/gr-digital/include/digital/constellation.h
+++ b/gr-digital/include/gnuradio/digital/constellation.h
@@ -23,10 +23,10 @@
#ifndef INCLUDED_DIGITAL_CONSTELLATION_H
#define INCLUDED_DIGITAL_CONSTELLATION_H
-#include <digital/api.h>
-#include <digital/metric_type.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/digital/metric_type.h>
#include <boost/enable_shared_from_this.hpp>
-#include <gr_complex.h>
+#include <gnuradio/gr_complex.h>
#include <vector>
namespace gr {
diff --git a/gr-digital/include/digital/constellation_decoder_cb.h b/gr-digital/include/gnuradio/digital/constellation_decoder_cb.h
index 39cc6ac822..51feb95b7c 100644
--- a/gr-digital/include/digital/constellation_decoder_cb.h
+++ b/gr-digital/include/gnuradio/digital/constellation_decoder_cb.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_DIGITAL_CONSTELLATION_DECODER_CB_H
#define INCLUDED_DIGITAL_CONSTELLATION_DECODER_CB_H
-#include <digital/api.h>
-#include <digital/constellation.h>
-#include <gr_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/digital/constellation.h>
+#include <gnuradio/block.h>
namespace gr {
namespace digital {
@@ -40,7 +40,7 @@ namespace gr {
* object.
*/
class DIGITAL_API constellation_decoder_cb
- : virtual public gr_block
+ : virtual public block
{
public:
// gr::digital::constellation_decoder_cb::sptr
diff --git a/gr-digital/include/digital/constellation_receiver_cb.h b/gr-digital/include/gnuradio/digital/constellation_receiver_cb.h
index 31138974ef..e8f269a139 100644
--- a/gr-digital/include/digital/constellation_receiver_cb.h
+++ b/gr-digital/include/gnuradio/digital/constellation_receiver_cb.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_DIGITAL_CONSTELLATION_RECEIVER_CB_H
#define INCLUDED_DIGITAL_CONSTELLATION_RECEIVER_CB_H
-#include <digital/api.h>
-#include <digital/constellation.h>
-#include <gr_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/digital/constellation.h>
+#include <gnuradio/block.h>
namespace gr {
namespace digital {
@@ -43,7 +43,7 @@ namespace gr {
* the NCO are updated according to this error.
*/
class DIGITAL_API constellation_receiver_cb
- : virtual public gr_block
+ : virtual public block
{
public:
// gr::digital::constellation_receiver_cb::sptr
diff --git a/gr-digital/include/digital/correlate_access_code_bb.h b/gr-digital/include/gnuradio/digital/correlate_access_code_bb.h
index 12c0f39961..2f7b700ac9 100644
--- a/gr-digital/include/digital/correlate_access_code_bb.h
+++ b/gr-digital/include/gnuradio/digital/correlate_access_code_bb.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_BB_H
#define INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_BB_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
#include <string>
namespace gr {
@@ -45,7 +45,7 @@ namespace gr {
* the corresponding data bit is the first data bit following the
* access code. Otherwise the flag bit is 0.
*/
- class DIGITAL_API correlate_access_code_bb : virtual public gr_sync_block
+ class DIGITAL_API correlate_access_code_bb : virtual public sync_block
{
public:
// gr::digital::correlate_access_code_bb::sptr
diff --git a/gr-digital/include/digital/correlate_access_code_tag_bb.h b/gr-digital/include/gnuradio/digital/correlate_access_code_tag_bb.h
index 5e04aa0b6e..475c038dc7 100644
--- a/gr-digital/include/digital/correlate_access_code_tag_bb.h
+++ b/gr-digital/include/gnuradio/digital/correlate_access_code_tag_bb.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_TAG_BB_H
#define INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_TAG_BB_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
#include <string>
namespace gr {
@@ -42,7 +42,7 @@ namespace gr {
* key name [tag_name], specified in the constructor. Used for
* searching an input data stream for preambles, etc.
*/
- class DIGITAL_API correlate_access_code_tag_bb : virtual public gr_sync_block
+ class DIGITAL_API correlate_access_code_tag_bb : virtual public sync_block
{
public:
// gr::digital::correlate_access_code_tag_bb::sptr
diff --git a/gr-digital/include/digital/costas_loop_cc.h b/gr-digital/include/gnuradio/digital/costas_loop_cc.h
index 8ac0444cb8..38a41a5db5 100644
--- a/gr-digital/include/digital/costas_loop_cc.h
+++ b/gr-digital/include/gnuradio/digital/costas_loop_cc.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_DIGITAL_COSTAS_LOOP_CC_H
#define INCLUDED_DIGITAL_COSTAS_LOOP_CC_H
-#include <digital/api.h>
-#include <blocks/control_loop.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/blocks/control_loop.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
@@ -56,7 +56,7 @@ namespace gr {
* stream 2 is the normalized frequency of the loop
*/
class DIGITAL_API costas_loop_cc
- : virtual public gr_sync_block,
+ : virtual public sync_block,
virtual public blocks::control_loop
{
public:
diff --git a/gr-digital/include/digital/cpmmod_bc.h b/gr-digital/include/gnuradio/digital/cpmmod_bc.h
index 85fb0fae81..885c653de4 100644
--- a/gr-digital/include/digital/cpmmod_bc.h
+++ b/gr-digital/include/gnuradio/digital/cpmmod_bc.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_DIGITAL_CPMMOD_BC_H
#define INCLUDED_DIGITAL_CPMMOD_BC_H
-#include <digital/api.h>
-#include <gr_hier_block2.h>
-#include <analog/cpm.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/hier_block2.h>
+#include <gnuradio/analog/cpm.h>
namespace gr {
namespace digital {
@@ -46,7 +46,7 @@ namespace gr {
* The modulator will silently accept any other inputs, though.
* The output is the phase-modulated signal.
*/
- class DIGITAL_API cpmmod_bc : virtual public gr_hier_block2
+ class DIGITAL_API cpmmod_bc : virtual public hier_block2
{
public:
// gr::digital::cpmmod_bc::sptr
diff --git a/gr-digital/include/digital/crc32.h b/gr-digital/include/gnuradio/digital/crc32.h
index 180719bf73..1f7581fd69 100644
--- a/gr-digital/include/digital/crc32.h
+++ b/gr-digital/include/gnuradio/digital/crc32.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_DIGITAL_CRC32_H
#define INCLUDED_DIGITAL_CRC32_H
-#include <digital/api.h>
+#include <gnuradio/digital/api.h>
#include <string>
-#include <gr_types.h>
+#include <gnuradio/types.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/include/digital/crc32_bb.h b/gr-digital/include/gnuradio/digital/crc32_bb.h
index 52f056c716..79e8a974b8 100644
--- a/gr-digital/include/digital/crc32_bb.h
+++ b/gr-digital/include/gnuradio/digital/crc32_bb.h
@@ -24,8 +24,8 @@
#ifndef INCLUDED_DIGITAL_CRC32_BB_H
#define INCLUDED_DIGITAL_CRC32_BB_H
-#include <digital/api.h>
-#include <gr_tagged_stream_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/tagged_stream_block.h>
namespace gr {
namespace digital {
@@ -42,7 +42,7 @@ namespace gr {
* Output: The same bytes as incoming, but trailing a CRC32 of the packet.
* The tag is re-set to the new length.
*/
- class DIGITAL_API crc32_bb : virtual public gr_tagged_stream_block
+ class DIGITAL_API crc32_bb : virtual public tagged_stream_block
{
public:
typedef boost::shared_ptr<crc32_bb> sptr;
diff --git a/gr-digital/include/digital/descrambler_bb.h b/gr-digital/include/gnuradio/digital/descrambler_bb.h
index 9fa1d68425..10efde275e 100644
--- a/gr-digital/include/digital/descrambler_bb.h
+++ b/gr-digital/include/gnuradio/digital/descrambler_bb.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_DESCRAMBLER_BB_H
#define INCLUDED_GR_DESCRAMBLER_BB_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
@@ -38,7 +38,7 @@ namespace gr {
* the LSB only of the input data stream, i.e., on an "unpacked
* binary" stream, and produces the same format on its output.
*/
- class DIGITAL_API descrambler_bb : virtual public gr_sync_block
+ class DIGITAL_API descrambler_bb : virtual public sync_block
{
public:
// gr::digital::descrambler_bb::sptr
diff --git a/gr-digital/include/digital/diff_decoder_bb.h b/gr-digital/include/gnuradio/digital/diff_decoder_bb.h
index 0b28b2a553..463e65756f 100644
--- a/gr-digital/include/digital/diff_decoder_bb.h
+++ b/gr-digital/include/gnuradio/digital/diff_decoder_bb.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_DIFF_DECODER_BB_H
#define INCLUDED_GR_DIFF_DECODER_BB_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
@@ -37,7 +37,7 @@ namespace gr {
* Uses current and previous symbols and the alphabet modulus to
* perform differential decoding.
*/
- class DIGITAL_API diff_decoder_bb : virtual public gr_sync_block
+ class DIGITAL_API diff_decoder_bb : virtual public sync_block
{
public:
// gr::digital::diff_decoder_bb::sptr
diff --git a/gr-digital/include/digital/diff_encoder_bb.h b/gr-digital/include/gnuradio/digital/diff_encoder_bb.h
index ef9d0970a0..e59c6e82bd 100644
--- a/gr-digital/include/digital/diff_encoder_bb.h
+++ b/gr-digital/include/gnuradio/digital/diff_encoder_bb.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_DIFF_ENCODER_BB_H
#define INCLUDED_GR_DIFF_ENCODER_BB_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
@@ -37,7 +37,7 @@ namespace gr {
* Uses current and previous symbols and the alphabet modulus to
* perform differential encoding.
*/
- class DIGITAL_API diff_encoder_bb : virtual public gr_sync_block
+ class DIGITAL_API diff_encoder_bb : virtual public sync_block
{
public:
// gr::digital::diff_encoder_bb::sptr
diff --git a/gr-digital/include/digital/diff_phasor_cc.h b/gr-digital/include/gnuradio/digital/diff_phasor_cc.h
index e2bf2bce59..efcc3b367a 100644
--- a/gr-digital/include/digital/diff_phasor_cc.h
+++ b/gr-digital/include/gnuradio/digital/diff_phasor_cc.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_DIFF_PHASOR_CC_H
#define INCLUDED_GR_DIFF_PHASOR_CC_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
@@ -39,7 +39,7 @@ namespace gr {
*
* out[i] = in[i] * conj(in[i-1]);
*/
- class DIGITAL_API diff_phasor_cc : virtual public gr_sync_block
+ class DIGITAL_API diff_phasor_cc : virtual public sync_block
{
public:
// gr::digital::diff_phasor_cc::sptr
diff --git a/gr-digital/include/digital/fll_band_edge_cc.h b/gr-digital/include/gnuradio/digital/fll_band_edge_cc.h
index 0bf3471112..309c23a496 100644
--- a/gr-digital/include/digital/fll_band_edge_cc.h
+++ b/gr-digital/include/gnuradio/digital/fll_band_edge_cc.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_DIGITAL_FLL_BAND_EDGE_CC_H
#define INCLUDED_DIGITAL_FLL_BAND_EDGE_CC_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
-#include <blocks/control_loop.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
+#include <gnuradio/blocks/control_loop.h>
namespace gr {
namespace digital {
@@ -81,7 +81,7 @@ namespace gr {
* large.
*/
class DIGITAL_API fll_band_edge_cc
- : virtual public gr_sync_block,
+ : virtual public sync_block,
virtual public blocks::control_loop
{
public:
diff --git a/gr-digital/include/digital/framer_sink_1.h b/gr-digital/include/gnuradio/digital/framer_sink_1.h
index b562778704..7d13e4d6c0 100644
--- a/gr-digital/include/digital/framer_sink_1.h
+++ b/gr-digital/include/gnuradio/digital/framer_sink_1.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_GR_FRAMER_SINK_1_H
#define INCLUDED_GR_FRAMER_SINK_1_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
-#include <gr_msg_queue.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
+#include <gnuradio/msg_queue.h>
namespace gr {
namespace digital {
@@ -48,7 +48,7 @@ namespace gr {
* the corresponding bit is the the first bit of the packet. That
* is, this bit is the first one after the access code.
*/
- class DIGITAL_API framer_sink_1 : virtual public gr_sync_block
+ class DIGITAL_API framer_sink_1 : virtual public sync_block
{
public:
// gr::digital::framer_sink_1::sptr
@@ -59,7 +59,7 @@ namespace gr {
*
* \param target_queue The message queue where frames go.
*/
- static sptr make(gr_msg_queue_sptr target_queue);
+ static sptr make(msg_queue::sptr target_queue);
};
} /* namespace digital */
diff --git a/gr-digital/include/digital/glfsr.h b/gr-digital/include/gnuradio/digital/glfsr.h
index 4c7701d7ee..445904969e 100644
--- a/gr-digital/include/digital/glfsr.h
+++ b/gr-digital/include/gnuradio/digital/glfsr.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_DIGITAL_GLFSR_H
#define INCLUDED_DIGITAL_GLFSR_H
-#include <digital/api.h>
+#include <gnuradio/digital/api.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/include/digital/glfsr_source_b.h b/gr-digital/include/gnuradio/digital/glfsr_source_b.h
index 7fefb747aa..3491d73315 100644
--- a/gr-digital/include/digital/glfsr_source_b.h
+++ b/gr-digital/include/gnuradio/digital/glfsr_source_b.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_GLFSR_SOURCE_B_H
#define INCLUDED_GR_GLFSR_SOURCE_B_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
@@ -33,7 +33,7 @@ namespace gr {
* \brief Galois LFSR pseudo-random source
* \ingroup waveform_generators_blk
*/
- class DIGITAL_API glfsr_source_b : virtual public gr_sync_block
+ class DIGITAL_API glfsr_source_b : virtual public sync_block
{
public:
// gr::digital::glfsr_source_b::sptr
diff --git a/gr-digital/include/digital/glfsr_source_f.h b/gr-digital/include/gnuradio/digital/glfsr_source_f.h
index e591498d8c..24c0713792 100644
--- a/gr-digital/include/digital/glfsr_source_f.h
+++ b/gr-digital/include/gnuradio/digital/glfsr_source_f.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_GLFSR_SOURCE_F_H
#define INCLUDED_GR_GLFSR_SOURCE_F_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
@@ -33,7 +33,7 @@ namespace gr {
* \brief Galois LFSR pseudo-random source generating float outputs -1.0 - 1.0.
* \ingroup waveform_generators_blk
*/
- class DIGITAL_API glfsr_source_f : virtual public gr_sync_block
+ class DIGITAL_API glfsr_source_f : virtual public sync_block
{
public:
// gr::digital::glfsr_source_f::sptr
diff --git a/gr-digital/include/digital/header_payload_demux.h b/gr-digital/include/gnuradio/digital/header_payload_demux.h
index 1427062d77..b3b7c596ef 100644
--- a/gr-digital/include/digital/header_payload_demux.h
+++ b/gr-digital/include/gnuradio/digital/header_payload_demux.h
@@ -22,8 +22,8 @@
#ifndef INCLUDED_DIGITAL_HEADER_PAYLOAD_DEMUX_H
#define INCLUDED_DIGITAL_HEADER_PAYLOAD_DEMUX_H
-#include <digital/api.h>
-#include <gr_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/block.h>
namespace gr {
namespace digital {
@@ -59,7 +59,7 @@ namespace gr {
* A special case are tags on items that make up the guard interval. These are copied
* to the first item of the following symbol.
*/
- class DIGITAL_API header_payload_demux : virtual public gr_block
+ class DIGITAL_API header_payload_demux : virtual public block
{
public:
typedef boost::shared_ptr<header_payload_demux> sptr;
diff --git a/gr-digital/include/digital/kurtotic_equalizer_cc.h b/gr-digital/include/gnuradio/digital/kurtotic_equalizer_cc.h
index be8c5f5cc2..a23cfa1377 100644
--- a/gr-digital/include/digital/kurtotic_equalizer_cc.h
+++ b/gr-digital/include/gnuradio/digital/kurtotic_equalizer_cc.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_KURTOTIC_EQUALIZER_CC_H
#define INCLUDED_DIGITAL_KURTOTIC_EQUALIZER_CC_H
-#include <digital/api.h>
-#include <gr_sync_decimator.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_decimator.h>
namespace gr {
namespace digital {
@@ -41,7 +41,7 @@ namespace gr {
* Robotics and Vision, Vol. 3, Dec. 2004, pp. 2052 - 2057."
*/
class DIGITAL_API kurtotic_equalizer_cc :
- virtual public gr_sync_decimator
+ virtual public sync_decimator
{
protected:
virtual gr_complex error(const gr_complex &out) = 0;
diff --git a/gr-digital/include/digital/lfsr.h b/gr-digital/include/gnuradio/digital/lfsr.h
index 0dd419b791..ce82f6f5e1 100644
--- a/gr-digital/include/digital/lfsr.h
+++ b/gr-digital/include/gnuradio/digital/lfsr.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_DIGITAL_LFSR_H
#define INCLUDED_DIGITAL_LFSR_H
-#include <digital/api.h>
+#include <gnuradio/digital/api.h>
#include <stdexcept>
#include <stdint.h>
diff --git a/gr-digital/include/digital/lms_dd_equalizer_cc.h b/gr-digital/include/gnuradio/digital/lms_dd_equalizer_cc.h
index 7286c9ad3c..01e5b6e71a 100644
--- a/gr-digital/include/digital/lms_dd_equalizer_cc.h
+++ b/gr-digital/include/gnuradio/digital/lms_dd_equalizer_cc.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_DIGITAL_LMS_DD_EQUALIZER_CC_H
#define INCLUDED_DIGITAL_LMS_DD_EQUALIZER_CC_H
-#include <digital/api.h>
-#include <gr_sync_decimator.h>
-#include <digital/constellation.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_decimator.h>
+#include <gnuradio/digital/constellation.h>
namespace gr {
namespace digital {
@@ -65,7 +65,7 @@ namespace gr {
* Prentice Hall, 1996.
*/
class DIGITAL_API lms_dd_equalizer_cc :
- virtual public gr_sync_decimator
+ virtual public sync_decimator
{
protected:
virtual gr_complex error(const gr_complex &out) = 0;
diff --git a/gr-digital/include/digital/map_bb.h b/gr-digital/include/gnuradio/digital/map_bb.h
index 0a55a61213..e1bbb1d9b5 100644
--- a/gr-digital/include/digital/map_bb.h
+++ b/gr-digital/include/gnuradio/digital/map_bb.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_MAP_BB_H
#define INCLUDED_GR_MAP_BB_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
@@ -40,7 +40,7 @@ namespace gr {
*
* -> output[i] = map[input[i]]
*/
- class DIGITAL_API map_bb : virtual public gr_sync_block
+ class DIGITAL_API map_bb : virtual public sync_block
{
public:
// gr::digital::map_bb::sptr
diff --git a/gr-digital/include/digital/metric_type.h b/gr-digital/include/gnuradio/digital/metric_type.h
index c277f01d27..c277f01d27 100644
--- a/gr-digital/include/digital/metric_type.h
+++ b/gr-digital/include/gnuradio/digital/metric_type.h
diff --git a/gr-digital/include/digital/mpsk_receiver_cc.h b/gr-digital/include/gnuradio/digital/mpsk_receiver_cc.h
index 68874d178e..94e765d4ac 100644
--- a/gr-digital/include/digital/mpsk_receiver_cc.h
+++ b/gr-digital/include/gnuradio/digital/mpsk_receiver_cc.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_MPSK_RECEIVER_CC_H
#define INCLUDED_DIGITAL_MPSK_RECEIVER_CC_H
-#include <digital/api.h>
-#include <gr_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/block.h>
namespace gr {
namespace digital {
@@ -65,7 +65,7 @@ namespace gr {
* self-noise.
*
*/
- class DIGITAL_API mpsk_receiver_cc : virtual public gr_block
+ class DIGITAL_API mpsk_receiver_cc : virtual public block
{
public:
// gr::digital::mpsk_receiver_cc::sptr
diff --git a/gr-digital/include/digital/mpsk_snr_est.h b/gr-digital/include/gnuradio/digital/mpsk_snr_est.h
index f9edcbd05a..46df06164d 100644
--- a/gr-digital/include/digital/mpsk_snr_est.h
+++ b/gr-digital/include/gnuradio/digital/mpsk_snr_est.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_MPSK_SNR_EST_H
#define INCLUDED_DIGITAL_MPSK_SNR_EST_H
-#include <digital/api.h>
-#include <gr_complex.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/gr_complex.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/include/digital/mpsk_snr_est_cc.h b/gr-digital/include/gnuradio/digital/mpsk_snr_est_cc.h
index 14e8ca3b20..41a649cf58 100644
--- a/gr-digital/include/digital/mpsk_snr_est_cc.h
+++ b/gr-digital/include/gnuradio/digital/mpsk_snr_est_cc.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_DIGITAL_MPSK_SNR_EST_CC_H
#define INCLUDED_DIGITAL_MPSK_SNR_EST_CC_H
-#include <digital/api.h>
-#include <digital/mpsk_snr_est.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/digital/mpsk_snr_est.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
@@ -49,7 +49,7 @@ namespace gr {
* amount of error should be assumed and/or estimated for real
* channel conditions.
*/
- class DIGITAL_API mpsk_snr_est_cc : virtual public gr_sync_block
+ class DIGITAL_API mpsk_snr_est_cc : virtual public sync_block
{
public:
// gr::digital::mpsk_snr_est_cc::sptr
diff --git a/gr-digital/include/digital/ofdm_carrier_allocator_cvc.h b/gr-digital/include/gnuradio/digital/ofdm_carrier_allocator_cvc.h
index 2eaeb75611..26b11fceb4 100644
--- a/gr-digital/include/digital/ofdm_carrier_allocator_cvc.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_carrier_allocator_cvc.h
@@ -24,8 +24,8 @@
#ifndef INCLUDED_DIGITAL_OFDM_CARRIER_ALLOCATOR_CVC_H
#define INCLUDED_DIGITAL_OFDM_CARRIER_ALLOCATOR_CVC_H
-#include <digital/api.h>
-#include <gr_tagged_stream_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/tagged_stream_block.h>
namespace gr {
namespace digital {
@@ -57,7 +57,7 @@ namespace gr {
* \p fft_len-1 both identify the carrier below the DC carrier.
*
*/
- class DIGITAL_API ofdm_carrier_allocator_cvc : virtual public gr_tagged_stream_block
+ class DIGITAL_API ofdm_carrier_allocator_cvc : virtual public tagged_stream_block
{
public:
typedef boost::shared_ptr<ofdm_carrier_allocator_cvc> sptr;
diff --git a/gr-digital/include/digital/ofdm_chanest_vcvc.h b/gr-digital/include/gnuradio/digital/ofdm_chanest_vcvc.h
index 0607743d57..4ccc3896c9 100644
--- a/gr-digital/include/digital/ofdm_chanest_vcvc.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_chanest_vcvc.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_OFDM_CHANEST_VCVC_H
#define INCLUDED_DIGITAL_OFDM_CHANEST_VCVC_H
-#include <digital/api.h>
-#include <gr_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/block.h>
namespace gr {
namespace digital {
@@ -32,9 +32,8 @@ namespace gr {
/*!
* \brief Estimate channel and coarse frequency offset for OFDM from preambles
* \ingroup ofdm_blk
- * \ingroup synchronizers_blk
+ * \ingroup syncronizers_blk
*
- * \details
* Input: OFDM symbols (in frequency domain). The first one (or two) symbols are expected
* to be synchronisation symbols, which are used to estimate the coarse freq offset
* and the initial equalizer taps (these symbols are removed from the stream).
@@ -45,7 +44,9 @@ namespace gr {
* 'ofdm_sync_carr_offset' (integer), the coarse frequency offset as number of carriers,
* and 'ofdm_sync_eq_taps' (complex vector).
* Any tags attached to the synchronisation symbols are attached to the first data
- * symbol. All other tags are propagated normally.
+ * symbol. All other tags are propagated as expected.
+ *
+ * Note: The vector on ofdm_sync_eq_taps is already frequency-corrected, whereas the rest is not.
*
* This block assumes the frequency offset is even (i.e. an integer multiple of 2).
*
@@ -53,12 +54,12 @@ namespace gr {
* Communications, IEEE Transactions on, 1997.
* [2] K.D. Kammeyer, "Nachrichtenuebertragung," Chapter. 16.3.2.
*/
- class DIGITAL_API ofdm_chanest_vcvc : virtual public gr_block
+ class DIGITAL_API ofdm_chanest_vcvc : virtual public block
{
public:
typedef boost::shared_ptr<ofdm_chanest_vcvc> sptr;
- /*
+ /*!
* \param sync_symbol1 First synchronisation symbol in the frequency domain. Its length must be
* the FFT length. For Schmidl & Cox synchronisation, every second sub-carrier
* has to be zero.
diff --git a/gr-digital/include/digital/ofdm_cyclic_prefixer.h b/gr-digital/include/gnuradio/digital/ofdm_cyclic_prefixer.h
index f8e45edd90..70d37a6bc1 100644
--- a/gr-digital/include/digital/ofdm_cyclic_prefixer.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_cyclic_prefixer.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_OFDM_CYCLIC_PREFIXER_H
#define INCLUDED_DIGITAL_OFDM_CYCLIC_PREFIXER_H
-#include <digital/api.h>
-#include <gr_tagged_stream_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/tagged_stream_block.h>
namespace gr {
namespace digital {
@@ -46,7 +46,7 @@ namespace gr {
*
* The pulse shape is a raised cosine in the time domain.
*/
- class DIGITAL_API ofdm_cyclic_prefixer : virtual public gr_tagged_stream_block
+ class DIGITAL_API ofdm_cyclic_prefixer : virtual public tagged_stream_block
{
public:
typedef boost::shared_ptr<ofdm_cyclic_prefixer> sptr;
diff --git a/gr-digital/include/digital/ofdm_equalizer_base.h b/gr-digital/include/gnuradio/digital/ofdm_equalizer_base.h
index 4e3a88d589..c1e47ea1d5 100644
--- a/gr-digital/include/digital/ofdm_equalizer_base.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_equalizer_base.h
@@ -22,9 +22,9 @@
#ifndef INCLUDED_DIGITAL_OFDM_EQUALIZER_BASE_H
#define INCLUDED_DIGITAL_OFDM_EQUALIZER_BASE_H
-#include <digital/api.h>
-#include <gr_tags.h>
-#include <gr_complex.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/tags.h>
+#include <gnuradio/gr_complex.h>
#include <boost/enable_shared_from_this.hpp>
namespace gr {
@@ -55,7 +55,7 @@ namespace gr {
gr_complex *frame,
int n_sym,
const std::vector<gr_complex> &initial_taps = std::vector<gr_complex>(),
- const std::vector<gr_tag_t> &tags = std::vector<gr_tag_t>()) = 0;
+ const std::vector<tag_t> &tags = std::vector<tag_t>()) = 0;
//! Return the current channel state
virtual void get_channel_state(std::vector<gr_complex> &taps) = 0;
int fft_len() { return d_fft_len; };
diff --git a/gr-digital/include/digital/ofdm_equalizer_simpledfe.h b/gr-digital/include/gnuradio/digital/ofdm_equalizer_simpledfe.h
index 7bf6950965..d526f9f157 100644
--- a/gr-digital/include/digital/ofdm_equalizer_simpledfe.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_equalizer_simpledfe.h
@@ -22,9 +22,9 @@
#ifndef INCLUDED_DIGITAL_OFDM_EQUALIZER_SIMPLEDFE_H
#define INCLUDED_DIGITAL_OFDM_EQUALIZER_SIMPLEDFE_H
-#include <digital/api.h>
-#include <digital/constellation.h>
-#include <digital/ofdm_equalizer_base.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/digital/constellation.h>
+#include <gnuradio/digital/ofdm_equalizer_base.h>
namespace gr {
namespace digital {
@@ -80,7 +80,7 @@ namespace gr {
void equalize(gr_complex *frame,
int n_sym,
const std::vector<gr_complex> &initial_taps = std::vector<gr_complex>(),
- const std::vector<gr_tag_t> &tags = std::vector<gr_tag_t>());
+ const std::vector<tag_t> &tags = std::vector<tag_t>());
/*
* \param fft_len FFT length
diff --git a/gr-digital/include/digital/ofdm_equalizer_static.h b/gr-digital/include/gnuradio/digital/ofdm_equalizer_static.h
index 6507479f4b..892025c2b0 100644
--- a/gr-digital/include/digital/ofdm_equalizer_static.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_equalizer_static.h
@@ -22,9 +22,9 @@
#ifndef INCLUDED_DIGITAL_OFDM_EQUALIZER_STATIC_H
#define INCLUDED_DIGITAL_OFDM_EQUALIZER_STATIC_H
-#include <digital/api.h>
-#include <digital/constellation.h>
-#include <digital/ofdm_equalizer_base.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/digital/constellation.h>
+#include <gnuradio/digital/ofdm_equalizer_base.h>
namespace gr {
namespace digital {
@@ -67,7 +67,7 @@ namespace gr {
void equalize(gr_complex *frame,
int n_sym,
const std::vector<gr_complex> &initial_taps = std::vector<gr_complex>(),
- const std::vector<gr_tag_t> &tags = std::vector<gr_tag_t>());
+ const std::vector<tag_t> &tags = std::vector<tag_t>());
/*
* \param fft_len FFT length
diff --git a/gr-digital/include/digital/ofdm_frame_acquisition.h b/gr-digital/include/gnuradio/digital/ofdm_frame_acquisition.h
index b8f8ff7662..a398e18454 100644
--- a/gr-digital/include/digital/ofdm_frame_acquisition.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_frame_acquisition.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_OFDM_FRAME_ACQUISITION_H
#define INCLUDED_DIGITAL_OFDM_FRAME_ACQUISITION_H
-#include <digital/api.h>
-#include <gr_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/block.h>
#include <vector>
namespace gr {
@@ -49,7 +49,7 @@ namespace gr {
* equalization on all subcarriers. This corrects for the phase
* and amplitude distortion caused by the channel.
*/
- class DIGITAL_API ofdm_frame_acquisition : virtual public gr_block
+ class DIGITAL_API ofdm_frame_acquisition : virtual public block
{
public:
// gr::digital::ofdm_frame_acquisition::sptr
diff --git a/gr-digital/include/digital/ofdm_frame_equalizer_vcvc.h b/gr-digital/include/gnuradio/digital/ofdm_frame_equalizer_vcvc.h
index 3be014d455..2715316a93 100644
--- a/gr-digital/include/digital/ofdm_frame_equalizer_vcvc.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_frame_equalizer_vcvc.h
@@ -22,9 +22,9 @@
#ifndef INCLUDED_OFDM_FRAME_EQUALIZER_VCVC_H
#define INCLUDED_OFDM_FRAME_EQUALIZER_VCVC_H
-#include <digital/api.h>
-#include <digital/ofdm_equalizer_base.h>
-#include <gr_tagged_stream_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/digital/ofdm_equalizer_base.h>
+#include <gnuradio/tagged_stream_block.h>
namespace gr {
namespace digital {
@@ -35,16 +35,29 @@ namespace gr {
*
* \details
* Performs equalization in one or two dimensions on a tagged OFDM frame.
+ *
+ * This does two things:
+ * First, it removes the coarse carrier offset. If a tag is found on the first
+ * item with the key 'ofdm_sync_carr_offset', this is interpreted as the coarse
+ * frequency offset in number of carriers.
+ * Next, it performs equalization in one or two dimensions on a tagged OFDM frame.
+ * The actual equalization is done by a ofdm_frame_equalizer object, outside of
+ * the block.
+ *
+ * Note that the tag with the coarse carrier offset is not removed. Blocks
+ * downstream from this block must not attempt to also correct this offset.
+ *
* Input: a tagged series of OFDM symbols.
- * Output: The same as the input, but equalized.
+ * Output: The same as the input, but equalized and frequency-corrected.
*/
- class DIGITAL_API ofdm_frame_equalizer_vcvc : virtual public gr_tagged_stream_block
+ class DIGITAL_API ofdm_frame_equalizer_vcvc : virtual public tagged_stream_block
{
public:
typedef boost::shared_ptr<ofdm_frame_equalizer_vcvc> sptr;
/*!
* \param equalizer The equalizer object that will do the actual work
+ * \param cp_len Length of the cyclic prefix in samples (required to correct the frequency offset)
* \param len_tag_key Length tag key
* \param propagate_channel_state If true, the channel state after the last symbol
* will be added to the first symbol as a tag
@@ -53,6 +66,7 @@ namespace gr {
*/
static sptr make(
ofdm_equalizer_base::sptr equalizer,
+ int cp_len,
const std::string &len_tag_key = "frame_len",
bool propagate_channel_state=false,
int fixed_frame_len=0
diff --git a/gr-digital/include/digital/ofdm_frame_sink.h b/gr-digital/include/gnuradio/digital/ofdm_frame_sink.h
index ff31bad919..439e1ca135 100644
--- a/gr-digital/include/digital/ofdm_frame_sink.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_frame_sink.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_DIGITAL_OFDM_FRAME_SINK_H
#define INCLUDED_DIGITAL_OFDM_FRAME_SINK_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
-#include <gr_msg_queue.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
+#include <gnuradio/msg_queue.h>
namespace gr {
namespace digital {
@@ -42,7 +42,7 @@ namespace gr {
* reference to an object to do the demapping and slicing for a
* given modulation type.
*/
- class DIGITAL_API ofdm_frame_sink : virtual public gr_sync_block
+ class DIGITAL_API ofdm_frame_sink : virtual public sync_block
{
public:
// gr::digital::ofdm_frame_sink::sptr
@@ -60,7 +60,7 @@ namespace gr {
*/
static sptr make(const std::vector<gr_complex> &sym_position,
const std::vector<char> &sym_value_out,
- gr_msg_queue_sptr target_queue,
+ msg_queue::sptr target_queue,
int occupied_tones,
float phase_gain=0.25, float freq_gain=0.25*0.25/4);
};
diff --git a/gr-digital/include/digital/ofdm_insert_preamble.h b/gr-digital/include/gnuradio/digital/ofdm_insert_preamble.h
index a9ad61e1d0..a98e7cf814 100644
--- a/gr-digital/include/digital/ofdm_insert_preamble.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_insert_preamble.h
@@ -22,8 +22,8 @@
#ifndef INCLUDED_DIGITAL_OFDM_INSERT_PREAMBLE_H
#define INCLUDED_DIGITAL_OFDM_INSERT_PREAMBLE_H
-#include <digital/api.h>
-#include <gr_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/block.h>
#include <vector>
namespace gr {
@@ -55,7 +55,7 @@ namespace gr {
* symbol is the first symbol, otherwise 0.
* </pre>
*/
- class DIGITAL_API ofdm_insert_preamble : virtual public gr_block
+ class DIGITAL_API ofdm_insert_preamble : virtual public block
{
public:
// gr::digital::ofdm_insert_preamble::sptr
diff --git a/gr-digital/include/digital/ofdm_mapper_bcv.h b/gr-digital/include/gnuradio/digital/ofdm_mapper_bcv.h
index 49ae9adc92..cdd4a60bc2 100644
--- a/gr-digital/include/digital/ofdm_mapper_bcv.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_mapper_bcv.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_DIGITAL_OFDM_MAPPER_BCV_H
#define INCLUDED_DIGITAL_OFDM_MAPPER_BCV_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
-#include <gr_msg_queue.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
+#include <gnuradio/msg_queue.h>
namespace gr {
namespace digital {
@@ -39,7 +39,7 @@ namespace gr {
* \details
* Abstract class must be subclassed with specific mapping.
*/
- class DIGITAL_API ofdm_mapper_bcv : virtual public gr_sync_block
+ class DIGITAL_API ofdm_mapper_bcv : virtual public sync_block
{
public:
// gr::digital::ofdm_mapper_bcv::sptr
@@ -58,7 +58,7 @@ namespace gr {
unsigned occupied_carriers,
unsigned int fft_length);
- virtual gr_msg_queue_sptr msgq() const = 0;
+ virtual msg_queue::sptr msgq() const = 0;
};
} /* namespace digital */
diff --git a/gr-digital/include/digital/ofdm_sampler.h b/gr-digital/include/gnuradio/digital/ofdm_sampler.h
index 5df16be3e4..59bc36a7c2 100644
--- a/gr-digital/include/digital/ofdm_sampler.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_sampler.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_OFDM_SAMPLER_H
#define INCLUDED_DIGITAL_OFDM_SAMPLER_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
@@ -33,7 +33,7 @@ namespace gr {
* \brief does the rest of the OFDM stuff
* \ingroup ofdm_blk
*/
- class DIGITAL_API ofdm_sampler : virtual public gr_block
+ class DIGITAL_API ofdm_sampler : virtual public block
{
public:
// gr::digital::ofdm_sampler::sptr
diff --git a/gr-digital/include/digital/ofdm_serializer_vcc.h b/gr-digital/include/gnuradio/digital/ofdm_serializer_vcc.h
index f02b0f85bb..a445118678 100644
--- a/gr-digital/include/digital/ofdm_serializer_vcc.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_serializer_vcc.h
@@ -22,9 +22,9 @@
#ifndef INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_H
#define INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_H
-#include <digital/api.h>
-#include <gr_tagged_stream_block.h>
-#include <digital/ofdm_carrier_allocator_cvc.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/tagged_stream_block.h>
+#include <gnuradio/digital/ofdm_carrier_allocator_cvc.h>
namespace gr {
namespace digital {
@@ -46,10 +46,13 @@ namespace gr {
* output items, and the frame length specifies the exact number of
* consumed input items.
*
+ * It is possible to correct a carrier offset in this function by passing
+ * another tag with said offset.
+ *
* Input: Complex vectors of length \p fft_len
* Output: Complex scalars, in the same order as specified in occupied_carriers.
*/
- class DIGITAL_API ofdm_serializer_vcc : virtual public gr_tagged_stream_block
+ class DIGITAL_API ofdm_serializer_vcc : virtual public tagged_stream_block
{
public:
typedef boost::shared_ptr<ofdm_serializer_vcc> sptr;
@@ -60,6 +63,7 @@ namespace gr {
* \param len_tag_key The key of the tag identifying the length of the input frame in OFDM symbols.
* \param packet_len_tag_key The key of the tag identifying the number of complex symbols in this packet.
* \param symbols_skipped If the first symbol is not allocated as in \p occupied_carriers[0], set this
+ * \param carr_offset_key When this block should correct a carrier offset, specify the tag key of the offset here (not necessary if following an ofdm_frame_equalizer_vcvc)
* \param input_is_shifted If the input has the DC carrier on index 0 (i.e. it is not FFT shifted), set this to false
*/
static sptr make(
@@ -68,6 +72,7 @@ namespace gr {
const std::string &len_tag_key="frame_len",
const std::string &packet_len_tag_key="",
int symbols_skipped=0,
+ const std::string &carr_offset_key="",
bool input_is_shifted=true
);
@@ -75,12 +80,14 @@ namespace gr {
* \param allocator The carrier allocator block of which this shall be the inverse
* \param packet_len_tag_key The key of the tag identifying the number of complex symbols in this packet.
* \param symbols_skipped If the first symbol is not allocated as in \p occupied_carriers[0], set this
+ * \param carr_offset_key When this block should correct a carrier offset, specify the tag key of the offset here (not necessary if following an ofdm_frame_equalizer_vcvc)
* \param input_is_shifted If the input has the DC carrier on index 0 (i.e. it is not FFT shifted), set this to false
*/
static sptr make(
const gr::digital::ofdm_carrier_allocator_cvc::sptr &allocator,
const std::string &packet_len_tag_key="",
int symbols_skipped=0,
+ const std::string &carr_offset_key="",
bool input_is_shifted=true
);
};
diff --git a/gr-digital/include/digital/ofdm_sync_sc_cfb.h b/gr-digital/include/gnuradio/digital/ofdm_sync_sc_cfb.h
index 84f3e704a3..d0dcfde7d9 100644
--- a/gr-digital/include/digital/ofdm_sync_sc_cfb.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_sync_sc_cfb.h
@@ -24,8 +24,8 @@
#ifndef INCLUDED_DIGITAL_OFDM_SYNC_SC_CFB_H
#define INCLUDED_DIGITAL_OFDM_SYNC_SC_CFB_H
-#include <digital/api.h>
-#include <gr_hier_block2.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/hier_block2.h>
namespace gr {
namespace digital {
@@ -61,15 +61,18 @@ namespace gr {
* [1] Schmidl, T.M. and Cox, D.C., "Robust frequency and timing synchronization for OFDM",
* Communications, IEEE Transactions on, 1997.
*/
- class DIGITAL_API ofdm_sync_sc_cfb : virtual public gr_hier_block2
+ class DIGITAL_API ofdm_sync_sc_cfb : virtual public hier_block2
{
public:
typedef boost::shared_ptr<ofdm_sync_sc_cfb> sptr;
/*! \param fft_len FFT length
* \param cp_len Length of the guard interval (cyclic prefix) in samples
+ * \param use_even_carriers If true, the carriers in the sync preamble are occupied such
+ * that the even carriers are used (0, 2, 4, ...). If you use all
+ * carriers, that would include the DC carrier, so be careful.
*/
- static sptr make(int fft_len, int cp_len);
+ static sptr make(int fft_len, int cp_len, bool use_even_carriers=false);
};
} // namespace digital
diff --git a/gr-digital/include/digital/packet_header_default.h b/gr-digital/include/gnuradio/digital/packet_header_default.h
index e4c994593f..c7f1833d11 100644
--- a/gr-digital/include/digital/packet_header_default.h
+++ b/gr-digital/include/gnuradio/digital/packet_header_default.h
@@ -22,8 +22,8 @@
#ifndef INCLUDED_DIGITAL_PACKET_HEADER_DEFAULT_H
#define INCLUDED_DIGITAL_PACKET_HEADER_DEFAULT_H
-#include <gr_tags.h>
-#include <digital/api.h>
+#include <gnuradio/tags.h>
+#include <gnuradio/digital/api.h>
#include <boost/enable_shared_from_this.hpp>
namespace gr {
@@ -79,7 +79,7 @@ namespace gr {
virtual bool header_formatter(
long packet_len,
unsigned char *out,
- const std::vector<gr_tag_t> &tags=std::vector<gr_tag_t>()
+ const std::vector<tag_t> &tags=std::vector<tag_t>()
);
/*!
@@ -89,7 +89,7 @@ namespace gr {
*/
virtual bool header_parser(
const unsigned char *header,
- std::vector<gr_tag_t> &tags);
+ std::vector<tag_t> &tags);
static sptr make(
long header_len,
diff --git a/gr-digital/include/digital/packet_header_ofdm.h b/gr-digital/include/gnuradio/digital/packet_header_ofdm.h
index 3a477580ce..4603450915 100644
--- a/gr-digital/include/digital/packet_header_ofdm.h
+++ b/gr-digital/include/gnuradio/digital/packet_header_ofdm.h
@@ -23,8 +23,8 @@
#define INCLUDED_DIGITAL_PACKET_HEADER_OFDM_H
#include <vector>
-#include <digital/api.h>
-#include <digital/packet_header_default.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/digital/packet_header_default.h>
namespace gr {
namespace digital {
@@ -60,7 +60,7 @@ namespace gr {
*/
bool header_parser(
const unsigned char *header,
- std::vector<gr_tag_t> &tags);
+ std::vector<tag_t> &tags);
/*!
* \param occupied_carriers See carrier allocator
diff --git a/gr-digital/include/digital/packet_headergenerator_bb.h b/gr-digital/include/gnuradio/digital/packet_headergenerator_bb.h
index 426f49dee5..1ad67b7031 100644
--- a/gr-digital/include/digital/packet_headergenerator_bb.h
+++ b/gr-digital/include/gnuradio/digital/packet_headergenerator_bb.h
@@ -22,9 +22,9 @@
#ifndef INCLUDED_PACKET_HEADERGENERATOR_BB_H
#define INCLUDED_PACKET_HEADERGENERATOR_BB_H
-#include <digital/api.h>
-#include <gr_tagged_stream_block.h>
-#include <digital/packet_header_default.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/tagged_stream_block.h>
+#include <gnuradio/digital/packet_header_default.h>
namespace gr {
namespace digital {
@@ -41,7 +41,7 @@ namespace gr {
* or a subclass thereof). If only a number of bits is specified, a
* default header is generated (see packet_header_default).
*/
- class DIGITAL_API packet_headergenerator_bb : virtual public gr_tagged_stream_block
+ class DIGITAL_API packet_headergenerator_bb : virtual public tagged_stream_block
{
public:
typedef boost::shared_ptr<packet_headergenerator_bb> sptr;
diff --git a/gr-digital/include/digital/packet_headerparser_b.h b/gr-digital/include/gnuradio/digital/packet_headerparser_b.h
index cdf76f1209..a0ca48f192 100644
--- a/gr-digital/include/digital/packet_headerparser_b.h
+++ b/gr-digital/include/gnuradio/digital/packet_headerparser_b.h
@@ -22,9 +22,9 @@
#ifndef INCLUDED_DIGITAL_PACKET_HEADERPARSER_B_H
#define INCLUDED_DIGITAL_PACKET_HEADERPARSER_B_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
-#include <digital/packet_header_default.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
+#include <gnuradio/digital/packet_header_default.h>
namespace gr {
namespace digital {
@@ -46,7 +46,7 @@ namespace gr {
* If only a header length is given, this block uses the default header
* format.
*/
- class DIGITAL_API packet_headerparser_b : virtual public gr_sync_block
+ class DIGITAL_API packet_headerparser_b : virtual public sync_block
{
public:
typedef boost::shared_ptr<packet_headerparser_b> sptr;
diff --git a/gr-digital/include/digital/packet_sink.h b/gr-digital/include/gnuradio/digital/packet_sink.h
index 42f826535f..a0a56bc4ff 100644
--- a/gr-digital/include/digital/packet_sink.h
+++ b/gr-digital/include/gnuradio/digital/packet_sink.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_GR_PACKET_SINK_H
#define INCLUDED_GR_PACKET_SINK_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
-#include <gr_msg_queue.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
+#include <gnuradio/msg_queue.h>
namespace gr {
namespace digital {
@@ -53,7 +53,7 @@ namespace gr {
* generally be replaced with a correlate access code and frame
* sink blocks.
*/
- class DIGITAL_API packet_sink : virtual public gr_sync_block
+ class DIGITAL_API packet_sink : virtual public sync_block
{
public:
// gr::digital::packet_sink::sptr
@@ -67,7 +67,7 @@ namespace gr {
* \param threshold Number of bits that can be incorrect in the \p sync_vector.
*/
static sptr make(const std::vector<unsigned char>& sync_vector,
- gr_msg_queue_sptr target_queue,
+ msg_queue::sptr target_queue,
int threshold=-1);
//! return true if we detect carrier
diff --git a/gr-digital/include/digital/pfb_clock_sync_ccf.h b/gr-digital/include/gnuradio/digital/pfb_clock_sync_ccf.h
index 2cdb55ca4a..d4d61bbf4f 100644
--- a/gr-digital/include/digital/pfb_clock_sync_ccf.h
+++ b/gr-digital/include/gnuradio/digital/pfb_clock_sync_ccf.h
@@ -24,9 +24,9 @@
#ifndef INCLUDED_DIGITAL_PFB_CLOCK_SYNC_CCF_H
#define INCLUDED_DIGITAL_PFB_CLOCK_SYNC_CCF_H
-#include <digital/api.h>
-#include <filter/fir_filter.h>
-#include <gr_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/filter/fir_filter.h>
+#include <gnuradio/block.h>
namespace gr {
namespace digital {
@@ -146,7 +146,7 @@ namespace gr {
* was added to better work with equalizers, which do a better job
* of modeling the channel if they have 2 samps/sym.
*/
- class DIGITAL_API pfb_clock_sync_ccf : virtual public gr_block
+ class DIGITAL_API pfb_clock_sync_ccf : virtual public block
{
public:
// gr::digital::pfb_clock_sync_ccf::sptr
diff --git a/gr-digital/include/digital/pfb_clock_sync_fff.h b/gr-digital/include/gnuradio/digital/pfb_clock_sync_fff.h
index f0fc6df314..38d8f69f2f 100644
--- a/gr-digital/include/digital/pfb_clock_sync_fff.h
+++ b/gr-digital/include/gnuradio/digital/pfb_clock_sync_fff.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_DIGITAL_PFB_CLOCK_SYNC_FFF_H
#define INCLUDED_DIGITAL_PFB_CLOCK_SYNC_FFF_H
-#include <digital/api.h>
-#include <filter/fir_filter.h>
-#include <gr_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/filter/fir_filter.h>
+#include <gnuradio/block.h>
namespace gr {
namespace digital {
@@ -145,7 +145,7 @@ namespace gr {
* was added to better work with equalizers, which do a better job
* of modeling the channel if they have 2 samps/sym.
*/
- class DIGITAL_API pfb_clock_sync_fff : virtual public gr_block
+ class DIGITAL_API pfb_clock_sync_fff : virtual public block
{
public:
// gr::digital::pfb_clock_sync_fff::sptr
diff --git a/gr-digital/include/digital/pn_correlator_cc.h b/gr-digital/include/gnuradio/digital/pn_correlator_cc.h
index 147983f892..c98f086aa0 100644
--- a/gr-digital/include/digital/pn_correlator_cc.h
+++ b/gr-digital/include/gnuradio/digital/pn_correlator_cc.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_PN_CORRELATOR_CC_H
#define INCLUDED_GR_PN_CORRELATOR_CC_H
-#include <digital/api.h>
-#include <gr_sync_decimator.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_decimator.h>
namespace gr {
namespace digital {
@@ -38,7 +38,7 @@ namespace gr {
* against reference PN code, one sample per PN code period. The
* PN sequence is generated using a GLFSR.
*/
- class DIGITAL_API pn_correlator_cc : virtual public gr_sync_decimator
+ class DIGITAL_API pn_correlator_cc : virtual public sync_decimator
{
public:
// gr::digital::pn_correlator_cc::sptr
diff --git a/gr-digital/include/digital/probe_density_b.h b/gr-digital/include/gnuradio/digital/probe_density_b.h
index b0343d2cfb..ff5ce22080 100644
--- a/gr-digital/include/digital/probe_density_b.h
+++ b/gr-digital/include/gnuradio/digital/probe_density_b.h
@@ -21,8 +21,8 @@
#ifndef INCLUDED_GR_PROBE_DENSITY_B_H
#define INCLUDED_GR_PROBE_DENSITY_B_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
@@ -37,7 +37,7 @@ namespace gr {
* If you send this block a stream of unpacked bytes, it will tell
* you what the bit density is.
*/
- class DIGITAL_API probe_density_b : virtual public gr_sync_block
+ class DIGITAL_API probe_density_b : virtual public sync_block
{
public:
// gr::digital::probe_density_b::sptr
diff --git a/gr-digital/include/digital/probe_mpsk_snr_est_c.h b/gr-digital/include/gnuradio/digital/probe_mpsk_snr_est_c.h
index 289940cdd1..f78c767bf1 100644
--- a/gr-digital/include/digital/probe_mpsk_snr_est_c.h
+++ b/gr-digital/include/gnuradio/digital/probe_mpsk_snr_est_c.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_DIGITAL_PROBE_MPSK_SNR_EST_C_H
#define INCLUDED_DIGITAL_PROBE_MPSK_SNR_EST_C_H
-#include <digital/api.h>
-#include <digital/mpsk_snr_est.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/digital/mpsk_snr_est.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
@@ -46,7 +46,7 @@ namespace gr {
* conditions; some amount of error should be assumed and/or
* estimated for real channel conditions.
*/
- class DIGITAL_API probe_mpsk_snr_est_c : virtual public gr_sync_block
+ class DIGITAL_API probe_mpsk_snr_est_c : virtual public sync_block
{
public:
// gr::digital::probe_mpsk_snr_est_c::sptr
diff --git a/gr-digital/include/digital/scrambler_bb.h b/gr-digital/include/gnuradio/digital/scrambler_bb.h
index 6360662dae..4ba83daf60 100644
--- a/gr-digital/include/digital/scrambler_bb.h
+++ b/gr-digital/include/gnuradio/digital/scrambler_bb.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_SCRAMBLER_BB_H
#define INCLUDED_GR_SCRAMBLER_BB_H
-#include <digital/api.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
@@ -38,7 +38,7 @@ namespace gr {
* i.e., on an "unpacked binary" stream, and produces the same
* format on its output.
*/
- class DIGITAL_API scrambler_bb : virtual public gr_sync_block
+ class DIGITAL_API scrambler_bb : virtual public sync_block
{
public:
// gr::digital::scrambler_bb::sptr
diff --git a/gr-digital/include/digital/simple_correlator.h b/gr-digital/include/gnuradio/digital/simple_correlator.h
index 5cb7ddc6ee..763705c6b9 100644
--- a/gr-digital/include/digital/simple_correlator.h
+++ b/gr-digital/include/gnuradio/digital/simple_correlator.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_SIMPLE_CORRELATOR_H
#define INCLUDED_GR_SIMPLE_CORRELATOR_H
-#include <digital/api.h>
-#include <gr_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/block.h>
namespace gr {
namespace digital {
@@ -34,7 +34,7 @@ namespace gr {
* \ingroup packet_operators_blk
* \ingroup deprecated_blk
*/
- class DIGITAL_API simple_correlator : virtual public gr_block
+ class DIGITAL_API simple_correlator : virtual public block
{
public:
// gr::digital::simple_correlator::sptr
diff --git a/gr-digital/include/digital/simple_framer.h b/gr-digital/include/gnuradio/digital/simple_framer.h
index 951e13d8f2..f0588eb20e 100644
--- a/gr-digital/include/digital/simple_framer.h
+++ b/gr-digital/include/gnuradio/digital/simple_framer.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_SIMPLE_FRAMER_H
#define INCLUDED_GR_SIMPLE_FRAMER_H
-#include <digital/api.h>
-#include <gr_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/block.h>
namespace gr {
namespace digital {
@@ -39,7 +39,7 @@ namespace gr {
* frame is prepended with the GRSF_SYNC (defind in
* simple_framer_sync.h) and an 8-bit sequence number.
*/
- class DIGITAL_API simple_framer : virtual public gr_block
+ class DIGITAL_API simple_framer : virtual public block
{
public:
// gr::digital::simple_framer::sptr
diff --git a/gr-digital/include/digital/simple_framer_sync.h b/gr-digital/include/gnuradio/digital/simple_framer_sync.h
index f6c8f148e6..f6c8f148e6 100644
--- a/gr-digital/include/digital/simple_framer_sync.h
+++ b/gr-digital/include/gnuradio/digital/simple_framer_sync.h
diff --git a/gr-digital/lib/additive_scrambler_bb_impl.cc b/gr-digital/lib/additive_scrambler_bb_impl.cc
index 8238f2d988..8f2229e6b6 100644
--- a/gr-digital/lib/additive_scrambler_bb_impl.cc
+++ b/gr-digital/lib/additive_scrambler_bb_impl.cc
@@ -25,7 +25,7 @@
#endif
#include "additive_scrambler_bb_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
namespace gr {
namespace digital {
@@ -41,9 +41,9 @@ namespace gr {
int seed,
int len,
int count)
- : gr_sync_block("additive_scrambler_bb",
- gr_make_io_signature(1, 1, sizeof(unsigned char)),
- gr_make_io_signature(1, 1, sizeof(unsigned char))),
+ : sync_block("additive_scrambler_bb",
+ io_signature::make(1, 1, sizeof(unsigned char)),
+ io_signature::make(1, 1, sizeof(unsigned char))),
d_lfsr(mask, seed, len),
d_count(count),
d_bits(0), d_len(len), d_seed(seed)
diff --git a/gr-digital/lib/additive_scrambler_bb_impl.h b/gr-digital/lib/additive_scrambler_bb_impl.h
index 5a4c2f5025..b621637e67 100644
--- a/gr-digital/lib/additive_scrambler_bb_impl.h
+++ b/gr-digital/lib/additive_scrambler_bb_impl.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_ADDITIVE_SCRAMBLER_BB_IMPL_H
#define INCLUDED_DIGITAL_ADDITIVE_SCRAMBLER_BB_IMPL_H
-#include <digital/additive_scrambler_bb.h>
-#include <digital/lfsr.h>
+#include <gnuradio/digital/additive_scrambler_bb.h>
+#include <gnuradio/digital/lfsr.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/binary_slicer_fb_impl.cc b/gr-digital/lib/binary_slicer_fb_impl.cc
index f8a9cf22de..335e2e549a 100644
--- a/gr-digital/lib/binary_slicer_fb_impl.cc
+++ b/gr-digital/lib/binary_slicer_fb_impl.cc
@@ -25,8 +25,8 @@
#endif
#include "binary_slicer_fb_impl.h"
-#include <gr_io_signature.h>
-#include <gr_math.h>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
namespace gr {
namespace digital {
@@ -37,9 +37,9 @@ namespace gr {
}
binary_slicer_fb_impl::binary_slicer_fb_impl()
- : gr_sync_block("binary_slicer_fb",
- gr_make_io_signature(1, 1, sizeof(float)),
- gr_make_io_signature(1, 1, sizeof(unsigned char)))
+ : sync_block("binary_slicer_fb",
+ io_signature::make(1, 1, sizeof(float)),
+ io_signature::make(1, 1, sizeof(unsigned char)))
{
}
@@ -56,7 +56,7 @@ namespace gr {
unsigned char *out = (unsigned char *)output_items[0];
for(int i = 0; i < noutput_items; i++) {
- out[i] = gr_binary_slicer(in[i]);
+ out[i] = gr::binary_slicer(in[i]);
}
return noutput_items;
diff --git a/gr-digital/lib/binary_slicer_fb_impl.h b/gr-digital/lib/binary_slicer_fb_impl.h
index 7416d9cd52..c3ae16c7d5 100644
--- a/gr-digital/lib/binary_slicer_fb_impl.h
+++ b/gr-digital/lib/binary_slicer_fb_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_DIGITAL_BINARY_SLICER_FB_IMPL_H
#define INCLUDED_DIGITAL_BINARY_SLICER_FB_IMPL_H
-#include <digital/binary_slicer_fb.h>
+#include <gnuradio/digital/binary_slicer_fb.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/chunks_to_symbols_XX_impl.cc.t b/gr-digital/lib/chunks_to_symbols_XX_impl.cc.t
index 39eca32db6..3ecb8c17e5 100644
--- a/gr-digital/lib/chunks_to_symbols_XX_impl.cc.t
+++ b/gr-digital/lib/chunks_to_symbols_XX_impl.cc.t
@@ -27,7 +27,7 @@
#endif
#include "@NAME@.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include <assert.h>
namespace gr {
@@ -41,9 +41,9 @@ namespace gr {
}
@IMPL_NAME@::@IMPL_NAME@(const std::vector<@O_TYPE@> &symbol_table, const int D)
- : gr_sync_interpolator("@BASE_NAME@",
- gr_make_io_signature(1, -1, sizeof(@I_TYPE@)),
- gr_make_io_signature(1, -1, sizeof(@O_TYPE@)),
+ : sync_interpolator("@BASE_NAME@",
+ io_signature::make(1, -1, sizeof(@I_TYPE@)),
+ io_signature::make(1, -1, sizeof(@O_TYPE@)),
D),
d_D(D), d_symbol_table(symbol_table)
{
diff --git a/gr-digital/lib/chunks_to_symbols_XX_impl.h.t b/gr-digital/lib/chunks_to_symbols_XX_impl.h.t
index ea44c71ad4..0e80754d10 100644
--- a/gr-digital/lib/chunks_to_symbols_XX_impl.h.t
+++ b/gr-digital/lib/chunks_to_symbols_XX_impl.h.t
@@ -25,7 +25,7 @@
#ifndef @GUARD_NAME@
#define @GUARD_NAME@
-#include <digital/@BASE_NAME@.h>
+#include <gnuradio/digital/@BASE_NAME@.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/clock_recovery_mm_cc_impl.cc b/gr-digital/lib/clock_recovery_mm_cc_impl.cc
index 168d9f7772..124b85efb6 100644
--- a/gr-digital/lib/clock_recovery_mm_cc_impl.cc
+++ b/gr-digital/lib/clock_recovery_mm_cc_impl.cc
@@ -25,9 +25,9 @@
#endif
#include "clock_recovery_mm_cc_impl.h"
-#include <gr_io_signature.h>
-#include <gr_prefs.h>
-#include <gr_math.h>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/prefs.h>
+#include <gnuradio/math.h>
#include <stdexcept>
#include <iostream>
@@ -50,13 +50,13 @@ namespace gr {
clock_recovery_mm_cc_impl::clock_recovery_mm_cc_impl(float omega, float gain_omega,
float mu, float gain_mu,
float omega_relative_limit)
- : gr_block("clock_recovery_mm_cc",
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
- gr_make_io_signature2(1, 2, sizeof(gr_complex), sizeof(float))),
+ : block("clock_recovery_mm_cc",
+ io_signature::make(1, 1, sizeof(gr_complex)),
+ io_signature::make2(1, 2, sizeof(gr_complex), sizeof(float))),
d_mu(mu), d_omega(omega), d_gain_omega(gain_omega),
d_omega_relative_limit(omega_relative_limit),
d_gain_mu(gain_mu), d_last_sample(0), d_interp(new filter::mmse_fir_interpolator_cc()),
- d_verbose(gr_prefs::singleton()->get_bool("clock_recovery_mm_cc", "verbose", false)),
+ d_verbose(prefs::singleton()->get_bool("clock_recovery_mm_cc", "verbose", false)),
d_p_2T(0), d_p_1T(0), d_p_0T(0), d_c_2T(0), d_c_1T(0), d_c_0T(0)
{
if(omega <= 0.0)
@@ -147,9 +147,9 @@ namespace gr {
out[oo++] = d_p_0T;
// limit mm_val
- mm_val = gr_branchless_clip(mm_val,4.0);
+ mm_val = gr::branchless_clip(mm_val,4.0);
d_omega = d_omega + d_gain_omega * mm_val;
- d_omega = d_omega_mid + gr_branchless_clip(d_omega-d_omega_mid, d_omega_relative_limit);
+ d_omega = d_omega_mid + gr::branchless_clip(d_omega-d_omega_mid, d_omega_relative_limit);
d_mu = d_mu + d_omega + d_gain_mu * mm_val;
ii += (int)floor(d_mu);
@@ -180,10 +180,10 @@ namespace gr {
out[oo++] = d_p_0T;
// limit mm_val
- mm_val = gr_branchless_clip(mm_val,1.0);
+ mm_val = gr::branchless_clip(mm_val,1.0);
d_omega = d_omega + d_gain_omega * mm_val;
- d_omega = d_omega_mid + gr_branchless_clip(d_omega-d_omega_mid, d_omega_relative_limit);
+ d_omega = d_omega_mid + gr::branchless_clip(d_omega-d_omega_mid, d_omega_relative_limit);
d_mu = d_mu + d_omega + d_gain_mu * mm_val;
ii += (int)floor(d_mu);
diff --git a/gr-digital/lib/clock_recovery_mm_cc_impl.h b/gr-digital/lib/clock_recovery_mm_cc_impl.h
index fa62bd127f..a2208350dd 100644
--- a/gr-digital/lib/clock_recovery_mm_cc_impl.h
+++ b/gr-digital/lib/clock_recovery_mm_cc_impl.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_CLOCK_RECOVERY_MM_CC_IMPL_H
#define INCLUDED_DIGITAL_CLOCK_RECOVERY_MM_CC_IMPL_H
-#include <digital/clock_recovery_mm_cc.h>
-#include <filter/mmse_fir_interpolator_cc.h>
+#include <gnuradio/digital/clock_recovery_mm_cc.h>
+#include <gnuradio/filter/mmse_fir_interpolator_cc.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/clock_recovery_mm_ff_impl.cc b/gr-digital/lib/clock_recovery_mm_ff_impl.cc
index 4ac3e40c5d..6c16777ed7 100644
--- a/gr-digital/lib/clock_recovery_mm_ff_impl.cc
+++ b/gr-digital/lib/clock_recovery_mm_ff_impl.cc
@@ -25,8 +25,8 @@
#endif
#include "clock_recovery_mm_ff_impl.h"
-#include <gr_io_signature.h>
-#include <gr_math.h>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
#include <stdexcept>
namespace gr {
@@ -46,9 +46,9 @@ namespace gr {
clock_recovery_mm_ff_impl::clock_recovery_mm_ff_impl(float omega, float gain_omega,
float mu, float gain_mu,
float omega_relative_limit)
- : gr_block("clock_recovery_mm_ff",
- gr_make_io_signature(1, 1, sizeof(float)),
- gr_make_io_signature(1, 1, sizeof(float))),
+ : block("clock_recovery_mm_ff",
+ io_signature::make(1, 1, sizeof(float)),
+ io_signature::make(1, 1, sizeof(float))),
d_mu(mu), d_gain_mu(gain_mu), d_gain_omega(gain_omega),
d_omega_relative_limit(omega_relative_limit),
d_last_sample(0), d_interp(new filter::mmse_fir_interpolator_ff())
@@ -104,7 +104,7 @@ namespace gr {
d_last_sample = out[oo];
d_omega = d_omega + d_gain_omega * mm_val;
- d_omega = d_omega_mid + gr_branchless_clip(d_omega-d_omega_mid, d_omega_relative_limit);
+ d_omega = d_omega_mid + gr::branchless_clip(d_omega-d_omega_mid, d_omega_relative_limit);
d_mu = d_mu + d_omega + d_gain_mu * mm_val;
ii += (int)floor(d_mu);
diff --git a/gr-digital/lib/clock_recovery_mm_ff_impl.h b/gr-digital/lib/clock_recovery_mm_ff_impl.h
index 920a05a496..13bed5d070 100644
--- a/gr-digital/lib/clock_recovery_mm_ff_impl.h
+++ b/gr-digital/lib/clock_recovery_mm_ff_impl.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_CLOCK_RECOVERY_MM_FF_IMPL_H
#define INCLUDED_DIGITAL_CLOCK_RECOVERY_MM_FF_IMPL_H
-#include <digital/clock_recovery_mm_ff.h>
-#include <filter/mmse_fir_interpolator_ff.h>
+#include <gnuradio/digital/clock_recovery_mm_ff.h>
+#include <gnuradio/filter/mmse_fir_interpolator_ff.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/cma_equalizer_cc_impl.cc b/gr-digital/lib/cma_equalizer_cc_impl.cc
index e4e6c56466..6f11e617bb 100644
--- a/gr-digital/lib/cma_equalizer_cc_impl.cc
+++ b/gr-digital/lib/cma_equalizer_cc_impl.cc
@@ -25,7 +25,7 @@
#endif
#include "cma_equalizer_cc_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
namespace gr {
namespace digital {
@@ -41,9 +41,9 @@ namespace gr {
cma_equalizer_cc_impl::cma_equalizer_cc_impl(int num_taps, float modulus,
float mu, int sps)
- : gr_sync_decimator("cma_equalizer_cc",
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
+ : sync_decimator("cma_equalizer_cc",
+ io_signature::make(1, 1, sizeof(gr_complex)),
+ io_signature::make(1, 1, sizeof(gr_complex)),
sps),
fir_filter_ccc(sps, std::vector<gr_complex>(num_taps, gr_complex(0,0))),
d_new_taps(num_taps, gr_complex(0,0)),
@@ -79,8 +79,8 @@ namespace gr {
cma_equalizer_cc_impl::error(const gr_complex &out)
{
gr_complex error = out*(norm(out) - d_modulus);
- float re = gr_clip(error.real(), 1.0);
- float im = gr_clip(error.imag(), 1.0);
+ float re = gr::clip(error.real(), 1.0);
+ float im = gr::clip(error.imag(), 1.0);
return gr_complex(re, im);
}
diff --git a/gr-digital/lib/cma_equalizer_cc_impl.h b/gr-digital/lib/cma_equalizer_cc_impl.h
index 553501bf46..71a78e6d72 100644
--- a/gr-digital/lib/cma_equalizer_cc_impl.h
+++ b/gr-digital/lib/cma_equalizer_cc_impl.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_DIGITAL_CMA_EQUALIZER_CC_IMPL_H
#define INCLUDED_DIGITAL_CMA_EQUALIZER_CC_IMPL_H
-#include <digital/cma_equalizer_cc.h>
-#include <filter/fir_filter.h>
-#include <gr_math.h>
+#include <gnuradio/digital/cma_equalizer_cc.h>
+#include <gnuradio/filter/fir_filter.h>
+#include <gnuradio/math.h>
#include <stdexcept>
namespace gr {
diff --git a/gr-digital/lib/constellation.cc b/gr-digital/lib/constellation.cc
index d249c493ad..2c70bb0944 100644
--- a/gr-digital/lib/constellation.cc
+++ b/gr-digital/lib/constellation.cc
@@ -24,10 +24,10 @@
#include "config.h"
#endif
-#include <gr_io_signature.h>
-#include <digital/constellation.h>
-#include <gr_math.h>
-#include <gr_complex.h>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/digital/constellation.h>
+#include <gnuradio/math.h>
+#include <gnuradio/gr_complex.h>
#include <math.h>
#include <iostream>
#include <stdlib.h>
diff --git a/gr-digital/lib/constellation_decoder_cb_impl.cc b/gr-digital/lib/constellation_decoder_cb_impl.cc
index e764ccc629..e8075d2225 100644
--- a/gr-digital/lib/constellation_decoder_cb_impl.cc
+++ b/gr-digital/lib/constellation_decoder_cb_impl.cc
@@ -25,7 +25,7 @@
#endif
#include "constellation_decoder_cb_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
namespace gr {
namespace digital {
@@ -39,9 +39,9 @@ namespace gr {
constellation_decoder_cb_impl::
constellation_decoder_cb_impl(constellation_sptr constellation)
- : gr_block("constellation_decoder_cb",
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
- gr_make_io_signature(1, 1, sizeof(unsigned char))),
+ : block("constellation_decoder_cb",
+ io_signature::make(1, 1, sizeof(gr_complex)),
+ io_signature::make(1, 1, sizeof(unsigned char))),
d_constellation(constellation),
d_dim(constellation->dimensionality())
{
diff --git a/gr-digital/lib/constellation_decoder_cb_impl.h b/gr-digital/lib/constellation_decoder_cb_impl.h
index 5972760507..286a281171 100644
--- a/gr-digital/lib/constellation_decoder_cb_impl.h
+++ b/gr-digital/lib/constellation_decoder_cb_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_DIGITAL_CONSTELLATION_DECODER_CB_IMPL_H
#define INCLUDED_DIGITAL_CONSTELLATION_DECODER_CB_IMPL_H
-#include <digital/constellation_decoder_cb.h>
+#include <gnuradio/digital/constellation_decoder_cb.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/constellation_receiver_cb_impl.cc b/gr-digital/lib/constellation_receiver_cb_impl.cc
index 30be24aab9..cd44386ea0 100644
--- a/gr-digital/lib/constellation_receiver_cb_impl.cc
+++ b/gr-digital/lib/constellation_receiver_cb_impl.cc
@@ -25,10 +25,9 @@
#endif
#include "constellation_receiver_cb_impl.h"
-#include <gr_io_signature.h>
-#include <gr_prefs.h>
-#include <gr_math.h>
-#include <gr_expj.h>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
+#include <gnuradio/expj.h>
#include <stdexcept>
namespace gr {
@@ -51,9 +50,9 @@ namespace gr {
static std::vector<int> iosig(ios, ios+sizeof(ios)/sizeof(int));
constellation_receiver_cb_impl::constellation_receiver_cb_impl(constellation_sptr constellation,
float loop_bw, float fmin, float fmax)
- : gr_block("constellation_receiver_cb",
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
- gr_make_io_signaturev(1, 5, iosig)),
+ : block("constellation_receiver_cb",
+ io_signature::make(1, 1, sizeof(gr_complex)),
+ io_signature::makev(1, 5, iosig)),
blocks::control_loop(loop_bw, fmax, fmin),
d_constellation(constellation),
d_current_const_point(0)
diff --git a/gr-digital/lib/constellation_receiver_cb_impl.h b/gr-digital/lib/constellation_receiver_cb_impl.h
index 7c34518340..4cd5f72bfa 100644
--- a/gr-digital/lib/constellation_receiver_cb_impl.h
+++ b/gr-digital/lib/constellation_receiver_cb_impl.h
@@ -23,10 +23,10 @@
#ifndef INCLUDED_DIGITAL_CONSTELLATION_RECEIVER_CB_IMPL_H
#define INCLUDED_DIGITAL_CONSTELLATION_RECEIVER_CB_IMPL_H
-#include <digital/constellation_receiver_cb.h>
-#include <attributes.h>
-#include <gr_complex.h>
-#include <blocks/control_loop.h>
+#include <gnuradio/digital/constellation_receiver_cb.h>
+#include <gnuradio/attributes.h>
+#include <gnuradio/gr_complex.h>
+#include <gnuradio/blocks/control_loop.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/correlate_access_code_bb_impl.cc b/gr-digital/lib/correlate_access_code_bb_impl.cc
index 0ada203c65..dea831dfbc 100644
--- a/gr-digital/lib/correlate_access_code_bb_impl.cc
+++ b/gr-digital/lib/correlate_access_code_bb_impl.cc
@@ -25,8 +25,8 @@
#endif
#include "correlate_access_code_bb_impl.h"
-#include <gr_io_signature.h>
-#include <blocks/count_bits.h>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/blocks/count_bits.h>
#include <stdexcept>
#include <cstdio>
@@ -44,9 +44,9 @@ namespace gr {
correlate_access_code_bb_impl::correlate_access_code_bb_impl(
const std::string &access_code, int threshold)
- : gr_sync_block("correlate_access_code_bb",
- gr_make_io_signature(1, 1, sizeof(char)),
- gr_make_io_signature(1, 1, sizeof(char))),
+ : sync_block("correlate_access_code_bb",
+ io_signature::make(1, 1, sizeof(char)),
+ io_signature::make(1, 1, sizeof(char))),
d_data_reg(0), d_flag_reg(0), d_flag_bit(0), d_mask(0),
d_threshold(threshold)
{
diff --git a/gr-digital/lib/correlate_access_code_bb_impl.h b/gr-digital/lib/correlate_access_code_bb_impl.h
index ad44b36400..5c46565a1c 100644
--- a/gr-digital/lib/correlate_access_code_bb_impl.h
+++ b/gr-digital/lib/correlate_access_code_bb_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_BB_IMPL_H
#define INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_BB_IMPL_H
-#include <digital/correlate_access_code_bb.h>
+#include <gnuradio/digital/correlate_access_code_bb.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/correlate_access_code_tag_bb_impl.cc b/gr-digital/lib/correlate_access_code_tag_bb_impl.cc
index 8ac601bb9d..0d64caa7ab 100644
--- a/gr-digital/lib/correlate_access_code_tag_bb_impl.cc
+++ b/gr-digital/lib/correlate_access_code_tag_bb_impl.cc
@@ -25,9 +25,9 @@
#endif
#include "correlate_access_code_tag_bb_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include <stdexcept>
-#include <blocks/count_bits.h>
+#include <gnuradio/blocks/count_bits.h>
#include <cstdio>
#include <iostream>
@@ -49,9 +49,9 @@ namespace gr {
correlate_access_code_tag_bb_impl::correlate_access_code_tag_bb_impl(
const std::string &access_code, int threshold, const std::string &tag_name)
- : gr_sync_block("correlate_access_code_tag_bb",
- gr_make_io_signature(1, 1, sizeof(char)),
- gr_make_io_signature(1, 1, sizeof(char))),
+ : sync_block("correlate_access_code_tag_bb",
+ io_signature::make(1, 1, sizeof(char)),
+ io_signature::make(1, 1, sizeof(char))),
d_data_reg(0), d_mask(0),
d_threshold(threshold), d_len(0)
{
diff --git a/gr-digital/lib/correlate_access_code_tag_bb_impl.h b/gr-digital/lib/correlate_access_code_tag_bb_impl.h
index 17a016fc9c..df558dd17e 100644
--- a/gr-digital/lib/correlate_access_code_tag_bb_impl.h
+++ b/gr-digital/lib/correlate_access_code_tag_bb_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_TAG_BB_IMPL_H
#define INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_TAG_BB_IMPL_H
-#include <digital/correlate_access_code_tag_bb.h>
+#include <gnuradio/digital/correlate_access_code_tag_bb.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/costas_loop_cc_impl.cc b/gr-digital/lib/costas_loop_cc_impl.cc
index fcdd45045b..a0b1edf509 100644
--- a/gr-digital/lib/costas_loop_cc_impl.cc
+++ b/gr-digital/lib/costas_loop_cc_impl.cc
@@ -25,10 +25,10 @@
#endif
#include "costas_loop_cc_impl.h"
-#include <gr_io_signature.h>
-#include <gr_expj.h>
-#include <gr_sincos.h>
-#include <gr_math.h>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/expj.h>
+#include <gnuradio/sincos.h>
+#include <gnuradio/math.h>
namespace gr {
namespace digital {
@@ -41,9 +41,9 @@ namespace gr {
}
costas_loop_cc_impl::costas_loop_cc_impl(float loop_bw, int order)
- : gr_sync_block("costas_loop_cc",
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
- gr_make_io_signature2(1, 2, sizeof(gr_complex), sizeof(float))),
+ : sync_block("costas_loop_cc",
+ io_signature::make(1, 1, sizeof(gr_complex)),
+ io_signature::make2(1, 2, sizeof(gr_complex), sizeof(float))),
blocks::control_loop(loop_bw, 1.0, -1.0),
d_order(order), d_phase_detector(NULL)
{
@@ -132,7 +132,7 @@ namespace gr {
optr[i] = iptr[i] * nco_out;
error = (*this.*d_phase_detector)(optr[i]);
- error = gr_branchless_clip(error, 1.0);
+ error = gr::branchless_clip(error, 1.0);
advance_loop(error);
phase_wrap();
@@ -147,7 +147,7 @@ namespace gr {
optr[i] = iptr[i] * nco_out;
error = (*this.*d_phase_detector)(optr[i]);
- error = gr_branchless_clip(error, 1.0);
+ error = gr::branchless_clip(error, 1.0);
advance_loop(error);
phase_wrap();
diff --git a/gr-digital/lib/costas_loop_cc_impl.h b/gr-digital/lib/costas_loop_cc_impl.h
index ecba2cdd4f..ceb45ce32f 100644
--- a/gr-digital/lib/costas_loop_cc_impl.h
+++ b/gr-digital/lib/costas_loop_cc_impl.h
@@ -24,7 +24,7 @@
#ifndef INCLUDED_DIGITAL_COSTAS_LOOP_CC_IMPL_H
#define INCLUDED_DIGITAL_COSTAS_LOOP_CC_IMPL_H
-#include <digital/costas_loop_cc.h>
+#include <gnuradio/digital/costas_loop_cc.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/cpmmod_bc_impl.cc b/gr-digital/lib/cpmmod_bc_impl.cc
index 763a4cc1e2..4b2457f90e 100644
--- a/gr-digital/lib/cpmmod_bc_impl.cc
+++ b/gr-digital/lib/cpmmod_bc_impl.cc
@@ -23,7 +23,7 @@
#endif
#include "cpmmod_bc_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
namespace gr {
namespace digital {
@@ -55,9 +55,9 @@ namespace gr {
analog::cpm::cpm_type type, float h,
int samples_per_sym,
int L, double beta)
- : gr_hier_block2(name,
- gr_make_io_signature(1, 1, sizeof(char)),
- gr_make_io_signature2(1, 1, sizeof(gr_complex), sizeof(float))),
+ : hier_block2(name,
+ io_signature::make(1, 1, sizeof(char)),
+ io_signature::make2(1, 1, sizeof(gr_complex), sizeof(float))),
d_type(type), d_index(h), d_sps(samples_per_sym), d_length(L), d_beta(beta),
d_taps(analog::cpm::phase_response(type, samples_per_sym, L, beta)),
d_char_to_float(blocks::char_to_float::make()),
diff --git a/gr-digital/lib/cpmmod_bc_impl.h b/gr-digital/lib/cpmmod_bc_impl.h
index 9cfec4959e..3402e6e2bb 100644
--- a/gr-digital/lib/cpmmod_bc_impl.h
+++ b/gr-digital/lib/cpmmod_bc_impl.h
@@ -23,10 +23,10 @@
#ifndef INCLUDED_DIGITAL_CPMMOD_BC_IMPL_H
#define INCLUDED_DIGITAL_CPMMOD_BC_IMPL_H
-#include <digital/cpmmod_bc.h>
-#include <blocks/char_to_float.h>
-#include <analog/frequency_modulator_fc.h>
-#include <filter/interp_fir_filter_fff.h>
+#include <gnuradio/digital/cpmmod_bc.h>
+#include <gnuradio/blocks/char_to_float.h>
+#include <gnuradio/analog/frequency_modulator_fc.h>
+#include <gnuradio/filter/interp_fir_filter_fff.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/crc32.cc b/gr-digital/lib/crc32.cc
index b203727114..cdff9f7e7a 100644
--- a/gr-digital/lib/crc32.cc
+++ b/gr-digital/lib/crc32.cc
@@ -28,7 +28,7 @@
#include <config.h>
#endif
-#include <digital/crc32.h>
+#include <gnuradio/digital/crc32.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/crc32_bb_impl.cc b/gr-digital/lib/crc32_bb_impl.cc
index 89cc0d1083..67dbfd328b 100644
--- a/gr-digital/lib/crc32_bb_impl.cc
+++ b/gr-digital/lib/crc32_bb_impl.cc
@@ -24,9 +24,9 @@
#include "config.h"
#endif
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include "crc32_bb_impl.h"
-#include <digital/crc32.h>
+#include <gnuradio/digital/crc32.h>
namespace gr {
namespace digital {
@@ -38,9 +38,9 @@ namespace gr {
}
crc32_bb_impl::crc32_bb_impl(bool check, const std::string& lengthtagname)
- : gr_tagged_stream_block("crc32_bb",
- gr_make_io_signature(1, 1, sizeof (char)),
- gr_make_io_signature(1, 1, sizeof (char)),
+ : tagged_stream_block("crc32_bb",
+ io_signature::make(1, 1, sizeof (char)),
+ io_signature::make(1, 1, sizeof (char)),
lengthtagname),
d_check(check)
{
@@ -85,7 +85,7 @@ namespace gr {
memcpy((void *) (out + packet_length), &crc, 4); // FIXME big-endian/little-endian, this might be wrong
}
- std::vector<gr_tag_t> tags;
+ std::vector<tag_t> tags;
get_tags_in_range(tags, 0, nitems_read(0), nitems_read(0)+packet_length);
for (size_t i = 0; i < tags.size(); i++) {
tags[i].offset -= nitems_read(0);
diff --git a/gr-digital/lib/crc32_bb_impl.h b/gr-digital/lib/crc32_bb_impl.h
index 7b9dbb6351..9d5fddc557 100644
--- a/gr-digital/lib/crc32_bb_impl.h
+++ b/gr-digital/lib/crc32_bb_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_DIGITAL_CRC32_BB_IMPL_H
#define INCLUDED_DIGITAL_CRC32_BB_IMPL_H
-#include <digital/crc32_bb.h>
+#include <gnuradio/digital/crc32_bb.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/descrambler_bb_impl.cc b/gr-digital/lib/descrambler_bb_impl.cc
index 8124df37ef..69e9dd0cef 100644
--- a/gr-digital/lib/descrambler_bb_impl.cc
+++ b/gr-digital/lib/descrambler_bb_impl.cc
@@ -25,7 +25,7 @@
#endif
#include "descrambler_bb_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
namespace gr {
namespace digital {
@@ -38,9 +38,9 @@ namespace gr {
}
descrambler_bb_impl::descrambler_bb_impl(int mask, int seed, int len)
- : gr_sync_block("descrambler_bb",
- gr_make_io_signature(1, 1, sizeof(unsigned char)),
- gr_make_io_signature(1, 1, sizeof(unsigned char))),
+ : sync_block("descrambler_bb",
+ io_signature::make(1, 1, sizeof(unsigned char)),
+ io_signature::make(1, 1, sizeof(unsigned char))),
d_lfsr(mask, seed, len)
{
}
diff --git a/gr-digital/lib/descrambler_bb_impl.h b/gr-digital/lib/descrambler_bb_impl.h
index 4f07b7c329..aeada30566 100644
--- a/gr-digital/lib/descrambler_bb_impl.h
+++ b/gr-digital/lib/descrambler_bb_impl.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_DESCRAMBLER_BB_IMPL_H
#define INCLUDED_GR_DESCRAMBLER_BB_IMPL_H
-#include <digital/descrambler_bb.h>
-#include <digital/lfsr.h>
+#include <gnuradio/digital/descrambler_bb.h>
+#include <gnuradio/digital/lfsr.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/diff_decoder_bb_impl.cc b/gr-digital/lib/diff_decoder_bb_impl.cc
index 74c247a830..f0e1de0935 100644
--- a/gr-digital/lib/diff_decoder_bb_impl.cc
+++ b/gr-digital/lib/diff_decoder_bb_impl.cc
@@ -25,7 +25,7 @@
#endif
#include "diff_decoder_bb_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
namespace gr {
namespace digital {
@@ -37,9 +37,9 @@ namespace gr {
}
diff_decoder_bb_impl::diff_decoder_bb_impl(unsigned int modulus)
- : gr_sync_block("diff_decoder_bb",
- gr_make_io_signature(1, 1, sizeof(unsigned char)),
- gr_make_io_signature(1, 1, sizeof(unsigned char))),
+ : sync_block("diff_decoder_bb",
+ io_signature::make(1, 1, sizeof(unsigned char)),
+ io_signature::make(1, 1, sizeof(unsigned char))),
d_modulus(modulus)
{
set_history(2); // need to look at two inputs
diff --git a/gr-digital/lib/diff_decoder_bb_impl.h b/gr-digital/lib/diff_decoder_bb_impl.h
index 56a15ba128..c827c8e35f 100644
--- a/gr-digital/lib/diff_decoder_bb_impl.h
+++ b/gr-digital/lib/diff_decoder_bb_impl.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_DIFF_DECODER_BB_IMPL_H
#define INCLUDED_GR_DIFF_DECODER_BB_IMPL_H
-#include <digital/diff_decoder_bb.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/diff_decoder_bb.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/diff_encoder_bb_impl.cc b/gr-digital/lib/diff_encoder_bb_impl.cc
index 411efe006c..529aade3db 100644
--- a/gr-digital/lib/diff_encoder_bb_impl.cc
+++ b/gr-digital/lib/diff_encoder_bb_impl.cc
@@ -25,7 +25,7 @@
#endif
#include "diff_encoder_bb_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
namespace gr {
namespace digital {
@@ -38,9 +38,9 @@ namespace gr {
}
diff_encoder_bb_impl::diff_encoder_bb_impl(unsigned int modulus)
- : gr_sync_block("diff_encoder_bb",
- gr_make_io_signature(1, 1, sizeof(unsigned char)),
- gr_make_io_signature(1, 1, sizeof(unsigned char))),
+ : sync_block("diff_encoder_bb",
+ io_signature::make(1, 1, sizeof(unsigned char)),
+ io_signature::make(1, 1, sizeof(unsigned char))),
d_last_out(0), d_modulus(modulus)
{
}
diff --git a/gr-digital/lib/diff_encoder_bb_impl.h b/gr-digital/lib/diff_encoder_bb_impl.h
index e088d79f86..7c761b235b 100644
--- a/gr-digital/lib/diff_encoder_bb_impl.h
+++ b/gr-digital/lib/diff_encoder_bb_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_GR_DIFF_ENCODER_BB_IMPL_H
#define INCLUDED_GR_DIFF_ENCODER_BB_IMPL_H
-#include <digital/diff_encoder_bb.h>
+#include <gnuradio/digital/diff_encoder_bb.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/diff_phasor_cc_impl.cc b/gr-digital/lib/diff_phasor_cc_impl.cc
index 0e7a108121..0e70a4bf62 100644
--- a/gr-digital/lib/diff_phasor_cc_impl.cc
+++ b/gr-digital/lib/diff_phasor_cc_impl.cc
@@ -25,7 +25,7 @@
#endif
#include "diff_phasor_cc_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
namespace gr {
namespace digital {
@@ -38,9 +38,9 @@ namespace gr {
}
diff_phasor_cc_impl::diff_phasor_cc_impl()
- : gr_sync_block("diff_phasor_cc",
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
- gr_make_io_signature(1, 1, sizeof(gr_complex)))
+ : sync_block("diff_phasor_cc",
+ io_signature::make(1, 1, sizeof(gr_complex)),
+ io_signature::make(1, 1, sizeof(gr_complex)))
{
set_history(2);
}
diff --git a/gr-digital/lib/diff_phasor_cc_impl.h b/gr-digital/lib/diff_phasor_cc_impl.h
index 844fc826d8..4b54e11f44 100644
--- a/gr-digital/lib/diff_phasor_cc_impl.h
+++ b/gr-digital/lib/diff_phasor_cc_impl.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_DIFF_PHASOR_CC_IMPL_H
#define INCLUDED_GR_DIFF_PHASOR_CC_IMPL_H
-#include <digital/diff_phasor_cc.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/diff_phasor_cc.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/fll_band_edge_cc_impl.cc b/gr-digital/lib/fll_band_edge_cc_impl.cc
index c438b813f4..d67f13a412 100644
--- a/gr-digital/lib/fll_band_edge_cc_impl.cc
+++ b/gr-digital/lib/fll_band_edge_cc_impl.cc
@@ -25,8 +25,8 @@
#endif
#include "fll_band_edge_cc_impl.h"
-#include <gr_io_signature.h>
-#include <gr_expj.h>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/expj.h>
#include <cstdio>
namespace gr {
@@ -55,9 +55,9 @@ namespace gr {
static std::vector<int> iosig(ios, ios+sizeof(ios)/sizeof(int));
fll_band_edge_cc_impl::fll_band_edge_cc_impl(float samps_per_sym, float rolloff,
int filter_size, float bandwidth)
- : gr_sync_block("fll_band_edge_cc",
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
- gr_make_io_signaturev(1, 4, iosig)),
+ : sync_block("fll_band_edge_cc",
+ io_signature::make(1, 1, sizeof(gr_complex)),
+ io_signature::makev(1, 4, iosig)),
blocks::control_loop(bandwidth, M_TWOPI*(2.0/samps_per_sym),
-M_TWOPI*(2.0/samps_per_sym)),
d_updated(false)
diff --git a/gr-digital/lib/fll_band_edge_cc_impl.h b/gr-digital/lib/fll_band_edge_cc_impl.h
index 9eb3e6e7ae..7bec745262 100644
--- a/gr-digital/lib/fll_band_edge_cc_impl.h
+++ b/gr-digital/lib/fll_band_edge_cc_impl.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_DIGITAL_FLL_BAND_EDGE_CC_IMPL_H
#define INCLUDED_DIGITAL_FLL_BAND_EDGE_CC_IMPL_H
-#include <digital/fll_band_edge_cc.h>
-#include <blocks/control_loop.h>
-#include <filter/fir_filter.h>
+#include <gnuradio/digital/fll_band_edge_cc.h>
+#include <gnuradio/blocks/control_loop.h>
+#include <gnuradio/filter/fir_filter.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/framer_sink_1_impl.cc b/gr-digital/lib/framer_sink_1_impl.cc
index 1dda5ca50c..76347101a4 100644
--- a/gr-digital/lib/framer_sink_1_impl.cc
+++ b/gr-digital/lib/framer_sink_1_impl.cc
@@ -25,7 +25,7 @@
#endif
#include "framer_sink_1_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include <cstdio>
#include <string>
@@ -71,16 +71,16 @@ namespace gr {
}
framer_sink_1::sptr
- framer_sink_1::make(gr_msg_queue_sptr target_queue)
+ framer_sink_1::make(msg_queue::sptr target_queue)
{
return gnuradio::get_initial_sptr
(new framer_sink_1_impl(target_queue));
}
- framer_sink_1_impl::framer_sink_1_impl(gr_msg_queue_sptr target_queue)
- : gr_sync_block("framer_sink_1",
- gr_make_io_signature(1, 1, sizeof(unsigned char)),
- gr_make_io_signature(0, 0, 0)),
+ framer_sink_1_impl::framer_sink_1_impl(msg_queue::sptr target_queue)
+ : sync_block("framer_sink_1",
+ io_signature::make(1, 1, sizeof(unsigned char)),
+ io_signature::make(0, 0, 0)),
d_target_queue(target_queue)
{
enter_search();
@@ -139,8 +139,8 @@ namespace gr {
if(d_packetlen == 0) { // check for zero-length payload
// build a zero-length message
// NOTE: passing header field as arg1 is not scalable
- gr_message_sptr msg =
- gr_make_message(0, d_packet_whitener_offset, 0, 0);
+ message::sptr msg =
+ message::make(0, d_packet_whitener_offset, 0, 0);
d_target_queue->insert_tail(msg); // send it
msg.reset(); // free it up
@@ -168,8 +168,8 @@ namespace gr {
if(d_packetlen_cnt == d_packetlen) { // packet is filled
// build a message
// NOTE: passing header field as arg1 is not scalable
- gr_message_sptr msg =
- gr_make_message(0, d_packet_whitener_offset, 0, d_packetlen_cnt);
+ message::sptr msg =
+ message::make(0, d_packet_whitener_offset, 0, d_packetlen_cnt);
memcpy(msg->msg(), d_packet, d_packetlen_cnt);
d_target_queue->insert_tail(msg); // send it
diff --git a/gr-digital/lib/framer_sink_1_impl.h b/gr-digital/lib/framer_sink_1_impl.h
index ff2839acbf..e33c93de16 100644
--- a/gr-digital/lib/framer_sink_1_impl.h
+++ b/gr-digital/lib/framer_sink_1_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_GR_FRAMER_SINK_1_IMPL_H
#define INCLUDED_GR_FRAMER_SINK_1_IMPL_H
-#include <digital/framer_sink_1.h>
+#include <gnuradio/digital/framer_sink_1.h>
namespace gr {
namespace digital {
@@ -36,17 +36,17 @@ namespace gr {
static const int MAX_PKT_LEN = 4096;
static const int HEADERBITLEN = 32;
- gr_msg_queue_sptr d_target_queue; // where to send the packet when received
- state_t d_state;
- unsigned int d_header; // header bits
- int d_headerbitlen_cnt; // how many so far
+ msg_queue::sptr d_target_queue; // where to send the packet when received
+ state_t d_state;
+ unsigned int d_header; // header bits
+ int d_headerbitlen_cnt; // how many so far
- unsigned char d_packet[MAX_PKT_LEN]; // assembled payload
- unsigned char d_packet_byte; // byte being assembled
- int d_packet_byte_index; // which bit of d_packet_byte we're working on
- int d_packetlen; // length of packet
- int d_packet_whitener_offset; // offset into whitener string to use
- int d_packetlen_cnt; // how many so far
+ unsigned char d_packet[MAX_PKT_LEN]; // assembled payload
+ unsigned char d_packet_byte; // byte being assembled
+ int d_packet_byte_index; // which bit of d_packet_byte we're working on
+ int d_packetlen; // length of packet
+ int d_packet_whitener_offset; // offset into whitener string to use
+ int d_packetlen_cnt; // how many so far
protected:
void enter_search();
@@ -69,7 +69,7 @@ namespace gr {
}
public:
- framer_sink_1_impl(gr_msg_queue_sptr target_queue);
+ framer_sink_1_impl(msg_queue::sptr target_queue);
~framer_sink_1_impl();
int work(int noutput_items,
diff --git a/gr-digital/lib/glfsr.cc b/gr-digital/lib/glfsr.cc
index 5c9d22af88..fc2762fd5b 100644
--- a/gr-digital/lib/glfsr.cc
+++ b/gr-digital/lib/glfsr.cc
@@ -20,7 +20,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <digital/glfsr.h>
+#include <gnuradio/digital/glfsr.h>
#include <stdexcept>
namespace gr {
diff --git a/gr-digital/lib/glfsr_source_b_impl.cc b/gr-digital/lib/glfsr_source_b_impl.cc
index e4171d80e7..260bd45c24 100644
--- a/gr-digital/lib/glfsr_source_b_impl.cc
+++ b/gr-digital/lib/glfsr_source_b_impl.cc
@@ -25,7 +25,7 @@
#endif
#include "glfsr_source_b_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include <stdexcept>
namespace gr {
@@ -40,9 +40,9 @@ namespace gr {
glfsr_source_b_impl::glfsr_source_b_impl(int degree, bool repeat,
int mask, int seed)
- : gr_sync_block("glfsr_source_b",
- gr_make_io_signature(0, 0, 0),
- gr_make_io_signature(1, 1, sizeof(unsigned char))),
+ : sync_block("glfsr_source_b",
+ io_signature::make(0, 0, 0),
+ io_signature::make(1, 1, sizeof(unsigned char))),
d_repeat(repeat), d_index(0)
{
if(degree < 1 || degree > 32)
diff --git a/gr-digital/lib/glfsr_source_b_impl.h b/gr-digital/lib/glfsr_source_b_impl.h
index f52cfa0f20..a063eb7c0a 100644
--- a/gr-digital/lib/glfsr_source_b_impl.h
+++ b/gr-digital/lib/glfsr_source_b_impl.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_GLFSR_SOURCE_B_IMPL_H
#define INCLUDED_GR_GLFSR_SOURCE_B_IMPL_H
-#include <digital/glfsr_source_b.h>
-#include <digital/glfsr.h>
+#include <gnuradio/digital/glfsr_source_b.h>
+#include <gnuradio/digital/glfsr.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/glfsr_source_f_impl.cc b/gr-digital/lib/glfsr_source_f_impl.cc
index 1e0ee2d85e..cb637df4ea 100644
--- a/gr-digital/lib/glfsr_source_f_impl.cc
+++ b/gr-digital/lib/glfsr_source_f_impl.cc
@@ -26,7 +26,7 @@
#endif
#include "glfsr_source_f_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include <stdexcept>
namespace gr {
@@ -41,9 +41,9 @@ namespace gr {
glfsr_source_f_impl::glfsr_source_f_impl(int degree, bool repeat,
int mask, int seed)
- : gr_sync_block("glfsr_source_f",
- gr_make_io_signature(0, 0, 0),
- gr_make_io_signature(1, 1, sizeof(float))),
+ : sync_block("glfsr_source_f",
+ io_signature::make(0, 0, 0),
+ io_signature::make(1, 1, sizeof(float))),
d_repeat(repeat), d_index(0)
{
if(degree < 1 || degree > 32)
diff --git a/gr-digital/lib/glfsr_source_f_impl.h b/gr-digital/lib/glfsr_source_f_impl.h
index 4168016097..194e2ff3b9 100644
--- a/gr-digital/lib/glfsr_source_f_impl.h
+++ b/gr-digital/lib/glfsr_source_f_impl.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_GLFSR_SOURCE_F_IMPL_H
#define INCLUDED_GR_GLFSR_SOURCE_F_IMPL_H
-#include <digital/glfsr_source_f.h>
-#include <digital/glfsr.h>
+#include <gnuradio/digital/glfsr_source_f.h>
+#include <gnuradio/digital/glfsr.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/header_payload_demux_impl.cc b/gr-digital/lib/header_payload_demux_impl.cc
index a2e81c5b8e..affbc92125 100644
--- a/gr-digital/lib/header_payload_demux_impl.cc
+++ b/gr-digital/lib/header_payload_demux_impl.cc
@@ -24,7 +24,7 @@
#endif
#include <climits>
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include "header_payload_demux_impl.h"
namespace gr {
@@ -70,9 +70,9 @@ namespace gr {
const std::string &trigger_tag_key,
bool output_symbols,
size_t itemsize
- ) : gr_block("header_payload_demux",
- gr_make_io_signature2(1, 2, itemsize, sizeof(char)),
- gr_make_io_signature(2, 2, (output_symbols ? itemsize * items_per_symbol : itemsize))),
+ ) : block("header_payload_demux",
+ io_signature::make2(1, 2, itemsize, sizeof(char)),
+ io_signature::make(2, 2, (output_symbols ? itemsize * items_per_symbol : itemsize))),
d_header_len(header_len),
d_items_per_symbol(items_per_symbol),
d_gi(guard_interval),
@@ -123,7 +123,8 @@ namespace gr {
int produced_hdr = 0;
int produced_payload = 0;
- while (nread < noutput_items && !exit_loop) {
+ // FIXME ninput_items[1] does not have to be defined O_o
+ while (nread < noutput_items && nread < ninput_items[0] && nread < ninput_items[1] && !exit_loop) {
switch (d_state) {
case STATE_IDLE:
// 1) Search for a trigger signal on input 1 (if present)
@@ -154,6 +155,7 @@ namespace gr {
// 4) fall through to next state
d_remaining_symbols = -1;
if (!parse_header_data_msg()) {
+ d_state = STATE_IDLE;
exit_loop = true;
break;
}
@@ -199,7 +201,7 @@ namespace gr {
}
}
if (d_uses_trigger_tag) {
- std::vector<gr_tag_t> tags;
+ std::vector<tag_t> tags;
get_tags_in_range(tags, 0, nitems_read(0), nitems_read(0)+noutput_items);
uint64_t min_offset = ULLONG_MAX;
int tag_index = -1;
@@ -241,6 +243,8 @@ namespace gr {
}
} else if (pmt::is_null(msg)) { // Blocking call was interrupted
return false;
+ } else if (msg == pmt::PMT_F) { // Header was invalid
+ return false;
} else {
throw std::runtime_error("Received illegal header data");
}
@@ -250,7 +254,7 @@ namespace gr {
void
header_payload_demux_impl::copy_symbol(const unsigned char *&in, unsigned char *&out, int port, int &nread, int &nproduced)
{
- std::vector<gr_tag_t> tags;
+ std::vector<tag_t> tags;
memcpy((void *) out,
(void *) (in + d_gi * d_itemsize),
d_itemsize * d_items_per_symbol
diff --git a/gr-digital/lib/header_payload_demux_impl.h b/gr-digital/lib/header_payload_demux_impl.h
index dc8cc7883a..a11430b175 100644
--- a/gr-digital/lib/header_payload_demux_impl.h
+++ b/gr-digital/lib/header_payload_demux_impl.h
@@ -22,7 +22,7 @@
#ifndef INCLUDED_DIGITAL_HEADER_PAYLOAD_DEMUX_IMPL_H
#define INCLUDED_DIGITAL_HEADER_PAYLOAD_DEMUX_IMPL_H
-#include <digital/header_payload_demux.h>
+#include <gnuradio/digital/header_payload_demux.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/kurtotic_equalizer_cc_impl.cc b/gr-digital/lib/kurtotic_equalizer_cc_impl.cc
index c3be3b5d06..edf2f34452 100644
--- a/gr-digital/lib/kurtotic_equalizer_cc_impl.cc
+++ b/gr-digital/lib/kurtotic_equalizer_cc_impl.cc
@@ -25,7 +25,7 @@
#endif
#include "kurtotic_equalizer_cc_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include <volk/volk.h>
namespace gr {
@@ -39,9 +39,9 @@ namespace gr {
}
kurtotic_equalizer_cc_impl::kurtotic_equalizer_cc_impl(int num_taps, float mu)
- : gr_sync_decimator("kurtotic_equalizer_cc",
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
+ : sync_decimator("kurtotic_equalizer_cc",
+ io_signature::make(1, 1, sizeof(gr_complex)),
+ io_signature::make(1, 1, sizeof(gr_complex)),
1),
filter::kernel::fir_filter_ccc(1, std::vector<gr_complex>(num_taps, gr_complex(0,0)))
{
diff --git a/gr-digital/lib/kurtotic_equalizer_cc_impl.h b/gr-digital/lib/kurtotic_equalizer_cc_impl.h
index 0f2ff23808..cab828d89b 100644
--- a/gr-digital/lib/kurtotic_equalizer_cc_impl.h
+++ b/gr-digital/lib/kurtotic_equalizer_cc_impl.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_DIGITAL_KURTOTIC_EQUALIZER_CC_IMPL_H
#define INCLUDED_DIGITAL_KURTOTIC_EQUALIZER_CC_IMPL_H
-#include <digital/kurtotic_equalizer_cc.h>
-#include <filter/fir_filter.h>
-#include <gr_math.h>
+#include <gnuradio/digital/kurtotic_equalizer_cc.h>
+#include <gnuradio/filter/fir_filter.h>
+#include <gnuradio/math.h>
#include <stdexcept>
namespace gr {
@@ -73,8 +73,8 @@ namespace gr {
(sign(d_u) * (nrm*cnj - 2.0f*d_p*cnj - conj(d_q)*out) -
abs(d_u)*cnj);
- float re = gr_clip(F.real(), 1.0);
- float im = gr_clip(F.imag(), 1.0);
+ float re = gr::clip(F.real(), 1.0);
+ float im = gr::clip(F.imag(), 1.0);
return gr_complex(re, im);
}
diff --git a/gr-digital/lib/lms_dd_equalizer_cc_impl.cc b/gr-digital/lib/lms_dd_equalizer_cc_impl.cc
index 15008ca8e7..530b3aa6fd 100644
--- a/gr-digital/lib/lms_dd_equalizer_cc_impl.cc
+++ b/gr-digital/lib/lms_dd_equalizer_cc_impl.cc
@@ -25,8 +25,8 @@
#endif
#include "lms_dd_equalizer_cc_impl.h"
-#include <gr_io_signature.h>
-#include <gr_misc.h>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/misc.h>
#include <volk/volk.h>
namespace gr {
@@ -45,9 +45,9 @@ namespace gr {
lms_dd_equalizer_cc_impl::lms_dd_equalizer_cc_impl(int num_taps, float mu,
int sps,
constellation_sptr cnst)
- : gr_sync_decimator("lms_dd_equalizer_cc",
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
+ : sync_decimator("lms_dd_equalizer_cc",
+ io_signature::make(1, 1, sizeof(gr_complex)),
+ io_signature::make(1, 1, sizeof(gr_complex)),
sps),
fir_filter_ccc(sps, std::vector<gr_complex>(num_taps, gr_complex(0,0))),
d_new_taps(num_taps, gr_complex(0,0)),
diff --git a/gr-digital/lib/lms_dd_equalizer_cc_impl.h b/gr-digital/lib/lms_dd_equalizer_cc_impl.h
index ca6ba4d84c..a20cf1c170 100644
--- a/gr-digital/lib/lms_dd_equalizer_cc_impl.h
+++ b/gr-digital/lib/lms_dd_equalizer_cc_impl.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_LMS_DD_EQUALIZER_CC_IMPL_H
#define INCLUDED_DIGITAL_LMS_DD_EQUALIZER_CC_IMPL_H
-#include <digital/lms_dd_equalizer_cc.h>
-#include <filter/fir_filter.h>
+#include <gnuradio/digital/lms_dd_equalizer_cc.h>
+#include <gnuradio/filter/fir_filter.h>
#include <stdexcept>
namespace gr {
diff --git a/gr-digital/lib/map_bb_impl.cc b/gr-digital/lib/map_bb_impl.cc
index 4ea91835a9..c4f9209a88 100644
--- a/gr-digital/lib/map_bb_impl.cc
+++ b/gr-digital/lib/map_bb_impl.cc
@@ -25,7 +25,7 @@
#endif
#include "map_bb_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
namespace gr {
namespace digital {
@@ -37,9 +37,9 @@ namespace gr {
}
map_bb_impl::map_bb_impl(const std::vector<int> &map)
- : gr_sync_block("map_bb",
- gr_make_io_signature(1, 1, sizeof(unsigned char)),
- gr_make_io_signature(1, 1, sizeof(unsigned char)))
+ : sync_block("map_bb",
+ io_signature::make(1, 1, sizeof(unsigned char)),
+ io_signature::make(1, 1, sizeof(unsigned char)))
{
set_map(map);
}
diff --git a/gr-digital/lib/map_bb_impl.h b/gr-digital/lib/map_bb_impl.h
index 59f1e834b7..18a82d18e9 100644
--- a/gr-digital/lib/map_bb_impl.h
+++ b/gr-digital/lib/map_bb_impl.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_MAP_BB_IMPL_H
#define INCLUDED_GR_MAP_BB_IMPL_H
-#include <digital/map_bb.h>
-#include <thread/thread.h>
+#include <gnuradio/digital/map_bb.h>
+#include <gnuradio/thread/thread.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/mpsk_receiver_cc_impl.cc b/gr-digital/lib/mpsk_receiver_cc_impl.cc
index ea11b7cdaa..0d7464a0fb 100644
--- a/gr-digital/lib/mpsk_receiver_cc_impl.cc
+++ b/gr-digital/lib/mpsk_receiver_cc_impl.cc
@@ -25,10 +25,9 @@
#endif
#include "mpsk_receiver_cc_impl.h"
-#include <gr_io_signature.h>
-#include <gr_prefs.h>
-#include <gr_math.h>
-#include <gr_expj.h>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
+#include <gnuradio/expj.h>
#include <stdexcept>
namespace gr {
@@ -60,9 +59,9 @@ namespace gr {
float mu, float gain_mu,
float omega, float gain_omega,
float omega_rel)
- : gr_block("mpsk_receiver_cc",
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
- gr_make_io_signature(1, 1, sizeof(gr_complex))),
+ : block("mpsk_receiver_cc",
+ io_signature::make(1, 1, sizeof(gr_complex)),
+ io_signature::make(1, 1, sizeof(gr_complex))),
blocks::control_loop(loop_bw, fmax, fmin),
d_M(M), d_theta(theta),
d_current_const_point(0),
@@ -163,14 +162,14 @@ namespace gr {
float mpsk_receiver_cc_impl::phase_error_detector_generic(gr_complex sample) const
{
- //return gr_fast_atan2f(sample*conj(d_constellation[d_current_const_point]));
+ //return gr::fast_atan2f(sample*conj(d_constellation[d_current_const_point]));
return -arg(sample*conj(d_constellation[d_current_const_point]));
}
unsigned int
mpsk_receiver_cc_impl::decision_bpsk(gr_complex sample) const
{
- return (gr_branchless_binary_slicer(sample.real()) ^ 1);
+ return (gr::branchless_binary_slicer(sample.real()) ^ 1);
//return gr_binary_slicer(sample.real()) ^ 1;
}
@@ -179,8 +178,8 @@ namespace gr {
{
unsigned int index;
- //index = gr_branchless_quad_0deg_slicer(sample);
- index = gr_quad_0deg_slicer(sample);
+ //index = gr::branchless_quad_0deg_slicer(sample);
+ index = gr::quad_0deg_slicer(sample);
return index;
}
@@ -257,10 +256,10 @@ namespace gr {
y = (d_p_0T - d_p_2T) * conj(d_c_1T);
u = y - x;
mm_error = u.real(); // the error signal is in the real part
- mm_error = gr_branchless_clip(mm_error, 1.0); // limit mm_val
+ mm_error = gr::branchless_clip(mm_error, 1.0); // limit mm_val
d_omega = d_omega + d_gain_omega * mm_error; // update omega based on loop error
- d_omega = d_omega_mid + gr_branchless_clip(d_omega-d_omega_mid, d_omega_rel); // make sure we don't walk away
+ d_omega = d_omega_mid + gr::branchless_clip(d_omega-d_omega_mid, d_omega_rel); // make sure we don't walk away
d_mu += d_omega + d_gain_mu * mm_error; // update mu based on loop error
diff --git a/gr-digital/lib/mpsk_receiver_cc_impl.h b/gr-digital/lib/mpsk_receiver_cc_impl.h
index ed53d0f2e4..f17f88cb98 100644
--- a/gr-digital/lib/mpsk_receiver_cc_impl.h
+++ b/gr-digital/lib/mpsk_receiver_cc_impl.h
@@ -23,12 +23,12 @@
#ifndef INCLUDED_DIGITAL_MPSK_RECEIVER_CC_IMPL_H
#define INCLUDED_DIGITAL_MPSK_RECEIVER_CC_IMPL_H
-#include <digital/mpsk_receiver_cc.h>
-#include <attributes.h>
-#include <blocks/control_loop.h>
-#include <gr_complex.h>
+#include <gnuradio/digital/mpsk_receiver_cc.h>
+#include <gnuradio/attributes.h>
+#include <gnuradio/blocks/control_loop.h>
+#include <gnuradio/gr_complex.h>
#include <fstream>
-#include <filter/mmse_fir_interpolator_cc.h>
+#include <gnuradio/filter/mmse_fir_interpolator_cc.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/mpsk_snr_est.cc b/gr-digital/lib/mpsk_snr_est.cc
index 9b52334806..6edb0274f5 100644
--- a/gr-digital/lib/mpsk_snr_est.cc
+++ b/gr-digital/lib/mpsk_snr_est.cc
@@ -24,7 +24,7 @@
#include <config.h>
#endif
-#include <digital/mpsk_snr_est.h>
+#include <gnuradio/digital/mpsk_snr_est.h>
#include <stdexcept>
#include <cstdio>
diff --git a/gr-digital/lib/mpsk_snr_est_cc_impl.cc b/gr-digital/lib/mpsk_snr_est_cc_impl.cc
index 6d11dd315c..07a411e4c5 100644
--- a/gr-digital/lib/mpsk_snr_est_cc_impl.cc
+++ b/gr-digital/lib/mpsk_snr_est_cc_impl.cc
@@ -25,7 +25,7 @@
#endif
#include "mpsk_snr_est_cc_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include <cstdio>
namespace gr {
@@ -43,9 +43,9 @@ namespace gr {
mpsk_snr_est_cc_impl::mpsk_snr_est_cc_impl(snr_est_type_t type,
int tag_nsamples,
double alpha)
- : gr_sync_block("mpsk_snr_est_cc",
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
- gr_make_io_signature(1, 1, sizeof(gr_complex)))
+ : sync_block("mpsk_snr_est_cc",
+ io_signature::make(1, 1, sizeof(gr_complex)),
+ io_signature::make(1, 1, sizeof(gr_complex)))
{
d_snr_est = NULL;
diff --git a/gr-digital/lib/mpsk_snr_est_cc_impl.h b/gr-digital/lib/mpsk_snr_est_cc_impl.h
index 530d223aec..36a6daa9d0 100644
--- a/gr-digital/lib/mpsk_snr_est_cc_impl.h
+++ b/gr-digital/lib/mpsk_snr_est_cc_impl.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_DIGITAL_MPSK_SNR_EST_CC_IMPL_H
#define INCLUDED_DIGITAL_MPSK_SNR_EST_CC_IMPL_H
-#include <digital/api.h>
-#include <digital/mpsk_snr_est_cc.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/api.h>
+#include <gnuradio/digital/mpsk_snr_est_cc.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc b/gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc
index afeb10e1d5..467718e424 100644
--- a/gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc
+++ b/gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc
@@ -24,7 +24,7 @@
#include "config.h"
#endif
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include "ofdm_carrier_allocator_cvc_impl.h"
namespace gr {
@@ -62,9 +62,9 @@ namespace gr {
const std::vector<std::vector<gr_complex> > &sync_words,
const std::string &len_tag_key,
const bool output_is_shifted
- ) : gr_tagged_stream_block("ofdm_carrier_allocator_cvc",
- gr_make_io_signature(1, 1, sizeof (gr_complex)),
- gr_make_io_signature(1, 1, sizeof (gr_complex) * fft_len), len_tag_key),
+ ) : tagged_stream_block("ofdm_carrier_allocator_cvc",
+ io_signature::make(1, 1, sizeof (gr_complex)),
+ io_signature::make(1, 1, sizeof (gr_complex) * fft_len), len_tag_key),
d_fft_len(fft_len),
d_occupied_carriers(occupied_carriers),
d_pilot_carriers(pilot_carriers),
@@ -140,7 +140,7 @@ namespace gr {
{
const gr_complex *in = (const gr_complex *) input_items[0];
gr_complex *out = (gr_complex *) output_items[0];
- std::vector<gr_tag_t> tags;
+ std::vector<tag_t> tags;
memset((void *) out, 0x00, sizeof(gr_complex) * d_fft_len * noutput_items);
// Copy Sync word
diff --git a/gr-digital/lib/ofdm_carrier_allocator_cvc_impl.h b/gr-digital/lib/ofdm_carrier_allocator_cvc_impl.h
index 6e478b3389..8599355ebb 100644
--- a/gr-digital/lib/ofdm_carrier_allocator_cvc_impl.h
+++ b/gr-digital/lib/ofdm_carrier_allocator_cvc_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_DIGITAL_OFDM_CARRIER_ALLOCATOR_CVC_IMPL_H
#define INCLUDED_DIGITAL_OFDM_CARRIER_ALLOCATOR_CVC_IMPL_H
-#include <digital/ofdm_carrier_allocator_cvc.h>
+#include <gnuradio/digital/ofdm_carrier_allocator_cvc.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/ofdm_chanest_vcvc_impl.cc b/gr-digital/lib/ofdm_chanest_vcvc_impl.cc
index d0d8faba59..f8aebec60d 100644
--- a/gr-digital/lib/ofdm_chanest_vcvc_impl.cc
+++ b/gr-digital/lib/ofdm_chanest_vcvc_impl.cc
@@ -24,7 +24,7 @@
#include "config.h"
#endif
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include "ofdm_chanest_vcvc_impl.h"
namespace gr {
@@ -45,10 +45,16 @@ namespace gr {
);
}
- ofdm_chanest_vcvc_impl::ofdm_chanest_vcvc_impl(const std::vector<gr_complex> &sync_symbol1, const std::vector<gr_complex> &sync_symbol2, int n_data_symbols, int eq_noise_red_len, int max_carr_offset, bool force_one_sync_symbol)
- : gr_block("ofdm_chanest_vcvc",
- gr_make_io_signature(1, 1, sizeof (gr_complex) * sync_symbol1.size()),
- gr_make_io_signature(1, 1, sizeof (gr_complex) * sync_symbol1.size())),
+ ofdm_chanest_vcvc_impl::ofdm_chanest_vcvc_impl(
+ const std::vector<gr_complex> &sync_symbol1,
+ const std::vector<gr_complex> &sync_symbol2,
+ int n_data_symbols,
+ int eq_noise_red_len,
+ int max_carr_offset,
+ bool force_one_sync_symbol
+ ) : block("ofdm_chanest_vcvc",
+ io_signature::make(1, 1, sizeof (gr_complex) * sync_symbol1.size()),
+ io_signature::make(1, 2, sizeof (gr_complex) * sync_symbol1.size())),
d_fft_len(sync_symbol1.size()),
d_n_data_syms(n_data_symbols),
d_n_sync_syms(1),
@@ -197,13 +203,13 @@ namespace gr {
}
for (int i = loop_start; i < loop_end; i++) {
if ((d_ref_sym[i-carr_offset] != gr_complex(0, 0))) {
- taps[i] = sym[i] / d_ref_sym[i-carr_offset];
+ taps[i-carr_offset] = sym[i] / d_ref_sym[i-carr_offset];
}
}
if (d_interpolate) {
for (int i = d_first_active_carrier + 1; i < d_last_active_carrier; i += 2) {
- taps[i] = (taps[i-1] + taps[i+1]) / gr_complex(2.0, 0);
+ taps[i] = taps[i-1];
}
taps[d_last_active_carrier] = taps[d_last_active_carrier-1];
}
@@ -217,6 +223,13 @@ namespace gr {
}
+ // 1) Go through all the frames available on the input buffer
+ // 2) Estimate the coarse freq. offset and the eq. taps from the
+ // input symbol(s)
+ // 3) Copy the data symbols to the output
+ // 4) Copy all other tags onto the output. A tag that was on
+ // a sync symbol is copied onto the first data symbol.
+ // 5) Add the new tags for carrier offset and eq. taps
int
ofdm_chanest_vcvc_impl::general_work (int noutput_items,
gr_vector_int &ninput_items,
@@ -235,37 +248,45 @@ namespace gr {
std::vector<gr_complex> chan_taps(d_fft_len, 0);
get_chan_taps(in, in+d_fft_len, carr_offset, chan_taps);
+ if (output_items.size() == 2) {
+ gr_complex *out_chantaps = ((gr_complex *) output_items[1]) + i * d_fft_len;
+ memcpy((void *) out_chantaps, (void *) &chan_taps[0], sizeof(gr_complex) * d_fft_len);
+ produce(1, 1);
+ }
+
memcpy((void *) out,
(void *) &in[d_n_sync_syms * d_fft_len],
sizeof(gr_complex) * d_fft_len * d_n_data_syms);
in += framesize * d_fft_len;
out += d_n_data_syms * d_fft_len;
- std::vector<gr_tag_t> tags;
- this->get_tags_in_range(tags, 0,
- this->nitems_read(0)+i*framesize,
- this->nitems_read(0)+(i+1)*framesize);
+ std::vector<tag_t> tags;
+ get_tags_in_range(tags, 0,
+ nitems_read(0)+i*framesize,
+ nitems_read(0)+(i+1)*framesize);
+
for (unsigned t = 0; t < tags.size(); t++) {
- int offset = tags[t].offset - (this->nitems_read(0) + i*framesize);
+ int offset = tags[t].offset - (nitems_read(0) + i*framesize);
if (offset < d_n_sync_syms) {
offset = 0;
} else {
offset -= d_n_sync_syms;
}
- tags[t].offset = offset + this->nitems_written(0) + i*d_n_data_syms;
- this->add_item_tag(0, tags[t]);
+ tags[t].offset = offset + nitems_written(0) + i*d_n_data_syms;
+ add_item_tag(0, tags[t]);
}
- this->add_item_tag(0, this->nitems_written(0) + i*d_n_data_syms,
+ add_item_tag(0, nitems_written(0) + i*d_n_data_syms,
pmt::string_to_symbol("ofdm_sync_carr_offset"),
pmt::from_long(carr_offset));
- this->add_item_tag(0, this->nitems_written(0) + i*d_n_data_syms,
+ add_item_tag(0, nitems_written(0) + i*d_n_data_syms,
pmt::string_to_symbol("ofdm_sync_chan_taps"),
pmt::init_c32vector(d_fft_len, chan_taps));
}
-
+ produce(0, n_frames * d_n_data_syms);
consume_each(n_frames * framesize);
- return n_frames * d_n_data_syms;
+
+ return WORK_CALLED_PRODUCE;
}
} /* namespace digital */
diff --git a/gr-digital/lib/ofdm_chanest_vcvc_impl.h b/gr-digital/lib/ofdm_chanest_vcvc_impl.h
index def8734e64..9a21fbdf87 100644
--- a/gr-digital/lib/ofdm_chanest_vcvc_impl.h
+++ b/gr-digital/lib/ofdm_chanest_vcvc_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_DIGITAL_OFDM_CHANEST_VCVC_IMPL_H
#define INCLUDED_DIGITAL_OFDM_CHANEST_VCVC_IMPL_H
-#include <digital/ofdm_chanest_vcvc.h>
+#include <gnuradio/digital/ofdm_chanest_vcvc.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/ofdm_cyclic_prefixer_impl.cc b/gr-digital/lib/ofdm_cyclic_prefixer_impl.cc
index d48c5f7e45..9db7273e26 100644
--- a/gr-digital/lib/ofdm_cyclic_prefixer_impl.cc
+++ b/gr-digital/lib/ofdm_cyclic_prefixer_impl.cc
@@ -24,7 +24,7 @@
#include "config.h"
#endif
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include "ofdm_cyclic_prefixer_impl.h"
namespace gr {
@@ -38,9 +38,9 @@ namespace gr {
ofdm_cyclic_prefixer_impl::ofdm_cyclic_prefixer_impl(size_t input_size, size_t output_size, int rolloff_len, const std::string &len_tag_key)
- : gr_tagged_stream_block ("ofdm_cyclic_prefixer",
- gr_make_io_signature (1, 1, input_size*sizeof(gr_complex)),
- gr_make_io_signature (1, 1, sizeof(gr_complex)),
+ : tagged_stream_block ("ofdm_cyclic_prefixer",
+ io_signature::make (1, 1, input_size*sizeof(gr_complex)),
+ io_signature::make (1, 1, sizeof(gr_complex)),
len_tag_key),
d_fft_len(input_size),
d_output_size(output_size),
@@ -140,7 +140,7 @@ namespace gr {
}
d_delay_line.assign(d_delay_line.size(), 0);
}
- std::vector<gr_tag_t> tags;
+ std::vector<tag_t> tags;
get_tags_in_range(
tags, 0,
nitems_read(0), nitems_read(0)+symbols_to_read
diff --git a/gr-digital/lib/ofdm_cyclic_prefixer_impl.h b/gr-digital/lib/ofdm_cyclic_prefixer_impl.h
index 5a5766f131..936fe995f4 100644
--- a/gr-digital/lib/ofdm_cyclic_prefixer_impl.h
+++ b/gr-digital/lib/ofdm_cyclic_prefixer_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_DIGITAL_OFDM_CYCLIC_PREFIXER_IMPL_H
#define INCLUDED_DIGITAL_OFDM_CYCLIC_PREFIXER_IMPL_H
-#include <digital/ofdm_cyclic_prefixer.h>
+#include <gnuradio/digital/ofdm_cyclic_prefixer.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/ofdm_equalizer_base.cc b/gr-digital/lib/ofdm_equalizer_base.cc
index 5209b09c29..27ba9e99e9 100644
--- a/gr-digital/lib/ofdm_equalizer_base.cc
+++ b/gr-digital/lib/ofdm_equalizer_base.cc
@@ -23,15 +23,14 @@
#include "config.h"
#endif
-#include <digital/ofdm_equalizer_base.h>
+#include <gnuradio/digital/ofdm_equalizer_base.h>
namespace gr {
namespace digital {
// *** Base class ****************************************************
ofdm_equalizer_base::ofdm_equalizer_base(int fft_len) :
- d_fft_len(fft_len),
- d_carr_offset(0)
+ d_fft_len(fft_len)
{
}
@@ -54,7 +53,7 @@ namespace gr {
d_pilot_carriers(pilot_carriers.size(), std::vector<bool>(fft_len, false)),
d_pilot_symbols(pilot_symbols.size(), std::vector<gr_complex>(fft_len, gr_complex(0, 0))),
d_symbols_skipped(symbols_skipped),
- d_pilot_carr_set(symbols_skipped),
+ d_pilot_carr_set(pilot_carriers.empty() ? 0 : symbols_skipped % pilot_carriers.size()),
d_channel_state(fft_len, gr_complex(1, 0))
{
int fft_shift_width = 0;
@@ -107,7 +106,7 @@ namespace gr {
ofdm_equalizer_1d_pilots::reset()
{
std::fill(d_channel_state.begin(), d_channel_state.end(), gr_complex(1, 0));
- d_pilot_carr_set = d_symbols_skipped;
+ d_pilot_carr_set = d_pilot_carriers.empty() ? 0 : d_symbols_skipped % d_pilot_carriers.size();
}
diff --git a/gr-digital/lib/ofdm_equalizer_simpledfe.cc b/gr-digital/lib/ofdm_equalizer_simpledfe.cc
index fcb0e18cbf..9483683a25 100644
--- a/gr-digital/lib/ofdm_equalizer_simpledfe.cc
+++ b/gr-digital/lib/ofdm_equalizer_simpledfe.cc
@@ -23,7 +23,7 @@
#include "config.h"
#endif
-#include <digital/ofdm_equalizer_simpledfe.h>
+#include <gnuradio/digital/ofdm_equalizer_simpledfe.h>
namespace gr {
namespace digital {
@@ -78,7 +78,7 @@ namespace gr {
ofdm_equalizer_simpledfe::equalize(gr_complex *frame,
int n_sym,
const std::vector<gr_complex> &initial_taps,
- const std::vector<gr_tag_t> &tags)
+ const std::vector<tag_t> &tags)
{
if (!initial_taps.empty()) {
d_channel_state = initial_taps;
@@ -90,10 +90,10 @@ namespace gr {
if (!d_occupied_carriers[k]) {
continue;
}
- if (d_pilot_carriers.size() && d_pilot_carriers[d_pilot_carr_set][k-d_carr_offset]) {
+ if (!d_pilot_carriers.empty() && d_pilot_carriers[d_pilot_carr_set][k]) {
d_channel_state[k] = d_alpha * d_channel_state[k]
- + (1-d_alpha) * frame[i*d_fft_len + k] / d_pilot_symbols[d_pilot_carr_set][k-d_carr_offset];
- frame[i*d_fft_len+k] = d_pilot_symbols[d_pilot_carr_set][k-d_carr_offset];
+ + (1-d_alpha) * frame[i*d_fft_len + k] / d_pilot_symbols[d_pilot_carr_set][k];
+ frame[i*d_fft_len+k] = d_pilot_symbols[d_pilot_carr_set][k];
} else {
sym_eq = frame[i*d_fft_len+k] / d_channel_state[k];
d_constellation->map_to_points(d_constellation->decision_maker(&sym_eq), &sym_est);
@@ -101,7 +101,9 @@ namespace gr {
frame[i*d_fft_len+k] = sym_est;
}
}
- d_pilot_carr_set = (d_pilot_carr_set + 1) % d_pilot_carriers.size();
+ if (!d_pilot_carriers.empty()) {
+ d_pilot_carr_set = (d_pilot_carr_set + 1) % d_pilot_carriers.size();
+ }
}
}
diff --git a/gr-digital/lib/ofdm_equalizer_static.cc b/gr-digital/lib/ofdm_equalizer_static.cc
index 8601eff430..a407fe9413 100644
--- a/gr-digital/lib/ofdm_equalizer_static.cc
+++ b/gr-digital/lib/ofdm_equalizer_static.cc
@@ -23,7 +23,7 @@
#include "config.h"
#endif
-#include <digital/ofdm_equalizer_static.h>
+#include <gnuradio/digital/ofdm_equalizer_static.h>
namespace gr {
namespace digital {
@@ -70,7 +70,7 @@ namespace gr {
ofdm_equalizer_static::equalize(gr_complex *frame,
int n_sym,
const std::vector<gr_complex> &initial_taps,
- const std::vector<gr_tag_t> &tags)
+ const std::vector<tag_t> &tags)
{
d_channel_state = initial_taps;
@@ -79,9 +79,9 @@ namespace gr {
if (!d_occupied_carriers[k]) {
continue;
}
- if (d_pilot_carriers.size() && d_pilot_carriers[d_pilot_carr_set][k-d_carr_offset]) {
- d_channel_state[k] = frame[i*d_fft_len + k] / d_pilot_symbols[d_pilot_carr_set][k-d_carr_offset];
- frame[i*d_fft_len+k] = d_pilot_symbols[d_pilot_carr_set][k-d_carr_offset];
+ if (!d_pilot_carriers.empty() && d_pilot_carriers[d_pilot_carr_set][k]) {
+ d_channel_state[k] = frame[i*d_fft_len + k] / d_pilot_symbols[d_pilot_carr_set][k];
+ frame[i*d_fft_len+k] = d_pilot_symbols[d_pilot_carr_set][k];
} else {
frame[i*d_fft_len+k] /= d_channel_state[k];
}
diff --git a/gr-digital/lib/ofdm_frame_acquisition_impl.cc b/gr-digital/lib/ofdm_frame_acquisition_impl.cc
index 1f45338d8f..2c2d6eff7a 100644
--- a/gr-digital/lib/ofdm_frame_acquisition_impl.cc
+++ b/gr-digital/lib/ofdm_frame_acquisition_impl.cc
@@ -25,9 +25,9 @@
#endif
#include "ofdm_frame_acquisition_impl.h"
-#include <gr_io_signature.h>
-#include <gr_expj.h>
-#include <gr_math.h>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/expj.h>
+#include <gnuradio/math.h>
#include <cstdio>
namespace gr {
@@ -54,9 +54,9 @@ namespace gr {
unsigned int cplen,
const std::vector<gr_complex> &known_symbol,
unsigned int max_fft_shift_len)
- : gr_block("ofdm_frame_acquisition",
- gr_make_io_signature2(2, 2, sizeof(gr_complex)*fft_length, sizeof(char)*fft_length),
- gr_make_io_signature2(2, 2, sizeof(gr_complex)*occupied_carriers, sizeof(char))),
+ : block("ofdm_frame_acquisition",
+ io_signature::make2(2, 2, sizeof(gr_complex)*fft_length, sizeof(char)*fft_length),
+ io_signature::make2(2, 2, sizeof(gr_complex)*occupied_carriers, sizeof(char))),
d_occupied_carriers(occupied_carriers),
d_fft_length(fft_length),
d_cplen(cplen),
diff --git a/gr-digital/lib/ofdm_frame_acquisition_impl.h b/gr-digital/lib/ofdm_frame_acquisition_impl.h
index 867d86736f..a28fc7177d 100644
--- a/gr-digital/lib/ofdm_frame_acquisition_impl.h
+++ b/gr-digital/lib/ofdm_frame_acquisition_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_DIGITAL_OFDM_FRAME_ACQUISITION_IMPL_H
#define INCLUDED_DIGITAL_OFDM_FRAME_ACQUISITION_IMPL_H
-#include <digital/ofdm_frame_acquisition.h>
+#include <gnuradio/digital/ofdm_frame_acquisition.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc b/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc
index 68050f24b1..4446306a8b 100644
--- a/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc
+++ b/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc
@@ -23,15 +23,19 @@
#include "config.h"
#endif
-#include <gr_io_signature.h>
+#include <gnuradio/expj.h>
+#include <gnuradio/io_signature.h>
#include "ofdm_frame_equalizer_vcvc_impl.h"
+#define M_TWOPI (2*M_PI)
+
namespace gr {
namespace digital {
ofdm_frame_equalizer_vcvc::sptr
ofdm_frame_equalizer_vcvc::make(
ofdm_equalizer_base::sptr equalizer,
+ int cp_len,
const std::string &len_tag_key,
bool propagate_channel_state,
int fixed_frame_len
@@ -39,41 +43,65 @@ namespace gr {
{
return gnuradio::get_initial_sptr (
new ofdm_frame_equalizer_vcvc_impl(
- equalizer, len_tag_key, propagate_channel_state, fixed_frame_len
+ equalizer, cp_len, len_tag_key, propagate_channel_state, fixed_frame_len
)
);
}
ofdm_frame_equalizer_vcvc_impl::ofdm_frame_equalizer_vcvc_impl(
ofdm_equalizer_base::sptr equalizer,
+ int cp_len,
const std::string &len_tag_key,
bool propagate_channel_state,
int fixed_frame_len
- ) : gr_tagged_stream_block("ofdm_frame_equalizer_vcvc",
- gr_make_io_signature(1, 1, sizeof (gr_complex) * equalizer->fft_len()),
- gr_make_io_signature(1, 1, sizeof (gr_complex) * equalizer->fft_len()),
+ ) : tagged_stream_block("ofdm_frame_equalizer_vcvc",
+ io_signature::make(1, 1, sizeof (gr_complex) * equalizer->fft_len()),
+ io_signature::make(1, 1, sizeof (gr_complex) * equalizer->fft_len()),
len_tag_key),
d_fft_len(equalizer->fft_len()),
+ d_cp_len(cp_len),
d_eq(equalizer),
d_propagate_channel_state(propagate_channel_state),
- d_fixed_frame_len(len_tag_key.empty() ? fixed_frame_len : 0),
+ d_fixed_frame_len(fixed_frame_len),
d_channel_state(equalizer->fft_len(), gr_complex(1, 0))
{
+ if (len_tag_key.empty() && fixed_frame_len == 0) {
+ throw std::invalid_argument("Either specify a length tag or a frame length!");
+ }
+ if (d_fixed_frame_len < 0) {
+ throw std::invalid_argument("Invalid frame length!");
+ }
if (d_fixed_frame_len) {
set_output_multiple(d_fixed_frame_len);
}
+ set_relative_rate(1.0);
}
ofdm_frame_equalizer_vcvc_impl::~ofdm_frame_equalizer_vcvc_impl()
{
}
+ void
+ ofdm_frame_equalizer_vcvc_impl::parse_length_tags(
+ const std::vector<std::vector<tag_t> > &tags,
+ gr_vector_int &n_input_items_reqd
+ ){
+ if (d_fixed_frame_len) {
+ n_input_items_reqd[0] = d_fixed_frame_len;
+ } else {
+ for (unsigned k = 0; k < tags[0].size(); k++) {
+ if (tags[0][k].key == pmt::string_to_symbol(d_length_tag_key_str)) {
+ n_input_items_reqd[0] = pmt::to_long(tags[0][k].value);
+ remove_item_tag(0, tags[0][k]);
+ }
+ }
+ }
+ }
+
int
ofdm_frame_equalizer_vcvc_impl::work(int noutput_items,
- gr_vector_int &ninput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
+ gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
const gr_complex *in = (const gr_complex *) input_items[0];
gr_complex *out = (gr_complex *) output_items[0];
@@ -85,27 +113,61 @@ namespace gr {
frame_len = ninput_items[0];
}
- std::vector<gr_tag_t> tags;
+ std::vector<tag_t> tags;
get_tags_in_range(tags, 0, nitems_read(0), nitems_read(0)+1);
for (unsigned i = 0; i < tags.size(); i++) {
if (pmt::symbol_to_string(tags[i].key) == "ofdm_sync_chan_taps") {
d_channel_state = pmt::c32vector_elements(tags[i].value);
remove_item_tag(0, tags[i]);
}
+ if (pmt::symbol_to_string(tags[i].key) == "ofdm_sync_carr_offset") {
+ carrier_offset = pmt::to_long(tags[i].value);
+ }
}
- memcpy((void *) out, (void *) in, sizeof(gr_complex) * d_fft_len * frame_len);
+ // Copy the frame and the channel state vector such that the symbols are shifted to the correct position
+ if (carrier_offset < 0) {
+ memset((void *) out, 0x00, sizeof(gr_complex) * (-carrier_offset));
+ memcpy(
+ (void *) &out[-carrier_offset], (void *) in,
+ sizeof(gr_complex) * (d_fft_len * frame_len + carrier_offset)
+ );
+ } else {
+ memset((void *) (out + d_fft_len * frame_len - carrier_offset), 0x00, sizeof(gr_complex) * carrier_offset);
+ memcpy(
+ (void *) out, (void *) (in+carrier_offset),
+ sizeof(gr_complex) * (d_fft_len * frame_len - carrier_offset)
+ );
+ }
+
+ // Correct the frequency shift on the symbols
+ gr_complex phase_correction;
+ for (int i = 0; i < frame_len; i++) {
+ phase_correction = gr_expj(-M_TWOPI * carrier_offset * d_cp_len / d_fft_len * (i+1));
+ for (int k = 0; k < d_fft_len; k++) {
+ out[i*d_fft_len+k] *= phase_correction;
+ }
+ }
+
+ // Do the equalizing
d_eq->reset();
- d_eq->set_carrier_offset(carrier_offset);
d_eq->equalize(out, frame_len, d_channel_state);
d_eq->get_channel_state(d_channel_state);
+
+ // Update the channel state regarding the frequency offset
+ phase_correction = gr_expj(M_TWOPI * carrier_offset * d_cp_len / d_fft_len * frame_len);
+ for (int k = 0; k < d_fft_len; k++) {
+ d_channel_state[k] *= phase_correction;
+ }
+
+ // Housekeeping
if (d_propagate_channel_state) {
add_item_tag(0, nitems_written(0),
pmt::string_to_symbol("ofdm_sync_chan_taps"),
pmt::init_c32vector(d_fft_len, d_channel_state));
}
- if (d_fixed_frame_len) {
+ if (d_fixed_frame_len && d_length_tag_key_str.empty()) {
consume_each(frame_len);
}
diff --git a/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.h b/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.h
index 81789e22c4..77dae39e1b 100644
--- a/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.h
+++ b/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.h
@@ -22,7 +22,7 @@
#ifndef INCLUDED_DIGITAL_OFDM_FRAME_EQUALIZER_VCVC_IMPL_H
#define INCLUDED_DIGITAL_OFDM_FRAME_EQUALIZER_VCVC_IMPL_H
-#include <digital/ofdm_frame_equalizer_vcvc.h>
+#include <gnuradio/digital/ofdm_frame_equalizer_vcvc.h>
namespace gr {
namespace digital {
@@ -31,19 +31,22 @@ namespace gr {
{
private:
const int d_fft_len;
+ const int d_cp_len;
ofdm_equalizer_base::sptr d_eq;
bool d_propagate_channel_state;
const int d_fixed_frame_len;
std::vector<gr_complex> d_channel_state;
protected:
- // These aren't really necessary, so let's override them with nuthin'
- void remove_length_tags(const std::vector<std::vector<gr_tag_t> > &tags) {};
- void update_length_tags(int n_produced, int n_ports) {};
+ void parse_length_tags(
+ const std::vector<std::vector<tag_t> > &tags,
+ gr_vector_int &n_input_items_reqd
+ );
public:
ofdm_frame_equalizer_vcvc_impl(
ofdm_equalizer_base::sptr equalizer,
+ int cp_len,
const std::string &len_tag_key,
bool propagate_channel_state,
int fixed_frame_len
diff --git a/gr-digital/lib/ofdm_frame_sink_impl.cc b/gr-digital/lib/ofdm_frame_sink_impl.cc
index d2f00d3a45..b2e4f44ec9 100644
--- a/gr-digital/lib/ofdm_frame_sink_impl.cc
+++ b/gr-digital/lib/ofdm_frame_sink_impl.cc
@@ -25,9 +25,9 @@
#endif
#include "ofdm_frame_sink_impl.h"
-#include <gr_io_signature.h>
-#include <gr_expj.h>
-#include <gr_math.h>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/expj.h>
+#include <gnuradio/math.h>
#include <cmath>
#include <cstdio>
#include <stdexcept>
@@ -186,7 +186,7 @@ namespace gr {
ofdm_frame_sink::sptr
ofdm_frame_sink::make(const std::vector<gr_complex> &sym_position,
const std::vector<char> &sym_value_out,
- gr_msg_queue_sptr target_queue,
+ msg_queue::sptr target_queue,
int occupied_carriers,
float phase_gain, float freq_gain)
{
@@ -198,12 +198,12 @@ namespace gr {
ofdm_frame_sink_impl::ofdm_frame_sink_impl(const std::vector<gr_complex> &sym_position,
const std::vector<char> &sym_value_out,
- gr_msg_queue_sptr target_queue,
+ msg_queue::sptr target_queue,
int occupied_carriers,
float phase_gain, float freq_gain)
- : gr_sync_block("ofdm_frame_sink",
- gr_make_io_signature2(2, 2, sizeof(gr_complex)*occupied_carriers, sizeof(char)),
- gr_make_io_signature(1, 1, sizeof(gr_complex)*occupied_carriers)),
+ : sync_block("ofdm_frame_sink",
+ io_signature::make2(2, 2, sizeof(gr_complex)*occupied_carriers, sizeof(char)),
+ io_signature::make(1, 1, sizeof(gr_complex)*occupied_carriers)),
d_target_queue(target_queue), d_occupied_carriers(occupied_carriers),
d_byte_offset(0), d_partial_byte(0),
d_resid(0), d_nresid(0),d_phase(0),d_freq(0),
@@ -357,8 +357,8 @@ namespace gr {
}
if(d_packetlen_cnt == d_packetlen) {
- gr_message_sptr msg =
- gr_make_message(0, d_packet_whitener_offset, 0, d_packetlen);
+ message::sptr msg =
+ message::make(0, d_packet_whitener_offset, 0, d_packetlen);
memcpy(msg->msg(), d_packet, d_packetlen_cnt);
d_target_queue->insert_tail(msg); // send it
msg.reset(); // free it up
@@ -389,8 +389,8 @@ namespace gr {
if (d_packetlen_cnt == d_packetlen){ // packet is filled
// build a message
// NOTE: passing header field as arg1 is not scalable
- gr_message_sptr msg =
- gr_make_message(0, d_packet_whitener_offset, 0, d_packetlen_cnt);
+ message::sptr msg =
+ message::make(0, d_packet_whitener_offset, 0, d_packetlen_cnt);
memcpy(msg->msg(), d_packet, d_packetlen_cnt);
d_target_queue->insert_tail(msg); // send it
diff --git a/gr-digital/lib/ofdm_frame_sink_impl.h b/gr-digital/lib/ofdm_frame_sink_impl.h
index 49d5d6b5c0..4f16a29701 100644
--- a/gr-digital/lib/ofdm_frame_sink_impl.h
+++ b/gr-digital/lib/ofdm_frame_sink_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_DIGITAL_OFDM_FRAME_SINK_IMPL_H
#define INCLUDED_DIGITAL_OFDM_FRAME_SINK_IMPL_H
-#include <digital/ofdm_frame_sink.h>
+#include <gnuradio/digital/ofdm_frame_sink.h>
namespace gr {
namespace digital {
@@ -36,7 +36,7 @@ namespace gr {
static const int MAX_PKT_LEN = 4096;
static const int HEADERBYTELEN = 4;
- gr_msg_queue_sptr d_target_queue; // where to send the packet when received
+ msg_queue::sptr d_target_queue; // where to send the packet when received
state_t d_state;
unsigned int d_header; // header bits
int d_headerbytelen_cnt; // how many so far
@@ -90,7 +90,7 @@ namespace gr {
public:
ofdm_frame_sink_impl(const std::vector<gr_complex> &sym_position,
const std::vector<char> &sym_value_out,
- gr_msg_queue_sptr target_queue,
+ msg_queue::sptr target_queue,
int occupied_tones,
float phase_gain=0.25, float freq_gain=0.25*0.25/4);
~ofdm_frame_sink_impl();
diff --git a/gr-digital/lib/ofdm_insert_preamble_impl.cc b/gr-digital/lib/ofdm_insert_preamble_impl.cc
index 100e69e22c..dcc3a900a4 100644
--- a/gr-digital/lib/ofdm_insert_preamble_impl.cc
+++ b/gr-digital/lib/ofdm_insert_preamble_impl.cc
@@ -24,7 +24,7 @@
#endif
#include "ofdm_insert_preamble_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include <stdexcept>
#include <iostream>
#include <string>
@@ -42,11 +42,11 @@ namespace gr {
ofdm_insert_preamble_impl::ofdm_insert_preamble_impl(int fft_length,
const std::vector<std::vector<gr_complex> > &preamble)
- : gr_block("ofdm_insert_preamble",
- gr_make_io_signature2(1, 2,
+ : block("ofdm_insert_preamble",
+ io_signature::make2(1, 2,
sizeof(gr_complex)*fft_length,
sizeof(char)),
- gr_make_io_signature2(1, 2,
+ io_signature::make2(1, 2,
sizeof(gr_complex)*fft_length,
sizeof(char))),
d_fft_length(fft_length),
diff --git a/gr-digital/lib/ofdm_insert_preamble_impl.h b/gr-digital/lib/ofdm_insert_preamble_impl.h
index cd47810daf..f926d1a16b 100644
--- a/gr-digital/lib/ofdm_insert_preamble_impl.h
+++ b/gr-digital/lib/ofdm_insert_preamble_impl.h
@@ -22,7 +22,7 @@
#ifndef INCLUDED_DIGITAL_OFDM_INSERT_PREAMBLE_IMPL_H
#define INCLUDED_DIGITAL_OFDM_INSERT_PREAMBLE_IMPL_H
-#include <digital/ofdm_insert_preamble.h>
+#include <gnuradio/digital/ofdm_insert_preamble.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/ofdm_mapper_bcv_impl.cc b/gr-digital/lib/ofdm_mapper_bcv_impl.cc
index 5b5359d7b9..b241a3be71 100644
--- a/gr-digital/lib/ofdm_mapper_bcv_impl.cc
+++ b/gr-digital/lib/ofdm_mapper_bcv_impl.cc
@@ -25,7 +25,7 @@
#endif
#include "ofdm_mapper_bcv_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include <stdexcept>
#include <string>
@@ -49,11 +49,11 @@ namespace gr {
unsigned int msgq_limit,
unsigned int occupied_carriers,
unsigned int fft_length)
- : gr_sync_block("ofdm_mapper_bcv",
- gr_make_io_signature(0, 0, 0),
- gr_make_io_signature2(1, 2, sizeof(gr_complex)*fft_length, sizeof(char))),
+ : sync_block("ofdm_mapper_bcv",
+ io_signature::make(0, 0, 0),
+ io_signature::make2(1, 2, sizeof(gr_complex)*fft_length, sizeof(char))),
d_constellation(constellation),
- d_msgq(gr_make_msg_queue(msgq_limit)), d_msg_offset(0), d_eof(false),
+ d_msgq(msg_queue::make(msgq_limit)), d_msg_offset(0), d_eof(false),
d_occupied_carriers(occupied_carriers),
d_fft_length(fft_length),
d_bit_offset(0),
diff --git a/gr-digital/lib/ofdm_mapper_bcv_impl.h b/gr-digital/lib/ofdm_mapper_bcv_impl.h
index 6459ed73d8..fc2daf5bd8 100644
--- a/gr-digital/lib/ofdm_mapper_bcv_impl.h
+++ b/gr-digital/lib/ofdm_mapper_bcv_impl.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_OFDM_MAPPER_BCV_IMPL_H
#define INCLUDED_DIGITAL_OFDM_MAPPER_BCV_IMPL_H
-#include <digital/ofdm_mapper_bcv.h>
-#include <gr_message.h>
+#include <gnuradio/digital/ofdm_mapper_bcv.h>
+#include <gnuradio/message.h>
#include <vector>
namespace gr {
@@ -34,10 +34,10 @@ namespace gr {
{
private:
std::vector<gr_complex> d_constellation;
- gr_msg_queue_sptr d_msgq;
- gr_message_sptr d_msg;
- unsigned d_msg_offset;
- bool d_eof;
+ msg_queue::sptr d_msgq;
+ message::sptr d_msg;
+ unsigned d_msg_offset;
+ bool d_eof;
unsigned int d_occupied_carriers;
unsigned int d_fft_length;
@@ -61,7 +61,7 @@ namespace gr {
unsigned int fft_length);
~ofdm_mapper_bcv_impl(void);
- gr_msg_queue_sptr msgq() const { return d_msgq; }
+ msg_queue::sptr msgq() const { return d_msgq; }
int work(int noutput_items,
gr_vector_const_void_star &input_items,
diff --git a/gr-digital/lib/ofdm_sampler_impl.cc b/gr-digital/lib/ofdm_sampler_impl.cc
index 0724b7cf26..dd6197dfc7 100644
--- a/gr-digital/lib/ofdm_sampler_impl.cc
+++ b/gr-digital/lib/ofdm_sampler_impl.cc
@@ -25,8 +25,8 @@
#endif
#include "ofdm_sampler_impl.h"
-#include <gr_io_signature.h>
-#include <gr_expj.h>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/expj.h>
#include <cstdio>
namespace gr {
@@ -44,9 +44,9 @@ namespace gr {
ofdm_sampler_impl::ofdm_sampler_impl(unsigned int fft_length,
unsigned int symbol_length,
unsigned int timeout)
- : gr_block("ofdm_sampler",
- gr_make_io_signature2(2, 2, sizeof(gr_complex), sizeof(char)),
- gr_make_io_signature2(2, 2, sizeof(gr_complex)*fft_length, sizeof(char)*fft_length)),
+ : block("ofdm_sampler",
+ io_signature::make2(2, 2, sizeof(gr_complex), sizeof(char)),
+ io_signature::make2(2, 2, sizeof(gr_complex)*fft_length, sizeof(char)*fft_length)),
d_state(STATE_NO_SIG), d_timeout_max(timeout),
d_fft_length(fft_length), d_symbol_length(symbol_length)
{
diff --git a/gr-digital/lib/ofdm_sampler_impl.h b/gr-digital/lib/ofdm_sampler_impl.h
index 369447465f..b1f57cb330 100644
--- a/gr-digital/lib/ofdm_sampler_impl.h
+++ b/gr-digital/lib/ofdm_sampler_impl.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_DIGITAL_OFDM_SAMPLER_IMPL_H
#define INCLUDED_DIGITAL_OFDM_SAMPLER_IMPL_H
-#include <digital/ofdm_sampler.h>
-#include <gr_sync_block.h>
+#include <gnuradio/digital/ofdm_sampler.h>
+#include <gnuradio/sync_block.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/ofdm_serializer_vcc_impl.cc b/gr-digital/lib/ofdm_serializer_vcc_impl.cc
index 09c0039a1c..261111f22a 100644
--- a/gr-digital/lib/ofdm_serializer_vcc_impl.cc
+++ b/gr-digital/lib/ofdm_serializer_vcc_impl.cc
@@ -23,7 +23,7 @@
#include "config.h"
#endif
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include "ofdm_serializer_vcc_impl.h"
namespace gr {
@@ -36,6 +36,7 @@ namespace gr {
const std::string &len_tag_key,
const std::string &packet_len_tag_key,
int symbols_skipped,
+ const std::string &carr_offset_key,
bool input_is_shifted
)
{
@@ -43,7 +44,9 @@ namespace gr {
new ofdm_serializer_vcc_impl(
fft_len, occupied_carriers,
len_tag_key, packet_len_tag_key,
- symbols_skipped, input_is_shifted
+ symbols_skipped,
+ carr_offset_key,
+ input_is_shifted
)
);
}
@@ -53,6 +56,7 @@ namespace gr {
const gr::digital::ofdm_carrier_allocator_cvc::sptr &allocator,
const std::string &packet_len_tag_key,
int symbols_skipped,
+ const std::string &carr_offset_key,
bool input_is_shifted
)
{
@@ -63,7 +67,8 @@ namespace gr {
allocator->len_tag_key(),
packet_len_tag_key,
symbols_skipped,
- input_is_shifted
+ carr_offset_key,
+ !input_is_shifted
)
);
}
@@ -74,30 +79,36 @@ namespace gr {
const std::string &len_tag_key,
const std::string &packet_len_tag_key,
int symbols_skipped,
+ const std::string &carr_offset_key,
bool input_is_shifted)
- : gr_tagged_stream_block ("ofdm_serializer_vcc",
- gr_make_io_signature(1, 1, sizeof (gr_complex) * fft_len),
- gr_make_io_signature(1, 1, sizeof (gr_complex)),
+ : tagged_stream_block ("ofdm_serializer_vcc",
+ io_signature::make(1, 1, sizeof (gr_complex) * fft_len),
+ io_signature::make(1, 1, sizeof (gr_complex)),
len_tag_key),
d_fft_len(fft_len),
d_occupied_carriers(occupied_carriers),
d_packet_len_tag_key(pmt::string_to_symbol(packet_len_tag_key)),
d_out_len_tag_key(pmt::string_to_symbol((packet_len_tag_key.empty() ? len_tag_key : packet_len_tag_key))),
d_symbols_skipped(symbols_skipped % occupied_carriers.size()),
+ d_carr_offset_key(pmt::string_to_symbol(carr_offset_key)),
d_curr_set(symbols_skipped % occupied_carriers.size()),
d_symbols_per_set(0)
{
for (unsigned i = 0; i < d_occupied_carriers.size(); i++) {
for (unsigned k = 0; k < d_occupied_carriers[i].size(); k++) {
- if (d_occupied_carriers[i][k] < 0) {
- d_occupied_carriers[i][k] += fft_len;
+ if (input_is_shifted) {
+ d_occupied_carriers[i][k] += fft_len/2;
+ if (d_occupied_carriers[i][k] > fft_len) {
+ d_occupied_carriers[i][k] -= fft_len;
+ }
+ } else {
+ if (d_occupied_carriers[i][k] < 0) {
+ d_occupied_carriers[i][k] += fft_len;
+ }
}
if (d_occupied_carriers[i][k] >= fft_len || d_occupied_carriers[i][k] < 0) {
throw std::invalid_argument("ofdm_serializer_vcc: trying to occupy a carrier outside the fft length.");
}
- if (input_is_shifted) {
- d_occupied_carriers[i][k] = (d_occupied_carriers[i][k] + fft_len) % fft_len;
- }
}
}
@@ -143,12 +154,12 @@ namespace gr {
long packet_length = 0; // Output frame
int carr_offset = 0;
- std::vector<gr_tag_t> tags;
+ std::vector<tag_t> tags;
// Packet mode
if (!d_length_tag_key_str.empty()) {
get_tags_in_range(tags, 0, nitems_read(0), nitems_read(0)+1);
for (unsigned i = 0; i < tags.size(); i++) {
- if (pmt::symbol_to_string(tags[i].key) == "ofdm_sync_carr_offset") {
+ if (tags[i].key == d_carr_offset_key) {
carr_offset = pmt::to_long(tags[i].value);
}
if (tags[i].key == d_packet_len_tag_key) {
@@ -176,8 +187,8 @@ namespace gr {
);
for (unsigned t = 0; t < tags.size(); t++) {
add_item_tag(0, nitems_written(0)+n_out_symbols,
- tags[i].key,
- tags[i].value
+ tags[t].key,
+ tags[t].value
);
}
for (unsigned k = 0; k < d_occupied_carriers[d_curr_set].size(); k++) {
diff --git a/gr-digital/lib/ofdm_serializer_vcc_impl.h b/gr-digital/lib/ofdm_serializer_vcc_impl.h
index 4f750eac71..b61c6596d5 100644
--- a/gr-digital/lib/ofdm_serializer_vcc_impl.h
+++ b/gr-digital/lib/ofdm_serializer_vcc_impl.h
@@ -22,7 +22,7 @@
#ifndef INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_IMPL_H
#define INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_IMPL_H
-#include <digital/ofdm_serializer_vcc.h>
+#include <gnuradio/digital/ofdm_serializer_vcc.h>
namespace gr {
namespace digital {
@@ -35,6 +35,7 @@ namespace gr {
pmt::pmt_t d_packet_len_tag_key; //!< Key of the length tag
pmt::pmt_t d_out_len_tag_key; //!< Key of the length tag
const int d_symbols_skipped; //!< Start position in d_occupied_carriers
+ pmt::pmt_t d_carr_offset_key; //!< Key of the carrier offset tag
int d_curr_set; //!< Current position in d_occupied_carriers
int d_symbols_per_set;
@@ -53,6 +54,7 @@ namespace gr {
const std::string &len_tag_key,
const std::string &packet_len_tag_key,
int symbols_skipped,
+ const std::string &carr_offset_key,
bool input_is_shifted
);
~ofdm_serializer_vcc_impl();
diff --git a/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc b/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc
index 822b9021e2..9b3e9687bc 100644
--- a/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc
+++ b/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc
@@ -24,44 +24,44 @@
#include "config.h"
#endif
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include "ofdm_sync_sc_cfb_impl.h"
-#include <blocks/plateau_detector_fb.h>
-#include <blocks/complex_to_arg.h>
-#include <blocks/complex_to_mag_squared.h>
-#include <blocks/conjugate_cc.h>
-#include <blocks/delay.h>
-#include <blocks/divide_ff.h>
-#include <blocks/multiply_cc.h>
-#include <blocks/multiply_ff.h>
-#include <blocks/sample_and_hold_ff.h>
-#include <filter/fir_filter_ccf.h>
-#include <filter/fir_filter_fff.h>
+#include <gnuradio/blocks/plateau_detector_fb.h>
+#include <gnuradio/blocks/complex_to_arg.h>
+#include <gnuradio/blocks/complex_to_mag_squared.h>
+#include <gnuradio/blocks/conjugate_cc.h>
+#include <gnuradio/blocks/delay.h>
+#include <gnuradio/blocks/divide_ff.h>
+#include <gnuradio/blocks/multiply_cc.h>
+#include <gnuradio/blocks/multiply_ff.h>
+#include <gnuradio/blocks/sample_and_hold_ff.h>
+#include <gnuradio/filter/fir_filter_ccf.h>
+#include <gnuradio/filter/fir_filter_fff.h>
namespace gr {
namespace digital {
ofdm_sync_sc_cfb::sptr
- ofdm_sync_sc_cfb::make(int fft_len, int cp_len)
+ ofdm_sync_sc_cfb::make(int fft_len, int cp_len, bool use_even_carriers)
{
- return gnuradio::get_initial_sptr (new ofdm_sync_sc_cfb_impl(fft_len, cp_len));
+ return gnuradio::get_initial_sptr (new ofdm_sync_sc_cfb_impl(fft_len, cp_len, use_even_carriers));
}
- ofdm_sync_sc_cfb_impl::ofdm_sync_sc_cfb_impl(int fft_len, int cp_len)
- : gr_hier_block2 ("ofdm_sync_sc_cfb",
- gr_make_io_signature(1, 1, sizeof (gr_complex)),
+ ofdm_sync_sc_cfb_impl::ofdm_sync_sc_cfb_impl(int fft_len, int cp_len, bool use_even_carriers)
+ : hier_block2 ("ofdm_sync_sc_cfb",
+ io_signature::make(1, 1, sizeof (gr_complex)),
#ifndef SYNC_ADD_DEBUG_OUTPUT
- gr_make_io_signature2(2, 2, sizeof (float), sizeof (unsigned char)))
+ io_signature::make2(2, 2, sizeof (float), sizeof (unsigned char)))
#else
- gr_make_io_signature3(3, 3, sizeof (float), sizeof (unsigned char), sizeof (float)))
+ io_signature::make3(3, 3, sizeof (float), sizeof (unsigned char), sizeof (float)))
#endif
{
std::vector<float> ma_taps(fft_len/2, 1.0);
gr::blocks::delay::sptr delay(gr::blocks::delay::make(sizeof(gr_complex), fft_len/2));
gr::blocks::conjugate_cc::sptr delay_conjugate(gr::blocks::conjugate_cc::make());
gr::blocks::multiply_cc::sptr delay_corr(gr::blocks::multiply_cc::make());
- gr::filter::fir_filter_ccf::sptr delay_ma(gr::filter::fir_filter_ccf::make(1, std::vector<float>(fft_len/2, 1.0)));
+ gr::filter::fir_filter_ccf::sptr delay_ma(gr::filter::fir_filter_ccf::make(1, std::vector<float>(fft_len/2, use_even_carriers ? 1.0 : -1.0)));
gr::blocks::complex_to_mag_squared::sptr delay_magsquare(gr::blocks::complex_to_mag_squared::make());
gr::blocks::divide_ff::sptr delay_normalize(gr::blocks::divide_ff::make());
diff --git a/gr-digital/lib/ofdm_sync_sc_cfb_impl.h b/gr-digital/lib/ofdm_sync_sc_cfb_impl.h
index 207ea41ae1..af767e2a2b 100644
--- a/gr-digital/lib/ofdm_sync_sc_cfb_impl.h
+++ b/gr-digital/lib/ofdm_sync_sc_cfb_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_DIGITAL_OFDM_SYNC_SC_CFB_IMPL_H
#define INCLUDED_DIGITAL_OFDM_SYNC_SC_CFB_IMPL_H
-#include <digital/ofdm_sync_sc_cfb.h>
+#include <gnuradio/digital/ofdm_sync_sc_cfb.h>
namespace gr {
namespace digital {
@@ -31,7 +31,7 @@ namespace gr {
class ofdm_sync_sc_cfb_impl : public ofdm_sync_sc_cfb
{
public:
- ofdm_sync_sc_cfb_impl(int fft_len, int cp_len);
+ ofdm_sync_sc_cfb_impl(int fft_len, int cp_len, bool use_even_carriers);
~ofdm_sync_sc_cfb_impl();
};
diff --git a/gr-digital/lib/packet_header_default.cc b/gr-digital/lib/packet_header_default.cc
index ef5e44ac8d..ef5f39dc97 100644
--- a/gr-digital/lib/packet_header_default.cc
+++ b/gr-digital/lib/packet_header_default.cc
@@ -24,7 +24,7 @@
#endif
#include <string.h>
-#include <digital/packet_header_default.h>
+#include <gnuradio/digital/packet_header_default.h>
namespace gr {
namespace digital {
@@ -47,7 +47,7 @@ namespace gr {
int bits_per_byte)
: d_header_len(header_len),
d_len_tag_key(pmt::string_to_symbol(len_tag_key)),
- d_num_tag_key(pmt::string_to_symbol(num_tag_key)),
+ d_num_tag_key(num_tag_key.empty() ? pmt::PMT_NIL : pmt::string_to_symbol(num_tag_key)),
d_bits_per_byte(bits_per_byte),
d_header_number(0)
{
@@ -64,8 +64,9 @@ namespace gr {
bool packet_header_default::header_formatter(
long packet_len,
unsigned char *out,
- const std::vector<gr_tag_t> &tags
- )
+
+ const std::vector<tag_t> &tags
+ )
{
packet_len &= 0x0FFF;
@@ -91,11 +92,11 @@ namespace gr {
bool packet_header_default::header_parser(
const unsigned char *in,
- std::vector<gr_tag_t> &tags)
+ std::vector<tag_t> &tags)
{
unsigned header_len = 0;
unsigned header_num = 0;
- gr_tag_t tag;
+ tag_t tag;
int k = 0; // Position in "in"
for (int i = 0; i < 12 && k < d_header_len; i += d_bits_per_byte, k++) {
@@ -107,12 +108,17 @@ namespace gr {
if (k >= d_header_len) {
return true;
}
- for (int i = 0; i < 16 && k < d_header_len; i += d_bits_per_byte, k++) {
- header_num |= (((int) in[k]) & d_mask) << i;
+ if (d_num_tag_key == pmt::PMT_NIL) {
+ k += 16;
+ } else {
+ for (int i = 0; i < 16 && k < d_header_len; i += d_bits_per_byte, k++) {
+ header_num |= (((int) in[k]) & d_mask) << i;
+ }
+ tag.key = d_num_tag_key;
+ tag.value = pmt::from_long(header_num);
+ tags.push_back(tag);
}
- tag.key = d_num_tag_key;
- tag.value = pmt::from_long(header_num);
- tags.push_back(tag);
+
if (k >= d_header_len) {
return true;
}
diff --git a/gr-digital/lib/packet_header_ofdm.cc b/gr-digital/lib/packet_header_ofdm.cc
index cd42273285..f163657bab 100644
--- a/gr-digital/lib/packet_header_ofdm.cc
+++ b/gr-digital/lib/packet_header_ofdm.cc
@@ -23,7 +23,7 @@
#include "config.h"
#endif
-#include <digital/packet_header_ofdm.h>
+#include <gnuradio/digital/packet_header_ofdm.h>
namespace gr {
namespace digital {
@@ -85,7 +85,7 @@ namespace gr {
bool packet_header_ofdm::header_parser(
const unsigned char *in,
- std::vector<gr_tag_t> &tags)
+ std::vector<tag_t> &tags)
{
if (!packet_header_default::header_parser(in, tags)) {
return false;
@@ -93,12 +93,15 @@ namespace gr {
int packet_len = 0; // # of bytes in this frame
for (unsigned i = 0; i < tags.size(); i++) {
if (pmt::equal(tags[i].key, d_len_tag_key)) {
- packet_len = pmt::to_long(tags[i].value);
+ // Convert bytes to complex symbols:
+ packet_len = pmt::to_long(tags[i].value) * 8 / d_bits_per_payload_sym;
+ if (pmt::to_long(tags[i].value) * 8 % d_bits_per_payload_sym) {
+ packet_len++;
+ }
+ tags[i].value = pmt::from_long(packet_len);
break;
}
}
- // Convert bytes to complex symbols:
- packet_len = packet_len * 8 / d_bits_per_payload_sym;
// frame_len == # of OFDM symbols in this frame
int frame_len = packet_len / d_syms_per_set;
@@ -108,7 +111,7 @@ namespace gr {
frame_len++;
i += d_occupied_carriers[k].size();
}
- gr_tag_t tag;
+ tag_t tag;
tag.key = d_frame_len_tag_key;
tag.value = pmt::from_long(frame_len);
tags.push_back(tag);
diff --git a/gr-digital/lib/packet_headergenerator_bb_impl.cc b/gr-digital/lib/packet_headergenerator_bb_impl.cc
index 3232858148..a0191fe85a 100644
--- a/gr-digital/lib/packet_headergenerator_bb_impl.cc
+++ b/gr-digital/lib/packet_headergenerator_bb_impl.cc
@@ -24,7 +24,7 @@
#endif
#include <boost/format.hpp>
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include "packet_headergenerator_bb_impl.h"
namespace gr {
@@ -57,9 +57,9 @@ namespace gr {
const gr::digital::packet_header_default::sptr &header_formatter,
const std::string &len_tag_key
)
- : gr_tagged_stream_block("packet_headergenerator_bb_impl",
- gr_make_io_signature(1, 1, sizeof (char)),
- gr_make_io_signature(1, 1, sizeof (char)),
+ : tagged_stream_block("packet_headergenerator_bb_impl",
+ io_signature::make(1, 1, sizeof (char)),
+ io_signature::make(1, 1, sizeof (char)),
len_tag_key),
d_formatter(header_formatter)
{
diff --git a/gr-digital/lib/packet_headergenerator_bb_impl.h b/gr-digital/lib/packet_headergenerator_bb_impl.h
index ce60fdf76c..3cca23fc5e 100644
--- a/gr-digital/lib/packet_headergenerator_bb_impl.h
+++ b/gr-digital/lib/packet_headergenerator_bb_impl.h
@@ -22,7 +22,7 @@
#ifndef INCLUDED_DIGITAL_PACKET_HEADERGENERATOR_BB_IMPL_H
#define INCLUDED_DIGITAL_PACKET_HEADERGENERATOR_BB_IMPL_H
-#include <digital/packet_headergenerator_bb.h>
+#include <gnuradio/digital/packet_headergenerator_bb.h>
namespace gr {
namespace digital {
@@ -39,7 +39,7 @@ namespace gr {
);
~packet_headergenerator_bb_impl();
- void remove_length_tags(const std::vector<std::vector<gr_tag_t> > &tags) {};
+ void remove_length_tags(const std::vector<std::vector<tag_t> > &tags) {};
int calculate_output_stream_length(const gr_vector_int &ninput_items) { return d_formatter->header_len(); };
int work(int noutput_items,
diff --git a/gr-digital/lib/packet_headerparser_b_impl.cc b/gr-digital/lib/packet_headerparser_b_impl.cc
index 17e5e85091..f7593d5fb2 100644
--- a/gr-digital/lib/packet_headerparser_b_impl.cc
+++ b/gr-digital/lib/packet_headerparser_b_impl.cc
@@ -24,7 +24,7 @@
#endif
#include <boost/format.hpp>
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include "packet_headerparser_b_impl.h"
#define msg_port_id pmt::mp("header_data")
@@ -48,9 +48,9 @@ namespace gr {
}
packet_headerparser_b_impl::packet_headerparser_b_impl(const gr::digital::packet_header_default::sptr &header_formatter)
- : gr_sync_block("packet_headerparser_b",
- gr_make_io_signature(1, 1, sizeof (unsigned char)),
- gr_make_io_signature(0, 0, 0)),
+ : sync_block("packet_headerparser_b",
+ io_signature::make(1, 1, sizeof (unsigned char)),
+ io_signature::make(0, 0, 0)),
d_header_formatter(header_formatter)
{
message_port_register_out(msg_port_id);
@@ -72,7 +72,13 @@ namespace gr {
return 0;
}
- std::vector<gr_tag_t> tags;
+ std::vector<tag_t> tags;
+ get_tags_in_range(
+ tags, 0,
+ nitems_read(0),
+ nitems_read(0)+d_header_formatter->header_len()
+ );
+
if (!d_header_formatter->header_parser(in, tags)) {
GR_LOG_INFO(d_logger, boost::format("Detected an invalid packet at item %1%") % nitems_read(0));
message_port_pub(msg_port_id, pmt::PMT_F);
diff --git a/gr-digital/lib/packet_headerparser_b_impl.h b/gr-digital/lib/packet_headerparser_b_impl.h
index a7ded1143f..41641eda4d 100644
--- a/gr-digital/lib/packet_headerparser_b_impl.h
+++ b/gr-digital/lib/packet_headerparser_b_impl.h
@@ -22,7 +22,7 @@
#ifndef INCLUDED_DIGITAL_PACKET_HEADERPARSER_B_IMPL_H
#define INCLUDED_DIGITAL_PACKET_HEADERPARSER_B_IMPL_H
-#include <digital/packet_headerparser_b.h>
+#include <gnuradio/digital/packet_headerparser_b.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/packet_sink_impl.cc b/gr-digital/lib/packet_sink_impl.cc
index 1d79b3d717..56a3d8b395 100644
--- a/gr-digital/lib/packet_sink_impl.cc
+++ b/gr-digital/lib/packet_sink_impl.cc
@@ -25,14 +25,14 @@
#endif
#include "packet_sink_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include <cstdio>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdexcept>
-#include <blocks/count_bits.h>
+#include <gnuradio/blocks/count_bits.h>
#include <string.h>
namespace gr {
@@ -79,17 +79,17 @@ static const int DEFAULT_THRESHOLD = 12;
packet_sink::sptr
packet_sink::make(const std::vector<unsigned char>& sync_vector,
- gr_msg_queue_sptr target_queue, int threshold)
+ msg_queue::sptr target_queue, int threshold)
{
return gnuradio::get_initial_sptr
(new packet_sink_impl(sync_vector, target_queue, threshold));
}
packet_sink_impl::packet_sink_impl(const std::vector<unsigned char>& sync_vector,
- gr_msg_queue_sptr target_queue, int threshold)
- : gr_sync_block("packet_sink",
- gr_make_io_signature(1, 1, sizeof(float)),
- gr_make_io_signature(0, 0, 0)),
+ msg_queue::sptr target_queue, int threshold)
+ : sync_block("packet_sink",
+ io_signature::make(1, 1, sizeof(float)),
+ io_signature::make(0, 0, 0)),
d_target_queue(target_queue), d_threshold(threshold == -1 ? DEFAULT_THRESHOLD : threshold)
{
d_sync_vector = 0;
@@ -184,7 +184,7 @@ static const int DEFAULT_THRESHOLD = 12;
if(d_packetlen_cnt == d_packetlen) { // packet is filled
// build a message
- gr_message_sptr msg = gr_make_message(0, 0, 0, d_packetlen_cnt);
+ message::sptr msg = message::make(0, 0, 0, d_packetlen_cnt);
memcpy(msg->msg(), d_packet, d_packetlen_cnt);
d_target_queue->insert_tail(msg); // send it
diff --git a/gr-digital/lib/packet_sink_impl.h b/gr-digital/lib/packet_sink_impl.h
index a63db7a142..2a1da67b7f 100644
--- a/gr-digital/lib/packet_sink_impl.h
+++ b/gr-digital/lib/packet_sink_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_GR_PACKET_SINK_IMPL_H
#define INCLUDED_GR_PACKET_SINK_IMPL_H
-#include <digital/packet_sink.h>
+#include <gnuradio/digital/packet_sink.h>
namespace gr {
namespace digital {
@@ -36,7 +36,7 @@ namespace gr {
static const int MAX_PKT_LEN = 4096;
static const int HEADERBITLEN = 32;
- gr_msg_queue_sptr d_target_queue; // where to send the packet when received
+ msg_queue::sptr d_target_queue; // where to send the packet when received
unsigned long long d_sync_vector; // access code to locate start of packet
unsigned int d_threshold; // how many bits may be wrong in sync vector
@@ -45,7 +45,7 @@ namespace gr {
unsigned long long d_shift_reg; // used to look for sync_vector
unsigned int d_header; // header bits
- int d_headerbitlen_cnt;// how many so far
+ int d_headerbitlen_cnt;// how many so far
unsigned char d_packet[MAX_PKT_LEN]; // assembled payload
unsigned char d_packet_byte; // byte being assembled
@@ -75,7 +75,7 @@ namespace gr {
public:
packet_sink_impl(const std::vector<unsigned char>& sync_vector,
- gr_msg_queue_sptr target_queue,
+ msg_queue::sptr target_queue,
int threshold=-1);
~packet_sink_impl();
diff --git a/gr-digital/lib/pfb_clock_sync_ccf_impl.cc b/gr-digital/lib/pfb_clock_sync_ccf_impl.cc
index 3c4a0e8ad4..685c0e6150 100644
--- a/gr-digital/lib/pfb_clock_sync_ccf_impl.cc
+++ b/gr-digital/lib/pfb_clock_sync_ccf_impl.cc
@@ -28,8 +28,8 @@
#include <cmath>
#include "pfb_clock_sync_ccf_impl.h"
-#include <gr_io_signature.h>
-#include <gr_math.h>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
namespace gr {
namespace digital {
@@ -58,9 +58,9 @@ namespace gr {
float init_phase,
float max_rate_deviation,
int osps)
- : gr_block("pfb_clock_sync_ccf",
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
- gr_make_io_signaturev(1, 4, iosig)),
+ : block("pfb_clock_sync_ccf",
+ io_signature::make(1, 1, sizeof(gr_complex)),
+ io_signature::makev(1, 4, iosig)),
d_updated(false), d_nfilters(filter_size),
d_max_dev(max_rate_deviation),
d_osps(osps), d_error(0), d_out_idx(0)
@@ -443,7 +443,7 @@ namespace gr {
d_k = d_k + d_alpha*d_error;
// Keep our rate within a good range
- d_rate_f = gr_branchless_clip(d_rate_f, d_max_dev);
+ d_rate_f = gr::branchless_clip(d_rate_f, d_max_dev);
i+=d_osps;
count += (int)floor(d_sps);
diff --git a/gr-digital/lib/pfb_clock_sync_ccf_impl.h b/gr-digital/lib/pfb_clock_sync_ccf_impl.h
index c7fdc9183e..7020dd0bd5 100644
--- a/gr-digital/lib/pfb_clock_sync_ccf_impl.h
+++ b/gr-digital/lib/pfb_clock_sync_ccf_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_DIGITAL_PFB_CLOCK_SYNC_CCF_IMPL_H
#define INCLUDED_DIGITAL_PFB_CLOCK_SYNC_CCF_IMPL_H
-#include <digital/pfb_clock_sync_ccf.h>
+#include <gnuradio/digital/pfb_clock_sync_ccf.h>
using namespace gr::filter;
diff --git a/gr-digital/lib/pfb_clock_sync_fff_impl.cc b/gr-digital/lib/pfb_clock_sync_fff_impl.cc
index fb60192324..236738c550 100644
--- a/gr-digital/lib/pfb_clock_sync_fff_impl.cc
+++ b/gr-digital/lib/pfb_clock_sync_fff_impl.cc
@@ -28,8 +28,8 @@
#include <cmath>
#include "pfb_clock_sync_fff_impl.h"
-#include <gr_io_signature.h>
-#include <gr_math.h>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
namespace gr {
namespace digital {
@@ -58,9 +58,9 @@ namespace gr {
float init_phase,
float max_rate_deviation,
int osps)
- : gr_block("pfb_clock_sync_fff",
- gr_make_io_signature(1, 1, sizeof(float)),
- gr_make_io_signaturev(1, 4, iosig)),
+ : block("pfb_clock_sync_fff",
+ io_signature::make(1, 1, sizeof(float)),
+ io_signature::makev(1, 4, iosig)),
d_updated(false), d_nfilters(filter_size),
d_max_dev(max_rate_deviation),
d_osps(osps), d_error(0), d_out_idx(0)
@@ -421,7 +421,7 @@ namespace gr {
d_k = d_k + d_alpha*d_error;
// Keep our rate within a good range
- d_rate_f = gr_branchless_clip(d_rate_f, d_max_dev);
+ d_rate_f = gr::branchless_clip(d_rate_f, d_max_dev);
i+=d_osps;
count += (int)floor(d_sps);
diff --git a/gr-digital/lib/pfb_clock_sync_fff_impl.h b/gr-digital/lib/pfb_clock_sync_fff_impl.h
index 2ade1e646f..7f78b4e60c 100644
--- a/gr-digital/lib/pfb_clock_sync_fff_impl.h
+++ b/gr-digital/lib/pfb_clock_sync_fff_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_DIGITAL_PFB_CLOCK_SYNC_FFF_IMPL_H
#define INCLUDED_DIGITAL_PFB_CLOCK_SYNC_FFF_IMPL_H
-#include <digital/pfb_clock_sync_fff.h>
+#include <gnuradio/digital/pfb_clock_sync_fff.h>
using namespace gr::filter;
diff --git a/gr-digital/lib/pn_correlator_cc_impl.cc b/gr-digital/lib/pn_correlator_cc_impl.cc
index da0bdbefe9..649b73be14 100644
--- a/gr-digital/lib/pn_correlator_cc_impl.cc
+++ b/gr-digital/lib/pn_correlator_cc_impl.cc
@@ -25,7 +25,7 @@
#endif
#include "pn_correlator_cc_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
namespace gr {
namespace digital {
@@ -40,9 +40,9 @@ namespace gr {
pn_correlator_cc_impl::pn_correlator_cc_impl(int degree,
int mask,
int seed)
- : gr_sync_decimator("pn_correlator_cc",
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
+ : sync_decimator("pn_correlator_cc",
+ io_signature::make(1, 1, sizeof(gr_complex)),
+ io_signature::make(1, 1, sizeof(gr_complex)),
(unsigned int)((1ULL << degree)-1)) // PN code length
{
d_len = (unsigned int)((1ULL << degree)-1);
diff --git a/gr-digital/lib/pn_correlator_cc_impl.h b/gr-digital/lib/pn_correlator_cc_impl.h
index bea9a30505..a98721eb70 100644
--- a/gr-digital/lib/pn_correlator_cc_impl.h
+++ b/gr-digital/lib/pn_correlator_cc_impl.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_GR_PN_CORRELATOR_CC_IMPL_H
#define INCLUDED_GR_PN_CORRELATOR_CC_IMPL_H
-#include <digital/pn_correlator_cc.h>
-#include <digital/glfsr.h>
+#include <gnuradio/digital/pn_correlator_cc.h>
+#include <gnuradio/digital/glfsr.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/probe_density_b_impl.cc b/gr-digital/lib/probe_density_b_impl.cc
index 532930ad1b..d718d4b44d 100644
--- a/gr-digital/lib/probe_density_b_impl.cc
+++ b/gr-digital/lib/probe_density_b_impl.cc
@@ -23,7 +23,7 @@
#endif
#include "probe_density_b_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include <iostream>
namespace gr {
@@ -37,9 +37,9 @@ namespace gr {
}
probe_density_b_impl::probe_density_b_impl(double alpha)
- : gr_sync_block("density_b",
- gr_make_io_signature(1, 1, sizeof(char)),
- gr_make_io_signature(0, 0, 0))
+ : sync_block("density_b",
+ io_signature::make(1, 1, sizeof(char)),
+ io_signature::make(0, 0, 0))
{
set_alpha(alpha);
d_density = 1.0;
diff --git a/gr-digital/lib/probe_density_b_impl.h b/gr-digital/lib/probe_density_b_impl.h
index e792403dc5..a7a6086dd1 100644
--- a/gr-digital/lib/probe_density_b_impl.h
+++ b/gr-digital/lib/probe_density_b_impl.h
@@ -21,7 +21,7 @@
#ifndef INCLUDED_GR_PROBE_DENSITY_B_IMPL_H
#define INCLUDED_GR_PROBE_DENSITY_B_IMPL_H
-#include <digital/probe_density_b.h>
+#include <gnuradio/digital/probe_density_b.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/probe_mpsk_snr_est_c_impl.cc b/gr-digital/lib/probe_mpsk_snr_est_c_impl.cc
index fb71bdc110..6fa7c1bd0d 100644
--- a/gr-digital/lib/probe_mpsk_snr_est_c_impl.cc
+++ b/gr-digital/lib/probe_mpsk_snr_est_c_impl.cc
@@ -25,7 +25,7 @@
#endif
#include "probe_mpsk_snr_est_c_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
#include <cstdio>
namespace gr {
@@ -43,9 +43,9 @@ namespace gr {
probe_mpsk_snr_est_c_impl::probe_mpsk_snr_est_c_impl(snr_est_type_t type,
int msg_nsamples,
double alpha)
- : gr_sync_block("probe_mpsk_snr_est_c",
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
- gr_make_io_signature(0, 0, 0))
+ : sync_block("probe_mpsk_snr_est_c",
+ io_signature::make(1, 1, sizeof(gr_complex)),
+ io_signature::make(0, 0, 0))
{
d_snr_est = NULL;
diff --git a/gr-digital/lib/probe_mpsk_snr_est_c_impl.h b/gr-digital/lib/probe_mpsk_snr_est_c_impl.h
index 90da85d21b..0663595928 100644
--- a/gr-digital/lib/probe_mpsk_snr_est_c_impl.h
+++ b/gr-digital/lib/probe_mpsk_snr_est_c_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_DIGITAL_PROBE_MPSK_SNR_EST_C_IMPL_H
#define INCLUDED_DIGITAL_PROBE_MPSK_SNR_EST_C_IMPL_H
-#include <digital/probe_mpsk_snr_est_c.h>
+#include <gnuradio/digital/probe_mpsk_snr_est_c.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/scrambler_bb_impl.cc b/gr-digital/lib/scrambler_bb_impl.cc
index d656fe2430..3b32833419 100644
--- a/gr-digital/lib/scrambler_bb_impl.cc
+++ b/gr-digital/lib/scrambler_bb_impl.cc
@@ -25,7 +25,7 @@
#endif
#include "scrambler_bb_impl.h"
-#include <gr_io_signature.h>
+#include <gnuradio/io_signature.h>
namespace gr {
namespace digital {
@@ -38,9 +38,9 @@ namespace gr {
}
scrambler_bb_impl::scrambler_bb_impl(int mask, int seed, int len)
- : gr_sync_block("scrambler_bb",
- gr_make_io_signature(1, 1, sizeof(unsigned char)),
- gr_make_io_signature(1, 1, sizeof(unsigned char))),
+ : sync_block("scrambler_bb",
+ io_signature::make(1, 1, sizeof(unsigned char)),
+ io_signature::make(1, 1, sizeof(unsigned char))),
d_lfsr(mask, seed, len)
{
}
diff --git a/gr-digital/lib/scrambler_bb_impl.h b/gr-digital/lib/scrambler_bb_impl.h
index 8525e7ef5c..7d09e9709c 100644
--- a/gr-digital/lib/scrambler_bb_impl.h
+++ b/gr-digital/lib/scrambler_bb_impl.h
@@ -23,9 +23,9 @@
#ifndef INCLUDED_GR_SCRAMBLER_BB_IMPL_H
#define INCLUDED_GR_SCRAMBLER_BB_IMPL_H
-#include <digital/scrambler_bb.h>
-#include <gr_sync_block.h>
-#include <digital/lfsr.h>
+#include <gnuradio/digital/scrambler_bb.h>
+#include <gnuradio/sync_block.h>
+#include <gnuradio/digital/lfsr.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/lib/simple_correlator_impl.cc b/gr-digital/lib/simple_correlator_impl.cc
index 6b35b4cf0d..6524e906a4 100644
--- a/gr-digital/lib/simple_correlator_impl.cc
+++ b/gr-digital/lib/simple_correlator_impl.cc
@@ -25,9 +25,9 @@
#endif
#include "simple_correlator_impl.h"
-#include <digital/simple_framer_sync.h>
-#include <gr_io_signature.h>
-#include <blocks/count_bits.h>
+#include <gnuradio/digital/simple_framer_sync.h>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/blocks/count_bits.h>
#include <assert.h>
#include <stdexcept>
#include <string.h>
@@ -46,9 +46,9 @@ namespace gr {
}
simple_correlator_impl::simple_correlator_impl(int payload_bytesize)
- : gr_block("simple_correlator",
- gr_make_io_signature(1, 1, sizeof(float)),
- gr_make_io_signature(1, 1, sizeof(unsigned char))),
+ : block("simple_correlator",
+ io_signature::make(1, 1, sizeof(float)),
+ io_signature::make(1, 1, sizeof(unsigned char))),
d_payload_bytesize(payload_bytesize),
d_state(ST_LOOKING), d_osi(0),
d_bblen((payload_bytesize + GRSF_PAYLOAD_OVERHEAD) * GRSF_BITS_PER_BYTE),
diff --git a/gr-digital/lib/simple_correlator_impl.h b/gr-digital/lib/simple_correlator_impl.h
index fe324131fd..09868682e7 100644
--- a/gr-digital/lib/simple_correlator_impl.h
+++ b/gr-digital/lib/simple_correlator_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_GR_SIMPLE_CORRELATOR_IMPL_H
#define INCLUDED_GR_SIMPLE_CORRELATOR_IMPL_H
-#include <digital/simple_correlator.h>
+#include <gnuradio/digital/simple_correlator.h>
//#define DEBUG_SIMPLE_CORRELATOR
diff --git a/gr-digital/lib/simple_framer_impl.cc b/gr-digital/lib/simple_framer_impl.cc
index ff7e3ab614..0f8a068276 100644
--- a/gr-digital/lib/simple_framer_impl.cc
+++ b/gr-digital/lib/simple_framer_impl.cc
@@ -25,8 +25,8 @@
#endif
#include "simple_framer_impl.h"
-#include <digital/simple_framer_sync.h>
-#include <gr_io_signature.h>
+#include <gnuradio/digital/simple_framer_sync.h>
+#include <gnuradio/io_signature.h>
#include <assert.h>
#include <string>
@@ -41,9 +41,9 @@ namespace gr {
}
simple_framer_impl::simple_framer_impl(int payload_bytesize)
- : gr_block("simple_framer",
- gr_make_io_signature(1, 1, sizeof(unsigned char)),
- gr_make_io_signature(1, 1, sizeof(unsigned char))),
+ : block("simple_framer",
+ io_signature::make(1, 1, sizeof(unsigned char)),
+ io_signature::make(1, 1, sizeof(unsigned char))),
d_seqno (0), d_payload_bytesize (payload_bytesize),
d_input_block_size (payload_bytesize),
d_output_block_size (payload_bytesize + GRSF_OVERHEAD)
diff --git a/gr-digital/lib/simple_framer_impl.h b/gr-digital/lib/simple_framer_impl.h
index fe967eb26a..25dda4429e 100644
--- a/gr-digital/lib/simple_framer_impl.h
+++ b/gr-digital/lib/simple_framer_impl.h
@@ -23,7 +23,7 @@
#ifndef INCLUDED_GR_SIMPLE_FRAMER_IMPL_H
#define INCLUDED_GR_SIMPLE_FRAMER_IMPL_H
-#include <digital/simple_framer.h>
+#include <gnuradio/digital/simple_framer.h>
namespace gr {
namespace digital {
diff --git a/gr-digital/python/CMakeLists.txt b/gr-digital/python/CMakeLists.txt
index 7846345970..e73efb70f8 100644
--- a/gr-digital/python/CMakeLists.txt
+++ b/gr-digital/python/CMakeLists.txt
@@ -77,6 +77,8 @@ list(APPEND GR_TEST_PYTHON_DIRS
${CMAKE_BINARY_DIR}/gr-blocks/swig
${CMAKE_BINARY_DIR}/gr-fft/python
${CMAKE_BINARY_DIR}/gr-fft/swig
+ ${CMAKE_BINARY_DIR}/gr-channels/python
+ ${CMAKE_BINARY_DIR}/gr-channels/swig
)
list(APPEND GR_TEST_TARGET_DEPS gnuradio-digital gnuradio-filter gnuradio-fft gnuradio-analog gnuradio-blocks)
diff --git a/gr-digital/python/ofdm_txrx.py b/gr-digital/python/ofdm_txrx.py
index 37c4086cc3..8f1b4c5f02 100644
--- a/gr-digital/python/ofdm_txrx.py
+++ b/gr-digital/python/ofdm_txrx.py
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2007,2013 Free Software Foundation, Inc.
+# Copyright 2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -25,6 +25,9 @@ For simple configurations, no need to connect all the relevant OFDM blocks
to form an OFDM Tx/Rx--simply use these.
"""
+# Reminder: All frequency-domain stuff is in shifted form, i.e. DC carrier
+# in the middle!
+
import numpy
from gnuradio import gr
import digital_swig as digital
@@ -44,20 +47,59 @@ except ImportError:
_def_fft_len = 64
_def_cp_len = 16
_def_frame_length_tag_key = "frame_length"
-_def_packet_length_tag_key = "frame_length"
-_def_packet_num_tag_key = ""
-_def_occupied_carriers=(range(1, 27) + range(38, 64),)
-_def_pilot_carriers=((0,),)
-_def_pilot_symbols=((100,),)
+_def_packet_length_tag_key = "packet_length"
+_def_packet_num_tag_key = "packet_num"
+# Data and pilot carriers are same as in 802.11a
+_def_occupied_carriers = (range(-26, -21) + range(-20, -7) + range(-6, 0) + range(1, 7) + range(8, 21) + range(22, 27),)
+_def_pilot_carriers=((-21, -7, 7, 21,),)
+_pilot_sym_scramble_seq = (
+ 1,1,1,1, -1,-1,-1,1, -1,-1,-1,-1, 1,1,-1,1, -1,-1,1,1, -1,1,1,-1, 1,1,1,1, 1,1,-1,1,
+ 1,1,-1,1, 1,-1,-1,1, 1,1,-1,1, -1,-1,-1,1, -1,1,-1,-1, 1,-1,-1,1, 1,1,1,1, -1,-1,1,1,
+ -1,-1,1,-1, 1,-1,1,1, -1,-1,-1,1, 1,-1,-1,-1, -1,1,-1,-1, 1,-1,1,1, 1,1,-1,1, -1,1,-1,1,
+ -1,-1,-1,-1, -1,1,-1,1, 1,-1,1,-1, 1,1,1,-1, -1,1,-1,-1, -1,1,1,1, -1,-1,-1,-1, -1,-1,-1
+)
+_def_pilot_symbols= tuple([(x, x, x, -x) for x in _pilot_sym_scramble_seq])
_seq_seed = 42
-def _make_sync_word(fft_len, occupied_carriers, constellation):
- """ Makes a random sync sequence """
- occupied_carriers = list(occupied_carriers[0])
- occupied_carriers = [occupied_carriers[x] + fft_len if occupied_carriers[x] < 0 else occupied_carriers[x] for x in range(len(occupied_carriers))]
+
+def _get_active_carriers(fft_len, occupied_carriers, pilot_carriers):
+ active_carriers = list()
+ for carrier in list(occupied_carriers[0]) + list(pilot_carriers[0]):
+ if carrier < 0:
+ carrier += fft_len
+ active_carriers.append(carrier)
+ return active_carriers
+
+def _make_sync_word1(fft_len, occupied_carriers, pilot_carriers):
+ """ Creates a random sync sequence for fine frequency offset and timing
+ estimation. This is the first of typically two sync preamble symbols
+ for the Schmidl & Cox sync algorithm.
+ The relevant feature of this symbols is that every second sub-carrier
+ is zero. In the time domain, this results in two identical halves of
+ the OFDM symbols.
+ Symbols are always BPSK symbols. Carriers are scaled by sqrt(2) to keep
+ total energy constant.
+ Carrier 0 (DC carrier) is always zero. If used, carrier 1 is non-zero.
+ This means the sync algorithm has to check on odd carriers!
+ """
+ active_carriers = _get_active_carriers(fft_len, occupied_carriers, pilot_carriers)
numpy.random.seed(_seq_seed)
- sync_sequence = [constellation.map_to_points_v(numpy.random.randint(constellation.arity()))[0] * numpy.sqrt(2) if x in occupied_carriers and x % 3 else 0 for x in range(fft_len)]
- return sync_sequence
+ bpsk = {0: numpy.sqrt(2), 1: -numpy.sqrt(2)}
+ sw1 = [bpsk[numpy.random.randint(2)] if x in active_carriers and x % 2 else 0 for x in range(fft_len)]
+ return numpy.fft.fftshift(sw1)
+
+def _make_sync_word2(fft_len, occupied_carriers, pilot_carriers):
+ """ Creates a random sync sequence for coarse frequency offset and channel
+ estimation. This is the second of typically two sync preamble symbols
+ for the Schmidl & Cox sync algorithm.
+ Symbols are always BPSK symbols.
+ """
+ active_carriers = _get_active_carriers(fft_len, occupied_carriers, pilot_carriers)
+ numpy.random.seed(_seq_seed)
+ bpsk = {0: 1, 1: -1}
+ sw2 = [bpsk[numpy.random.randint(2)] if x in active_carriers else 0 for x in range(fft_len)]
+ sw2[0] = 0j
+ return numpy.fft.fftshift(sw2)
def _get_constellation(bps):
""" Returns a modulator block for a given number of bits per symbol """
@@ -73,22 +115,28 @@ def _get_constellation(bps):
exit(1)
class ofdm_tx(gr.hier_block2):
- """
- Hierarchical block for OFDM modulation.
+ """ Hierarchical block for OFDM modulation.
The input is a byte stream (unsigned char) and the
output is the complex modulated signal at baseband.
Args:
fft_len: The length of FFT (integer).
- cp_len: The length of cyclic prefix (integer).
- occupied_carriers: ??
- pilot_carriers: ??
- pilot_symbols: ??
- length_tag_key: The name of the tag giving packet length.
+ cp_len: The length of cyclic prefix in total samples (integer).
+ packet_length_tag_key: The name of the tag giving packet length at the input.
+ occupied_carriers: A vector of vectors describing which OFDM carriers are occupied.
+ pilot_carriers: A vector of vectors describing which OFDM carriers are occupied with pilot symbols.
+ pilot_symbols: The pilot symbols.
+ bps_header: Bits per symbol (header).
+ bps_payload: Bits per symbol (payload).
+ sync_word1: The first sync preamble symbol. This has to be with zeros on alternating carriers.
+ Used for fine and coarse frequency offset and timing estimation.
+ sync_word2: The second sync preamble symbol. This has to be filled entirely. Also used for
+ coarse frequency offset and channel estimation.
+ rolloff: The rolloff length in samples. Must be smaller than the CP.
"""
def __init__(self, fft_len=_def_fft_len, cp_len=_def_cp_len,
- frame_length_tag_key=_def_frame_length_tag_key,
+ packet_length_tag_key=_def_packet_length_tag_key,
occupied_carriers=_def_occupied_carriers,
pilot_carriers=_def_pilot_carriers,
pilot_symbols=_def_pilot_symbols,
@@ -96,84 +144,112 @@ class ofdm_tx(gr.hier_block2):
bps_payload=1,
sync_word1=None,
sync_word2=None,
- rolloff=0
+ rolloff=0,
+ debug_log=False
):
gr.hier_block2.__init__(self, "ofdm_tx",
gr.io_signature(1, 1, gr.sizeof_char),
gr.io_signature(1, 1, gr.sizeof_gr_complex))
+ ### Param init / sanity check ########################################
self.fft_len = fft_len
self.cp_len = cp_len
- self.frame_length_tag_key = frame_length_tag_key
+ self.packet_length_tag_key = packet_length_tag_key
self.occupied_carriers = occupied_carriers
self.pilot_carriers = pilot_carriers
self.pilot_symbols = pilot_symbols
self.bps_header = bps_header
self.bps_payload = bps_payload
n_sync_words = 1
- header_constellation = _get_constellation(bps_header)
- header_mod = digital.chunks_to_symbols_bc(header_constellation.points())
self.sync_word1 = sync_word1
if sync_word1 is None:
- self.sync_word1 = _make_sync_word(fft_len, occupied_carriers, header_constellation)
+ self.sync_word1 = _make_sync_word1(fft_len, occupied_carriers, pilot_carriers)
else:
if len(sync_word1) != self.fft_len:
raise ValueError("Length of sync sequence(s) must be FFT length.")
- self.sync_words = [sync_word1,]
+ self.sync_words = [self.sync_word1,]
self.sync_word2 = ()
- if sync_word2 is not None:
- if len(sync_word2) != fft_len:
+ if sync_word2 is None:
+ self.sync_word2 = _make_sync_word2(fft_len, occupied_carriers, pilot_carriers)
+ if len(self.sync_word2):
+ if len(self.sync_word2) != fft_len:
raise ValueError("Length of sync sequence(s) must be FFT length.")
- self.sync_word2 = sync_word2
+ self.sync_word2 = list(self.sync_word2)
n_sync_words = 2
self.sync_words.append(self.sync_word2)
- crc = digital.crc32_bb(False, self.frame_length_tag_key)
+ ### Header modulation ################################################
+ crc = digital.crc32_bb(False, self.packet_length_tag_key)
+ header_constellation = _get_constellation(bps_header)
+ header_mod = digital.chunks_to_symbols_bc(header_constellation.points())
formatter_object = digital.packet_header_ofdm(
occupied_carriers=occupied_carriers, n_syms=1,
- bits_per_sym=self.bps_header
+ bits_per_header_sym=self.bps_header,
+ bits_per_payload_sym=self.bps_payload
)
- header_gen = digital.packet_headergenerator_bb(formatter_object.base(), self.frame_length_tag_key)
- header_payload_mux = blocks.tagged_stream_mux(gr.sizeof_gr_complex*1, self.frame_length_tag_key)
+ header_gen = digital.packet_headergenerator_bb(formatter_object.base(), self.packet_length_tag_key)
+ header_payload_mux = blocks.tagged_stream_mux(gr.sizeof_gr_complex*1, self.packet_length_tag_key)
self.connect(self, crc, header_gen, header_mod, (header_payload_mux, 0))
+ if debug_log:
+ self.connect(header_gen, blocks.file_sink(1, 'tx-hdr.dat'))
+ ### Payload modulation ###############################################
payload_constellation = _get_constellation(bps_payload)
payload_mod = digital.chunks_to_symbols_bc(payload_constellation.points())
self.connect(
crc,
- blocks.repack_bits_bb(8, bps_payload, frame_length_tag_key),
+ blocks.repack_bits_bb(
+ 8, # Unpack 8 bits per byte
+ bps_payload,
+ self.packet_length_tag_key
+ ),
payload_mod,
(header_payload_mux, 1)
)
+ ### Create OFDM frame ################################################
allocator = digital.ofdm_carrier_allocator_cvc(
self.fft_len,
occupied_carriers=self.occupied_carriers,
pilot_carriers=self.pilot_carriers,
pilot_symbols=self.pilot_symbols,
sync_words=self.sync_words,
- len_tag_key=self.frame_length_tag_key
+ len_tag_key=self.packet_length_tag_key
+ )
+ ffter = fft.fft_vcc(
+ self.fft_len,
+ False, # Inverse FFT
+ (), # No window
+ True # Shift
)
- ffter = fft.fft_vcc(self.fft_len, False, (), True)
cyclic_prefixer = digital.ofdm_cyclic_prefixer(
self.fft_len,
self.fft_len+self.cp_len,
rolloff,
- self.frame_length_tag_key
+ self.packet_length_tag_key
)
self.connect(header_payload_mux, allocator, ffter, cyclic_prefixer, self)
+ if debug_log:
+ self.connect(allocator, blocks.file_sink(8*64, 'tx-post-allocator.dat'))
+ self.connect(cyclic_prefixer, blocks.file_sink(8, 'tx-signal.dat'))
class ofdm_rx(gr.hier_block2):
- """
- Hierarchical block for OFDM demodulation.
+ """ Hierarchical block for OFDM demodulation.
- The input is a byte stream (unsigned char) and the
- output is the complex modulated signal at baseband.
+ The input is a complex baseband signal (e.g. from a UHD source).
+ The detected packets are output as a stream of packed bits on the output.
Args:
fft_len: The length of FFT (integer).
- cp_len: The length of cyclic prefix (integer).
- occupied_carriers: ??
- pilot_carriers: ??
- pilot_symbols: ??
- length_tag_key: The name of the tag giving packet length.
+ cp_len: The length of cyclic prefix in total samples (integer).
+ frame_length_tag_key: Used internally to tag the length of the OFDM frame.
+ packet_length_tag_key: The name of the tag giving packet length at the input.
+ occupied_carriers: A vector of vectors describing which OFDM carriers are occupied.
+ pilot_carriers: A vector of vectors describing which OFDM carriers are occupied with pilot symbols.
+ pilot_symbols: The pilot symbols.
+ bps_header: Bits per symbol (header).
+ bps_payload: Bits per symbol (payload).
+ sync_word1: The first sync preamble symbol. This has to be with zeros on alternating carriers.
+ Used for fine and coarse frequency offset and timing estimation.
+ sync_word2: The second sync preamble symbol. This has to be filled entirely. Also used for
+ coarse frequency offset and channel estimation.
"""
def __init__(self, fft_len=_def_fft_len, cp_len=_def_cp_len,
frame_length_tag_key=_def_frame_length_tag_key,
@@ -185,11 +261,13 @@ class ofdm_rx(gr.hier_block2):
bps_header=1,
bps_payload=1,
sync_word1=None,
- sync_word2=None
+ sync_word2=None,
+ debug_log=False
):
gr.hier_block2.__init__(self, "ofdm_rx",
gr.io_signature(1, 1, gr.sizeof_gr_complex),
gr.io_signature(1, 1, gr.sizeof_char))
+ ### Param init / sanity check ########################################
self.fft_len = fft_len
self.cp_len = cp_len
self.frame_length_tag_key = frame_length_tag_key
@@ -198,44 +276,60 @@ class ofdm_rx(gr.hier_block2):
self.bps_header = bps_header
self.bps_payload = bps_payload
n_sync_words = 1
- header_constellation = _get_constellation(bps_header)
if sync_word1 is None:
- self.sync_word1 = _make_sync_word(fft_len, occupied_carriers, header_constellation)
+ self.sync_word1 = _make_sync_word1(fft_len, occupied_carriers, pilot_carriers)
else:
if len(sync_word1) != self.fft_len:
raise ValueError("Length of sync sequence(s) must be FFT length.")
self.sync_word1 = sync_word1
self.sync_word2 = ()
- if sync_word2 is not None:
+ if sync_word2 is None:
+ self.sync_word2 = _make_sync_word2(fft_len, occupied_carriers, pilot_carriers)
+ n_sync_words = 2
+ elif len(sync_word2):
if len(sync_word2) != fft_len:
raise ValueError("Length of sync sequence(s) must be FFT length.")
self.sync_word2 = sync_word2
n_sync_words = 2
- else:
- sync_word2 = ()
- # Receiver path
+ ### Sync ############################################################
sync_detect = digital.ofdm_sync_sc_cfb(fft_len, cp_len)
+ delay = blocks.delay(gr.sizeof_gr_complex, fft_len+cp_len)
oscillator = analog.frequency_modulator_fc(-2.0 / fft_len)
- delay = gr.delay(gr.sizeof_gr_complex, fft_len+cp_len)
- mixer = gr.multiply_cc()
- hpd = digital.header_payload_demux(n_sync_words, fft_len, cp_len,
- frame_length_tag_key, "", True)
+ mixer = blocks.multiply_cc()
+ hpd = digital.header_payload_demux(
+ n_sync_words+1, # Number of OFDM symbols before payload (sync + 1 sym header)
+ fft_len, cp_len, # FFT length, guard interval
+ frame_length_tag_key, # Frame length tag key
+ "", # We're not using trigger tags
+ True # One output item is one OFDM symbol (False would output complex scalars)
+ )
self.connect(self, sync_detect)
- self.connect((sync_detect, 0), oscillator, (mixer, 0))
- self.connect(self, delay, (mixer, 1))
- self.connect(mixer, (hpd, 0))
+ self.connect(self, delay, (mixer, 0), (hpd, 0))
+ self.connect((sync_detect, 0), oscillator, (mixer, 1))
self.connect((sync_detect, 1), (hpd, 1))
- # Header demodulation
- header_fft = fft.fft_vcc(self.fft_len, True, (), True)
- chanest = digital.ofdm_chanest_vcvc(self.sync_word1, self.sync_word2, 1)
- header_equalizer = digital.ofdm_equalizer_simpledfe(
- fft_len, header_constellation.base(),
- occupied_carriers, pilot_carriers, pilot_symbols
- )
- header_eq = digital.ofdm_frame_equalizer_vcvc(header_equalizer.base(), frame_length_tag_key, True)
- header_serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers)
+ if debug_log:
+ self.connect((sync_detect, 0), blocks.file_sink(gr.sizeof_float, 'freq-offset.dat'))
+ self.connect((sync_detect, 1), blocks.file_sink(gr.sizeof_char, 'sync-detect.dat'))
+ ### Header demodulation ##############################################
+ header_fft = fft.fft_vcc(self.fft_len, True, (), True)
+ chanest = digital.ofdm_chanest_vcvc(self.sync_word1, self.sync_word2, 1)
header_constellation = _get_constellation(bps_header)
- header_demod = digital.constellation_decoder_cb(header_constellation.base())
+ header_equalizer = digital.ofdm_equalizer_simpledfe(
+ fft_len, header_constellation.base(),
+ occupied_carriers, pilot_carriers, pilot_symbols, 0, 0
+ )
+ header_eq = digital.ofdm_frame_equalizer_vcvc(
+ header_equalizer.base(),
+ cp_len,
+ self.frame_length_tag_key,
+ True,
+ 1 # Header is 1 symbol long
+ )
+ header_serializer = digital.ofdm_serializer_vcc(
+ fft_len, occupied_carriers,
+ self.frame_length_tag_key
+ )
+ header_demod = digital.constellation_decoder_cb(header_constellation.base())
header_formatter = digital.packet_header_ofdm(
occupied_carriers, 1,
packet_length_tag_key,
@@ -246,16 +340,46 @@ class ofdm_rx(gr.hier_block2):
header_parser = digital.packet_headerparser_b(header_formatter.formatter())
self.connect((hpd, 0), header_fft, chanest, header_eq, header_serializer, header_demod, header_parser)
self.msg_connect(header_parser, "header_data", hpd, "header_data")
- # Payload demodulation
+ if debug_log:
+ self.connect((chanest, 1), blocks.file_sink(512, 'channel-estimate.dat'))
+ self.connect((chanest, 0), blocks.file_sink(512, 'post-hdr-chanest.dat'))
+ self.connect(header_eq, blocks.file_sink(512, 'post-hdr-eq.dat'))
+ self.connect(header_serializer, blocks.file_sink(8, 'post-hdr-serializer.dat'))
+ self.connect(header_demod, blocks.file_sink(1, 'post-hdr-demod.dat'))
+ self.connect(header_demod, blocks.tag_debug(1, 'post-hdr-demod.dat'))
+ ### Payload demod ####################################################
payload_fft = fft.fft_vcc(self.fft_len, True, (), True)
+ payload_constellation = _get_constellation(bps_payload)
payload_equalizer = digital.ofdm_equalizer_simpledfe(
- fft_len, header_constellation.base(),
- occupied_carriers, pilot_carriers, pilot_symbols, 1
+ fft_len, payload_constellation.base(),
+ occupied_carriers,
+ pilot_carriers,
+ pilot_symbols,
+ 1 # Skip 1 symbol (that was already in the header)
+ )
+ payload_eq = digital.ofdm_frame_equalizer_vcvc(
+ payload_equalizer.base(),
+ cp_len,
+ self.frame_length_tag_key
+ )
+ payload_serializer = digital.ofdm_serializer_vcc(
+ fft_len, occupied_carriers,
+ self.frame_length_tag_key,
+ self.packet_length_tag_key,
+ 1 # Skip 1 symbol (that was already in the header)
)
- payload_eq = digital.ofdm_frame_equalizer_vcvc(payload_equalizer.base(), frame_length_tag_key)
- payload_serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers)
- payload_constellation = _get_constellation(bps_payload)
payload_demod = digital.constellation_decoder_cb(payload_constellation.base())
- bit_packer = blocks.repack_bits_bb(bps_payload, 8, packet_length_tag_key, True)
- self.connect((hpd, 1), payload_fft, payload_eq, payload_serializer, payload_demod, bit_packer, self)
+ repack = blocks.repack_bits_bb(bps_payload, 8, self.packet_length_tag_key, True)
+ crc = digital.crc32_bb(True, self.packet_length_tag_key)
+ self.connect((hpd, 1), payload_fft, payload_eq, payload_serializer, payload_demod, repack, crc, self)
+ if debug_log:
+ self.connect((hpd, 1), blocks.tag_debug(8*64, 'post-hpd'));
+ self.connect(payload_fft, blocks.file_sink(8*64, 'post-payload-fft.dat'))
+ self.connect(payload_eq, blocks.file_sink(8*64, 'post-payload-eq.dat'))
+ self.connect(payload_serializer, blocks.file_sink(8, 'post-payload-serializer.dat'))
+ self.connect(payload_demod, blocks.file_sink(1, 'post-payload-demod.dat'))
+ self.connect(repack, blocks.file_sink(1, 'post-payload-repack.dat'))
+ self.connect(crc, blocks.file_sink(1, 'post-payload-crc.dat'))
+ self.connect(crc, blocks.tag_debug(1, 'post-payload-crc'))
+
diff --git a/gr-digital/python/qa_crc32_bb.py b/gr-digital/python/qa_crc32_bb.py
index 6f5249ca08..4991f49e14 100755
--- a/gr-digital/python/qa_crc32_bb.py
+++ b/gr-digital/python/qa_crc32_bb.py
@@ -36,7 +36,7 @@ class qa_crc32_bb (gr_unittest.TestCase):
""" Make sure the output of a CRC set is 4 bytes longer than the input. """
data = range(16)
tag_name = "len"
- tag = gr.gr_tag_t()
+ tag = gr.tag_t()
tag.offset = 0
tag.key = pmt.string_to_symbol(tag_name)
tag.value = pmt.from_long(len(data))
@@ -53,7 +53,7 @@ class qa_crc32_bb (gr_unittest.TestCase):
is the same as the input. """
data = (0, 1, 2, 3, 4, 5, 6, 7, 8)
tag_name = "len"
- tag = gr.gr_tag_t()
+ tag = gr.tag_t()
tag.offset = 0
tag.key = pmt.string_to_symbol(tag_name)
tag.value = pmt.from_long(len(data))
@@ -70,23 +70,23 @@ class qa_crc32_bb (gr_unittest.TestCase):
tag_name = "length"
pack_len = 8
packets = range(pack_len*2)
- tag1 = gr.gr_tag_t()
+ tag1 = gr.tag_t()
tag1.offset = 0
tag1.key = pmt.string_to_symbol(tag_name)
tag1.value = pmt.from_long(pack_len)
- tag2 = gr.gr_tag_t()
+ tag2 = gr.tag_t()
tag2.offset = pack_len
tag2.key = pmt.string_to_symbol(tag_name)
tag2.value = pmt.from_long(pack_len)
- testtag1 = gr.gr_tag_t()
+ testtag1 = gr.tag_t()
testtag1.offset = 1
testtag1.key = pmt.string_to_symbol("tag1")
testtag1.value = pmt.from_long(0)
- testtag2 = gr.gr_tag_t()
+ testtag2 = gr.tag_t()
testtag2.offset = pack_len
testtag2.key = pmt.string_to_symbol("tag2")
testtag2.value = pmt.from_long(0)
- testtag3 = gr.gr_tag_t()
+ testtag3 = gr.tag_t()
testtag3.offset = len(packets)-1
testtag3.key = pmt.string_to_symbol("tag3")
testtag3.value = pmt.from_long(0)
@@ -112,7 +112,7 @@ class qa_crc32_bb (gr_unittest.TestCase):
""" Corrupt the data and make sure it fails CRC test. """
data = (0, 1, 2, 3, 4, 5, 6, 7)
tag_name = "len"
- tag = gr.gr_tag_t()
+ tag = gr.tag_t()
tag.offset = 0
tag.key = pmt.string_to_symbol(tag_name)
tag.value = pmt.from_long(len(data))
@@ -130,11 +130,11 @@ class qa_crc32_bb (gr_unittest.TestCase):
""" Make sure tags on the CRC aren't lost. """
data = (0, 1, 2, 3, 4, 5, 6, 7, 8, 230, 166, 39, 8)
tag_name = "len"
- tag = gr.gr_tag_t()
+ tag = gr.tag_t()
tag.offset = 0
tag.key = pmt.string_to_symbol(tag_name)
tag.value = pmt.from_long(len(data))
- testtag = gr.gr_tag_t()
+ testtag = gr.tag_t()
testtag.offset = len(data)-1
testtag.key = pmt.string_to_symbol('tag1')
testtag.value = pmt.from_long(0)
diff --git a/gr-digital/python/qa_ofdm_carrier_allocator_cvc.py b/gr-digital/python/qa_ofdm_carrier_allocator_cvc.py
index f5c72fb87e..c0c9929646 100755
--- a/gr-digital/python/qa_ofdm_carrier_allocator_cvc.py
+++ b/gr-digital/python/qa_ofdm_carrier_allocator_cvc.py
@@ -46,7 +46,7 @@ class qa_digital_carrier_allocator_cvc (gr_unittest.TestCase):
expected_result = tuple(sync_word[0] + [1j, 0, 0, 1, 2, 3])
# ^ DC carrier
tag_name = "len"
- tag = gr.gr_tag_t()
+ tag = gr.tag_t()
tag.offset = 0
tag.key = pmt.string_to_symbol(tag_name)
tag.value = pmt.from_long(len(tx_symbols))
@@ -74,7 +74,7 @@ class qa_digital_carrier_allocator_cvc (gr_unittest.TestCase):
expected_result = (1j, 0, 1, 2, 3)
# ^ DC carrier
tag_name = "len"
- tag = gr.gr_tag_t()
+ tag = gr.tag_t()
tag.offset = 0
tag.key = pmt.string_to_symbol(tag_name)
tag.value = pmt.from_long(len(tx_symbols))
@@ -100,7 +100,7 @@ class qa_digital_carrier_allocator_cvc (gr_unittest.TestCase):
pilot_carriers = ((3,),)
expected_result = (1j, 0, 1, 0, 2, 3)
tag_name = "len"
- tag = gr.gr_tag_t()
+ tag = gr.tag_t()
tag.offset = 0
tag.key = pmt.string_to_symbol(tag_name)
tag.value = pmt.from_long(len(tx_symbols))
@@ -134,27 +134,27 @@ class qa_digital_carrier_allocator_cvc (gr_unittest.TestCase):
0, 13, 1j, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 2j, 0, 0)
fft_len = 16
tag_name = "len"
- tag1 = gr.gr_tag_t()
+ tag1 = gr.tag_t()
tag1.offset = 0
tag1.key = pmt.string_to_symbol(tag_name)
tag1.value = pmt.from_long(len(tx_symbols))
- tag2 = gr.gr_tag_t()
+ tag2 = gr.tag_t()
tag2.offset = len(tx_symbols)
tag2.key = pmt.string_to_symbol(tag_name)
tag2.value = pmt.from_long(len(tx_symbols))
- testtag1 = gr.gr_tag_t()
+ testtag1 = gr.tag_t()
testtag1.offset = 0
testtag1.key = pmt.string_to_symbol('tag1')
testtag1.value = pmt.from_long(0)
- testtag2 = gr.gr_tag_t()
+ testtag2 = gr.tag_t()
testtag2.offset = 7 # On the 2nd OFDM symbol
testtag2.key = pmt.string_to_symbol('tag2')
testtag2.value = pmt.from_long(0)
- testtag3 = gr.gr_tag_t()
+ testtag3 = gr.tag_t()
testtag3.offset = len(tx_symbols)+1 # First OFDM symbol of packet 2
testtag3.key = pmt.string_to_symbol('tag3')
testtag3.value = pmt.from_long(0)
- testtag4 = gr.gr_tag_t()
+ testtag4 = gr.tag_t()
testtag4.offset = 2*len(tx_symbols)-1 # Last OFDM symbol of packet 2
testtag4.key = pmt.string_to_symbol('tag4')
testtag4.value = pmt.from_long(0)
diff --git a/gr-digital/python/qa_ofdm_chanest_vcvc.py b/gr-digital/python/qa_ofdm_chanest_vcvc.py
index d095bbcd9c..ae11c0534c 100755
--- a/gr-digital/python/qa_ofdm_chanest_vcvc.py
+++ b/gr-digital/python/qa_ofdm_chanest_vcvc.py
@@ -19,14 +19,16 @@
# Boston, MA 02110-1301, USA.
#
+import sys
+import numpy
+import random
from gnuradio import gr, gr_unittest
import pmt
import blocks_swig as blocks
import analog_swig as analog
import digital_swig as digital
-import sys
-import numpy
-import random
+import blocks_swig as blocks
+from ofdm_txrx import ofdm_tx
def shift_tuple(vec, N):
""" Shifts a vector by N elements. Fills up with zeros. """
@@ -61,11 +63,11 @@ class qa_ofdm_sync_eqinit_vcvc (gr_unittest.TestCase):
tx_data = shift_tuple(sync_symbol1, carr_offset) + \
shift_tuple(sync_symbol2, carr_offset) + \
shift_tuple(data_symbol, carr_offset)
- tag1 = gr.gr_tag_t()
+ tag1 = gr.tag_t()
tag1.offset = 0
tag1.key = pmt.string_to_symbol("test_tag_1")
tag1.value = pmt.from_long(23)
- tag2 = gr.gr_tag_t()
+ tag2 = gr.tag_t()
tag2.offset = 2
tag2.key = pmt.string_to_symbol("test_tag_2")
tag2.value = pmt.from_long(42)
@@ -129,7 +131,9 @@ class qa_ofdm_sync_eqinit_vcvc (gr_unittest.TestCase):
chan = blocks.multiply_const_vcc(channel)
chanest = digital.ofdm_chanest_vcvc(sync_symbol1, sync_symbol2, 1)
sink = blocks.vector_sink_c(fft_len)
+ sink_chanest = blocks.vector_sink_c(fft_len)
self.tb.connect(src, chan, chanest, sink)
+ self.tb.connect((chanest, 1), sink_chanest)
self.tb.run()
tags = sink.tags()
self.assertEqual(shift_tuple(sink.data(), -carr_offset), tuple(numpy.multiply(data_symbol, channel)))
@@ -138,6 +142,7 @@ class qa_ofdm_sync_eqinit_vcvc (gr_unittest.TestCase):
self.assertEqual(pmt.to_long(tag.value), carr_offset)
if pmt.symbol_to_string(tag.key) == 'ofdm_sync_chan_taps':
self.assertEqual(pmt.c32vector_elements(tag.value), channel)
+ self.assertEqual(sink_chanest.data(), channel)
def test_004_channel_no_carroffset_1sym (self):
""" Add a channel, check if it's correctly estimated.
@@ -147,13 +152,17 @@ class qa_ofdm_sync_eqinit_vcvc (gr_unittest.TestCase):
sync_symbol = (0, 0, 0, 1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 0)
data_symbol = (0, 0, 0, 1, -1, 1, -1, 1, 0, 1, -1, -1, -1, 1, 0, 0)
tx_data = sync_symbol + data_symbol
- channel = (0, 0, 0, 2, 2, 2, 2.5, 3, 2.5, 2, 2.5, 3, 2, 1, 1, 0)
+ channel = (0, 0, 0, 2, 2, 2, 2, 3, 3, 2.5, 2.5, -3, -3, 1j, 1j, 0)
+ #channel = (0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0)
src = blocks.vector_source_c(tx_data, False, fft_len)
chan = blocks.multiply_const_vcc(channel)
chanest = digital.ofdm_chanest_vcvc(sync_symbol, (), 1)
sink = blocks.vector_sink_c(fft_len)
+ sink_chanest = blocks.vector_sink_c(fft_len)
self.tb.connect(src, chan, chanest, sink)
+ self.tb.connect((chanest, 1), sink_chanest)
self.tb.run()
+ self.assertEqual(sink_chanest.data(), channel)
tags = sink.tags()
for tag in tags:
if pmt.symbol_to_string(tag.key) == 'ofdm_sync_carr_offset':
@@ -194,6 +203,7 @@ class qa_ofdm_sync_eqinit_vcvc (gr_unittest.TestCase):
data_symbol = (0, 0, 0, 1, -1, 1, -1, 1, 0, 1, -1, -1, -1, 1, 0, 0)
# Channel 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# Shifted (0, 0, 0, 0, 0, 1j, -1, 1, -1j, 1j, 0, 1, -1j, -1, -1j, 1)
+ chanest_exp = (0, 0, 0, 5, 6, 7, 8, 9, 0, 11, 12, 13, 14, 15, 0, 0)
tx_data = shift_tuple(sync_symbol1, carr_offset) + \
shift_tuple(sync_symbol2, carr_offset) + \
shift_tuple(data_symbol, carr_offset)
@@ -211,9 +221,7 @@ class qa_ofdm_sync_eqinit_vcvc (gr_unittest.TestCase):
self.assertEqual(pmt.to_long(tag.value), carr_offset)
if pmt.symbol_to_string(tag.key) == 'ofdm_sync_chan_taps':
chan_est = pmt.c32vector_elements(tag.value)
- for i in range(fft_len):
- if shift_tuple(sync_symbol2, carr_offset)[i]: # Only here the channel can be estimated
- self.assertEqual(chan_est[i], channel[i])
+ self.assertEqual(chan_est, chanest_exp)
self.assertEqual(sink.data(), tuple(numpy.multiply(shift_tuple(data_symbol, carr_offset), channel)))
@@ -227,7 +235,7 @@ class qa_ofdm_sync_eqinit_vcvc (gr_unittest.TestCase):
wgn_amplitude = 0.05
min_chan_ampl = 0.1
max_chan_ampl = 5
- n_iter = 20
+ n_iter = 20 # The more the accurater
def run_flow_graph(sync_sym1, sync_sym2, data_sym):
top_block = gr.top_block()
carr_offset = random.randint(-max_offset/2, max_offset/2) * 2
@@ -253,7 +261,7 @@ class qa_ofdm_sync_eqinit_vcvc (gr_unittest.TestCase):
carr_offset_hat = pmt.to_long(tag.value)
self.assertEqual(carr_offset, carr_offset_hat)
if pmt.symbol_to_string(tag.key) == 'ofdm_sync_chan_taps':
- channel_est = pmt.c32vector_elements(tag.value)
+ channel_est = shift_tuple(pmt.c32vector_elements(tag.value), carr_offset)
shifted_carrier_mask = shift_tuple(carrier_mask, carr_offset)
for i in range(fft_len):
if shifted_carrier_mask[i] and channel_est[i]:
diff --git a/gr-digital/python/qa_ofdm_cyclic_prefixer.py b/gr-digital/python/qa_ofdm_cyclic_prefixer.py
index 0469b3f970..69091d8d00 100755
--- a/gr-digital/python/qa_ofdm_cyclic_prefixer.py
+++ b/gr-digital/python/qa_ofdm_cyclic_prefixer.py
@@ -67,11 +67,11 @@ class test_ofdm_cyclic_prefixer (gr_unittest.TestCase):
tag_name = "length"
expected_result = (7.0/2, 8, 1, 2, 3, 4, 5, 6, 7, 8, # 1.0/2
7.0/2+1.0/2, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1.0/2)
- tag = gr.gr_tag_t()
+ tag = gr.tag_t()
tag.offset = 0
tag.key = pmt.string_to_symbol(tag_name)
tag.value = pmt.from_long(2)
- tag2 = gr.gr_tag_t()
+ tag2 = gr.tag_t()
tag2.offset = 1
tag2.key = pmt.string_to_symbol("random_tag")
tag2.value = pmt.from_long(42)
diff --git a/gr-digital/python/qa_ofdm_frame_equalizer_vcvc.py b/gr-digital/python/qa_ofdm_frame_equalizer_vcvc.py
index cb087da2f4..0c79125669 100755
--- a/gr-digital/python/qa_ofdm_frame_equalizer_vcvc.py
+++ b/gr-digital/python/qa_ofdm_frame_equalizer_vcvc.py
@@ -34,32 +34,156 @@ class qa_ofdm_frame_equalizer_vcvc (gr_unittest.TestCase):
self.tb = None
def test_001_simple (self):
- """ Very simple functionality testing """
+ """ Very simple functionality testing:
+ - static equalizer
+ - init channel state with all ones
+ - transmit all ones
+ - make sure we rx all ones
+ - Tag check: put in frame length tag and one other random tag,
+ make sure they're propagated
+ """
fft_len = 8
equalizer = digital.ofdm_equalizer_static(fft_len)
n_syms = 3
len_tag_key = "frame_len"
tx_data = (1,) * fft_len * n_syms
- len_tag = gr.gr_tag_t()
+ len_tag = gr.tag_t()
len_tag.offset = 0
len_tag.key = pmt.string_to_symbol(len_tag_key)
len_tag.value = pmt.from_long(n_syms)
- chan_tag = gr.gr_tag_t()
+ chan_tag = gr.tag_t()
chan_tag.offset = 0
chan_tag.key = pmt.string_to_symbol("ofdm_sync_chan_taps")
chan_tag.value = pmt.init_c32vector(fft_len, (1,) * fft_len)
- src = blocks.vector_source_c(tx_data, False, fft_len, (len_tag, chan_tag))
- eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), len_tag_key)
+ random_tag = gr.tag_t()
+ random_tag.offset = 1
+ random_tag.key = pmt.string_to_symbol("foo")
+ random_tag.value = pmt.from_long(42)
+ src = blocks.vector_source_c(tx_data, False, fft_len, (len_tag, chan_tag, random_tag))
+ eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), 0, len_tag_key)
sink = blocks.vector_sink_c(fft_len)
self.tb.connect(src, eq, sink)
self.tb.run ()
# Check data
self.assertEqual(tx_data, sink.data())
+ # Check tags
+ tag_dict = dict()
for tag in sink.tags():
- self.assertEqual(pmt.symbol_to_string(tag.key), len_tag_key)
- self.assertEqual(pmt.to_long(tag.value), n_syms)
+ ptag = gr.tag_to_python(tag)
+ tag_dict[ptag.key] = ptag.value
+ expected_dict = {
+ 'frame_len': n_syms,
+ 'foo': 42
+ }
+ self.assertEqual(tag_dict, expected_dict)
+
+ def test_001b_simple_skip_nothing (self):
+ """
+ Same as before, but put a skip-header in there
+ """
+ fft_len = 8
+ equalizer = digital.ofdm_equalizer_static(fft_len, symbols_skipped=1)
+ n_syms = 3
+ len_tag_key = "frame_len"
+ tx_data = (1,) * fft_len * n_syms
+ len_tag = gr.tag_t()
+ len_tag.offset = 0
+ len_tag.key = pmt.string_to_symbol(len_tag_key)
+ len_tag.value = pmt.from_long(n_syms)
+ chan_tag = gr.tag_t()
+ chan_tag.offset = 0
+ chan_tag.key = pmt.string_to_symbol("ofdm_sync_chan_taps")
+ chan_tag.value = pmt.init_c32vector(fft_len, (1,) * fft_len)
+ src = blocks.vector_source_c(tx_data, False, fft_len, (len_tag, chan_tag))
+ eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), 0, len_tag_key)
+ sink = blocks.vector_sink_c(fft_len)
+ self.tb.connect(src, eq, sink)
+ self.tb.run ()
+ # Check data
+ self.assertEqual(tx_data, sink.data())
+
+ def test_001c_carrier_offset_no_cp (self):
+ """
+ Same as before, but put a carrier offset in there
+ """
+ fft_len = 8
+ cp_len = 0
+ n_syms = 1
+ carr_offset = 1
+ occupied_carriers = ((-2, -1, 1, 2),)
+ tx_data = (
+ 0, 0, 0, -1j, -1j, 0, -1j, -1j,
+ )
+ # The rx'd signal is shifted
+ rx_expected = (0, 0, 1, 1, 0, 1, 1, 0) * n_syms
+ equalizer = digital.ofdm_equalizer_static(fft_len, occupied_carriers)
+ len_tag_key = "frame_len"
+ len_tag = gr.tag_t()
+ len_tag.offset = 0
+ len_tag.key = pmt.string_to_symbol(len_tag_key)
+ len_tag.value = pmt.from_long(n_syms)
+ chan_tag = gr.tag_t()
+ chan_tag.offset = 0
+ chan_tag.key = pmt.string_to_symbol("ofdm_sync_chan_taps")
+ # Note: this is shifted to the correct position!
+ chan_tag.value = pmt.init_c32vector(fft_len, (0, 0, -1j, -1j, 0, -1j, -1j, 0))
+ offset_tag = gr.tag_t()
+ offset_tag.offset = 0
+ offset_tag.key = pmt.string_to_symbol("ofdm_sync_carr_offset")
+ offset_tag.value = pmt.from_long(carr_offset)
+ src = blocks.vector_source_c(tx_data, False, fft_len, (len_tag, chan_tag, offset_tag))
+ eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), cp_len, len_tag_key)
+ sink = blocks.vector_sink_c(fft_len)
+ self.tb.connect(src, eq, sink)
+ self.tb.run ()
+ # Check data
+ self.assertComplexTuplesAlmostEqual(rx_expected, sink.data(), places=4)
+
+ def test_001c_carrier_offset_cp (self):
+ """
+ Same as before, but put a carrier offset in there and a CP
+ """
+ fft_len = 8
+ cp_len = 2
+ n_syms = 3
+ # cp_len/fft_len == 1/4, therefore, the phase is rotated by
+ # carr_offset * \pi/2 in every symbol
+ occupied_carriers = ((-2, -1, 1, 2),)
+ carr_offset = -1
+ tx_data = (
+ 0,-1j,-1j, 0,-1j,-1j, 0, 0,
+ 0, -1, -1, 0, -1, -1, 0, 0,
+ 0, 1j, 1j, 0, 1j, 1j, 0, 0,
+ )
+ # Rx'd signal is corrected
+ rx_expected = (0, 0, 1, 1, 0, 1, 1, 0) * n_syms
+ equalizer = digital.ofdm_equalizer_static(fft_len, occupied_carriers)
+ len_tag_key = "frame_len"
+ len_tag = gr.tag_t()
+ len_tag.offset = 0
+ len_tag.key = pmt.string_to_symbol(len_tag_key)
+ len_tag.value = pmt.from_long(n_syms)
+ chan_tag = gr.tag_t()
+ chan_tag.offset = 0
+ chan_tag.key = pmt.string_to_symbol("ofdm_sync_chan_taps")
+ chan_tag.value = pmt.init_c32vector(fft_len, (0, 0, 1, 1, 0, 1, 1, 0))
+ offset_tag = gr.tag_t()
+ offset_tag.offset = 0
+ offset_tag.key = pmt.string_to_symbol("ofdm_sync_carr_offset")
+ offset_tag.value = pmt.from_long(carr_offset)
+ src = blocks.vector_source_c(tx_data, False, fft_len, (len_tag, chan_tag, offset_tag))
+ eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), cp_len, len_tag_key)
+ sink = blocks.vector_sink_c(fft_len)
+ self.tb.connect(src, eq, sink)
+ self.tb.run ()
+ # Check data
+ self.assertComplexTuplesAlmostEqual(rx_expected, sink.data(), places=4)
def test_002_static (self):
+ """
+ - Add a simple channel
+ - Make symbols QPSK
+ """
fft_len = 8
# 4 5 6 7 0 1 2 3
tx_data = [-1, -1, 1, 2, -1, 3, 0, -1, # 0
@@ -76,35 +200,97 @@ class qa_ofdm_frame_equalizer_vcvc (gr_unittest.TestCase):
equalizer = digital.ofdm_equalizer_static(fft_len, occupied_carriers, pilot_carriers, pilot_symbols)
channel = [
0, 0, 1, 1, 0, 1, 1, 0,
- 0, 0, 1, 1, 0, 1, 1, 0, # These coefficients will be rotated slightly...
+ 0, 0, 1, 1, 0, 1, 1, 0, # These coefficients will be rotated slightly (but less than \pi/2)
0, 0, 1j, 1j, 0, 1j, 1j, 0, # Go crazy here!
- 0, 0, 1j, 1j, 0, 1j, 1j, 0 # ...and again here.
+ 0, 0, 1j, 1j, 0, 1j, 1j, 0
+ ]
+ channel = [
+ 0, 0, 1, 1, 0, 1, 1, 0,
+ 0, 0, 1, 1, 0, 1, 1, 0, # These coefficients will be rotated slightly (but less than \pi/2)
+ 0, 0, 1j, 1j, 0, 1j, 1j, 0, # Go crazy here!
+ 0, 0, 1j, 1j, 0, 1j, 1j, 0
]
for idx in range(fft_len, 2*fft_len):
channel[idx] = channel[idx-fft_len] * numpy.exp(1j * .1 * numpy.pi * (numpy.random.rand()-.5))
- idx2 = idx+2*fft_len
- channel[idx2] = channel[idx2] * numpy.exp(1j * 0 * numpy.pi * (numpy.random.rand()-.5))
len_tag_key = "frame_len"
- len_tag = gr.gr_tag_t()
+ len_tag = gr.tag_t()
len_tag.offset = 0
len_tag.key = pmt.string_to_symbol(len_tag_key)
len_tag.value = pmt.from_long(4)
- chan_tag = gr.gr_tag_t()
+ chan_tag = gr.tag_t()
chan_tag.offset = 0
chan_tag.key = pmt.string_to_symbol("ofdm_sync_chan_taps")
chan_tag.value = pmt.init_c32vector(fft_len, channel[:fft_len])
src = blocks.vector_source_c(numpy.multiply(tx_signal, channel), False, fft_len, (len_tag, chan_tag))
- eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), len_tag_key, True)
sink = blocks.vector_sink_c(fft_len)
+ eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), 0, len_tag_key, True)
self.tb.connect(src, eq, sink)
self.tb.run ()
rx_data = [cnst.decision_maker_v((x,)) if x != 0 else -1 for x in sink.data()]
+ # Check data
self.assertEqual(tx_data, rx_data)
+ # Check tags
+ tag_dict = dict()
for tag in sink.tags():
- if pmt.symbol_to_string(tag.key) == len_tag_key:
- self.assertEqual(pmt.to_long(tag.value), 4)
- if pmt.symbol_to_string(tag.key) == "ofdm_sync_chan_taps":
- self.assertEqual(list(pmt.c32vector_elements(tag.value)), channel[-fft_len:])
+ ptag = gr.tag_to_python(tag)
+ tag_dict[ptag.key] = ptag.value
+ if ptag.key == 'ofdm_sync_chan_taps':
+ tag_dict[ptag.key] = list(pmt.c32vector_elements(tag.value))
+ else:
+ tag_dict[ptag.key] = pmt.to_python(tag.value)
+ expected_dict = {
+ 'frame_len': 4,
+ 'ofdm_sync_chan_taps': channel[-fft_len:]
+ }
+ self.assertEqual(tag_dict, expected_dict)
+
+ def test_002_static_wo_tags (self):
+ """ Same as before, but the input stream has no tag.
+ We specify the frame size in the constructor.
+ We also specify a tag key, so the output stream *should* have
+ a length tag.
+ """
+ fft_len = 8
+ n_syms = 4
+ # 4 5 6 7 0 1 2 3
+ tx_data = [-1, -1, 1, 2, -1, 3, 0, -1, # 0
+ -1, -1, 0, 2, -1, 2, 0, -1, # 8
+ -1, -1, 3, 0, -1, 1, 0, -1, # 16 (Pilot symbols)
+ -1, -1, 1, 1, -1, 0, 2, -1] # 24
+ cnst = digital.constellation_qpsk()
+ tx_signal = [cnst.map_to_points_v(x)[0] if x != -1 else 0 for x in tx_data]
+ occupied_carriers = ((1, 2, 6, 7),)
+ pilot_carriers = ((), (), (1, 2, 6, 7), ())
+ pilot_symbols = (
+ [], [], [cnst.map_to_points_v(x)[0] for x in (1, 0, 3, 0)], []
+ )
+ equalizer = digital.ofdm_equalizer_static(fft_len, occupied_carriers, pilot_carriers, pilot_symbols)
+ channel = [
+ 0, 0, 1, 1, 0, 1, 1, 0,
+ 0, 0, 1, 1, 0, 1, 1, 0, # These coefficients will be rotated slightly (below)...
+ 0, 0, 1j, 1j, 0, 1j, 1j, 0, # Go crazy here!
+ 0, 0, 1j, 1j, 0, 1j, 1j, 0 # ...and again here.
+ ]
+ for idx in range(fft_len, 2*fft_len):
+ channel[idx] = channel[idx-fft_len] * numpy.exp(1j * .1 * numpy.pi * (numpy.random.rand()-.5))
+ idx2 = idx+2*fft_len
+ channel[idx2] = channel[idx2] * numpy.exp(1j * 0 * numpy.pi * (numpy.random.rand()-.5))
+ src = gr.vector_source_c(numpy.multiply(tx_signal, channel), False, fft_len)
+ # We do specify a length tag, it should then appear at the output
+ eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), 0, "frame_len", False, n_syms)
+ sink = blocks.vector_sink_c(fft_len)
+ self.tb.connect(src, eq, sink)
+ self.tb.run ()
+ rx_data = [cnst.decision_maker_v((x,)) if x != 0 else -1 for x in sink.data()]
+ self.assertEqual(tx_data, rx_data)
+ # Check len tag
+ tags = sink.tags()
+ len_tag = dict()
+ for tag in tags:
+ ptag = gr.tag_to_python(tag)
+ if ptag.key == 'frame_len':
+ len_tag[ptag.key] = ptag.value
+ self.assertEqual(len_tag, {'frame_len': 4})
def test_002_static_wo_tags (self):
fft_len = 8
@@ -132,14 +318,15 @@ class qa_ofdm_frame_equalizer_vcvc (gr_unittest.TestCase):
idx2 = idx+2*fft_len
channel[idx2] = channel[idx2] * numpy.exp(1j * 0 * numpy.pi * (numpy.random.rand()-.5))
src = blocks.vector_source_c(numpy.multiply(tx_signal, channel), False, fft_len)
- eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), "", False, 4)
sink = blocks.vector_sink_c(fft_len)
+ eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), 0, "", False, 4)
self.tb.connect(src, eq, sink)
self.tb.run ()
rx_data = [cnst.decision_maker_v((x,)) if x != 0 else -1 for x in sink.data()]
self.assertEqual(tx_data, rx_data)
def test_002_simpledfe (self):
+ """ Use the simple DFE equalizer. """
fft_len = 8
# 4 5 6 7 0 1 2 3
tx_data = [-1, -1, 1, 2, -1, 3, 0, -1, # 0
@@ -167,16 +354,16 @@ class qa_ofdm_frame_equalizer_vcvc (gr_unittest.TestCase):
idx2 = idx+2*fft_len
channel[idx2] = channel[idx2] * numpy.exp(1j * 0 * numpy.pi * (numpy.random.rand()-.5))
len_tag_key = "frame_len"
- len_tag = gr.gr_tag_t()
+ len_tag = gr.tag_t()
len_tag.offset = 0
len_tag.key = pmt.string_to_symbol(len_tag_key)
len_tag.value = pmt.from_long(4)
- chan_tag = gr.gr_tag_t()
+ chan_tag = gr.tag_t()
chan_tag.offset = 0
chan_tag.key = pmt.string_to_symbol("ofdm_sync_chan_taps")
chan_tag.value = pmt.init_c32vector(fft_len, channel[:fft_len])
src = blocks.vector_source_c(numpy.multiply(tx_signal, channel), False, fft_len, (len_tag, chan_tag))
- eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), len_tag_key, True)
+ eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), 0, len_tag_key, True)
sink = blocks.vector_sink_c(fft_len)
self.tb.connect(src, eq, sink)
self.tb.run ()
diff --git a/gr-digital/python/qa_ofdm_serializer_vcc.py b/gr-digital/python/qa_ofdm_serializer_vcc.py
index d0f0bf6449..c53b4e4955 100755
--- a/gr-digital/python/qa_ofdm_serializer_vcc.py
+++ b/gr-digital/python/qa_ofdm_serializer_vcc.py
@@ -20,13 +20,13 @@
# Boston, MA 02110-1301, USA.
#
+import numpy
from gnuradio import gr, gr_unittest
+import pmt
import blocks_swig as blocks
import fft_swig as fft
import analog_swig as analog
import digital_swig as digital
-import pmt
-import numpy
class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
@@ -39,7 +39,6 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
def test_001_simple (self):
""" Standard test """
fft_len = 16
- tx_symbols = range(1, 16);
tx_symbols = (0, 1, 1j, 2, 3, 0, 0, 0, 0, 0, 0, 4, 5, 2j, 6, 0,
0, 7, 8, 3j, 9, 0, 0, 0, 0, 0, 0, 10, 4j, 11, 12, 0,
0, 13, 1j, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 2j, 0, 0)
@@ -47,12 +46,39 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
occupied_carriers = ((1, 3, 4, 11, 12, 14), (1, 2, 4, 11, 13, 14),)
n_syms = len(tx_symbols)/fft_len
tag_name = "len"
- tag = gr.gr_tag_t()
+ tag = gr.tag_t()
+ tag.offset = 0
+ tag.key = pmt.string_to_symbol(tag_name)
+ tag.value = pmt.from_long(n_syms)
+ src = blocks.vector_source_c(tx_symbols, False, fft_len, (tag,))
+ serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers, tag_name, "", 0, "", False)
+ sink = blocks.vector_sink_c()
+ self.tb.connect(src, serializer, sink)
+ self.tb.run ()
+ self.assertEqual(sink.data(), expected_result)
+ self.assertEqual(len(sink.tags()), 1)
+ result_tag = sink.tags()[0]
+ self.assertEqual(pmt.symbol_to_string(result_tag.key), tag_name)
+ self.assertEqual(pmt.to_long(result_tag.value), n_syms * len(occupied_carriers[0]))
+
+ def test_001b_shifted (self):
+ """ Same as before, but shifted, because that's the normal mode in OFDM Rx """
+ fft_len = 16
+ tx_symbols = (
+ 0, 0, 0, 0, 0, 0, 1, 2, 0, 3, 4, 5, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6, 1j, 7, 8, 0, 9, 10, 1j, 11, 0, 0, 0,
+ 0, 0, 0, 0, 0, 12, 13, 14, 0, 15, 16, 17, 0, 0, 0, 0,
+ )
+ expected_result = tuple(range(18))
+ occupied_carriers = ((13, 14, 15, 1, 2, 3), (-4, -2, -1, 1, 2, 4),)
+ n_syms = len(tx_symbols)/fft_len
+ tag_name = "len"
+ tag = gr.tag_t()
tag.offset = 0
tag.key = pmt.string_to_symbol(tag_name)
tag.value = pmt.from_long(n_syms)
src = blocks.vector_source_c(tx_symbols, False, fft_len, (tag,))
- serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers, tag_name, "", 0, False)
+ serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers, tag_name)
sink = blocks.vector_sink_c()
self.tb.connect(src, serializer, sink)
self.tb.run ()
@@ -74,17 +100,24 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
occupied_carriers = ((1, 3, 4, 11, 12, 14), (1, 2, 4, 11, 13, 14),)
n_syms = len(tx_symbols)/fft_len
tag_name = "len"
- tag = gr.gr_tag_t()
+ tag = gr.tag_t()
tag.offset = 0
tag.key = pmt.string_to_symbol(tag_name)
tag.value = pmt.from_long(n_syms)
- offsettag = gr.gr_tag_t()
+ offsettag = gr.tag_t()
offsettag.offset = 0
offsettag.key = pmt.string_to_symbol("ofdm_sync_carr_offset")
offsettag.value = pmt.from_long(carr_offset)
src = blocks.vector_source_c(tx_symbols, False, fft_len, (tag, offsettag))
- serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers, tag_name, "", 0, False)
sink = blocks.vector_sink_c()
+ serializer = digital.ofdm_serializer_vcc(
+ fft_len,
+ occupied_carriers,
+ tag_name,
+ "", 0,
+ "ofdm_sync_carr_offset",
+ False
+ )
self.tb.connect(src, serializer, sink)
self.tb.run ()
self.assertEqual(sink.data(), expected_result)
@@ -96,29 +129,39 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
def test_003_connect (self):
""" Connect carrier_allocator to ofdm_serializer,
make sure output==input """
- fft_len = 32
- n_syms = 10
+ fft_len = 8
+ n_syms = 1
occupied_carriers = ((1, 2, 6, 7),)
pilot_carriers = ((3,),(5,))
pilot_symbols = ((1j,),(-1j,))
- sync_word = (range(fft_len),)
- tx_data = tuple([numpy.random.randint(0, 10) for x in range(4 * n_syms)])
+ #tx_data = tuple([numpy.random.randint(0, 10) for x in range(4 * n_syms)])
+ tx_data = (1, 2, 3, 4)
tag_name = "len"
- tag = gr.gr_tag_t()
+ tag = gr.tag_t()
tag.offset = 0
tag.key = pmt.string_to_symbol(tag_name)
tag.value = pmt.from_long(len(tx_data))
src = blocks.vector_source_c(tx_data, False, 1, (tag,))
- alloc = digital.ofdm_carrier_allocator_cvc(fft_len,
- occupied_carriers,
- pilot_carriers,
- pilot_symbols, sync_word,
- tag_name)
- serializer = digital.ofdm_serializer_vcc(alloc)
+ alloc = digital.ofdm_carrier_allocator_cvc(
+ fft_len,
+ occupied_carriers,
+ pilot_carriers,
+ pilot_symbols,
+ (), # No sync word
+ tag_name,
+ True # Output is shifted (default)
+ )
+ serializer = digital.ofdm_serializer_vcc(
+ alloc,
+ "", # Len tag key
+ 0, # Symbols skipped
+ "", # Carrier offset key
+ True # Input is shifted (default)
+ )
sink = blocks.vector_sink_c()
self.tb.connect(src, alloc, serializer, sink)
self.tb.run ()
- self.assertEqual(sink.data()[4:], tx_data)
+ self.assertEqual(sink.data(), tx_data)
def test_004_connect (self):
"""
@@ -129,21 +172,19 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
- Frequency offset is -2 carriers
"""
fft_len = 8
- n_syms = 2
+ n_syms = 1
carr_offset = -2
- freq_offset = 2 * numpy.pi * carr_offset / fft_len # If the sampling rate == 1
- occupied_carriers = ((1, 2, -2, -1),)
- pilot_carriers = ((3,),(5,))
+ freq_offset = 1.0 / fft_len * carr_offset # Normalized frequency
+ occupied_carriers = ((-2, -1, 1, 2),)
+ pilot_carriers = ((-3,),(3,))
pilot_symbols = ((1j,),(-1j,))
- sync_word = (range(fft_len),)
- tx_data = tuple([numpy.random.randint(0, 10) for x in range(4 * n_syms)])
- #tx_data = (1,) * occupied_carriers[0] * n_syms
+ tx_data = (1, 2, 3, 4)
tag_name = "len"
- tag = gr.gr_tag_t()
+ tag = gr.tag_t()
tag.offset = 0
tag.key = pmt.string_to_symbol(tag_name)
tag.value = pmt.from_long(len(tx_data))
- offsettag = gr.gr_tag_t()
+ offsettag = gr.tag_t()
offsettag.offset = 0
offsettag.key = pmt.string_to_symbol("ofdm_sync_carr_offset")
offsettag.value = pmt.from_long(carr_offset)
@@ -151,13 +192,17 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
alloc = digital.ofdm_carrier_allocator_cvc(fft_len,
occupied_carriers,
pilot_carriers,
- pilot_symbols, sync_word,
+ pilot_symbols, (),
tag_name)
- tx_ifft = fft.fft_vcc(fft_len, False, ())
- offset_sig = analog.sig_source_c(1.0, analog.GR_COS_WAVE, freq_offset, 1.0)
+ tx_ifft = fft.fft_vcc(fft_len, False, (1.0/fft_len,)*fft_len, True)
+ oscillator = analog.sig_source_c(1.0, analog.GR_COS_WAVE, freq_offset, 1.0/fft_len)
mixer = blocks.multiply_cc()
rx_fft = fft.fft_vcc(fft_len, True, (), True)
- serializer = digital.ofdm_serializer_vcc(alloc)
+ sink2 = blocks.vector_sink_c(fft_len)
+ self.tb.connect(rx_fft, sink2)
+ serializer = digital.ofdm_serializer_vcc(
+ alloc, "", 0, "ofdm_sync_carr_offset", True
+ )
sink = blocks.vector_sink_c()
self.tb.connect(
src, alloc, tx_ifft,
@@ -166,10 +211,9 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
blocks.stream_to_vector(gr.sizeof_gr_complex, fft_len),
rx_fft, serializer, sink
)
- self.tb.connect(offset_sig, (mixer, 1))
+ self.tb.connect(oscillator, (mixer, 1))
self.tb.run ()
- # FIXME check this
- #self.assertEqual(sink.data(), tx_data)
+ self.assertComplexTuplesAlmostEqual(sink.data()[-len(occupied_carriers[0]):], tx_data, places=4)
def test_005_packet_len_tag (self):
""" Standard test """
@@ -182,16 +226,16 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
occupied_carriers = ((1, 3, 4, 11, 12, 14), (1, 2, 4, 11, 13, 14),)
n_syms = len(tx_symbols)/fft_len
tag_name = "len"
- tag = gr.gr_tag_t()
+ tag = gr.tag_t()
tag.offset = 0
tag.key = pmt.string_to_symbol(tag_name)
tag.value = pmt.from_long(n_syms)
- tag2 = gr.gr_tag_t()
+ tag2 = gr.tag_t()
tag2.offset = 0
tag2.key = pmt.string_to_symbol("packet_len")
tag2.value = pmt.from_long(len(expected_result))
src = blocks.vector_source_c(tx_symbols, False, fft_len, (tag, tag2))
- serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers, tag_name, "packet_len", 0, False)
+ serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers, tag_name, "packet_len", 0, "", False)
sink = blocks.vector_sink_c()
self.tb.connect(src, serializer, sink)
self.tb.run ()
@@ -204,7 +248,7 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
def test_099 (self):
""" Make sure it fails if it should """
fft_len = 16
- occupied_carriers = ((1, 3, 4, 11, 12, 17),)
+ occupied_carriers = ((1, 3, 4, 11, 12, 112),)
tag_name = "len"
self.assertRaises(RuntimeError, digital.ofdm_serializer_vcc, fft_len, occupied_carriers, tag_name)
diff --git a/gr-digital/python/qa_ofdm_sync_sc_cfb.py b/gr-digital/python/qa_ofdm_sync_sc_cfb.py
index 06c5a9dc35..3a9bdb5d14 100755
--- a/gr-digital/python/qa_ofdm_sync_sc_cfb.py
+++ b/gr-digital/python/qa_ofdm_sync_sc_cfb.py
@@ -26,6 +26,7 @@ import random
from gnuradio import gr, gr_unittest
import blocks_swig as blocks
import analog_swig as analog
+import channels_swig as channels
try:
# This will work when feature #505 is added.
@@ -78,26 +79,23 @@ class qa_ofdm_sync_sc_cfb (gr_unittest.TestCase):
self.assertEqual(numpy.sum(sig1_detect), 1)
self.assertEqual(numpy.sum(sig2_detect), 1)
-
def test_002_freq (self):
""" Add a fine frequency offset and see if that get's detected properly """
fft_len = 32
cp_len = 4
- freq_offset = 0.1 # Must stay < 2*pi/fft_len = 0.196 (otherwise, it's coarse)
+ # This frequency offset is normalized to rads, i.e. \pi == f_s/2
+ max_freq_offset = 2*numpy.pi/fft_len # Otherwise, it's coarse
+ freq_offset = ((2 * random.random()) - 1) * max_freq_offset
sig_len = (fft_len + cp_len) * 10
sync_symbol = [(random.randint(0, 1)*2)-1 for x in range(fft_len/2)] * 2
tx_signal = sync_symbol[-cp_len:] + \
sync_symbol + \
[(random.randint(0, 1)*2)-1 for x in range(sig_len)]
- mult = blocks.multiply_cc()
- add = blocks.add_cc()
- sync = digital.ofdm_sync_sc_cfb(fft_len, cp_len)
+ sync = digital.ofdm_sync_sc_cfb(fft_len, cp_len, True)
sink_freq = blocks.vector_sink_f()
sink_detect = blocks.vector_sink_b()
- self.tb.connect(blocks.vector_source_c(tx_signal), (mult, 0), (add, 0))
- self.tb.connect(analog.sig_source_c(2 * numpy.pi, analog.GR_SIN_WAVE, freq_offset, 1.0), (mult, 1))
- self.tb.connect(analog.noise_source_c(analog.GR_GAUSSIAN, .01), (add, 1))
- self.tb.connect(add, sync)
+ channel = channels.channel_model(0.005, freq_offset / 2.0 / numpy.pi)
+ self.tb.connect(blocks.vector_source_c(tx_signal), channel, sync)
self.tb.connect((sync, 0), sink_freq)
self.tb.connect((sync, 1), sink_detect)
self.tb.run()
@@ -105,7 +103,6 @@ class qa_ofdm_sync_sc_cfb (gr_unittest.TestCase):
est_freq_offset = 2 * phi_hat / fft_len
self.assertAlmostEqual(est_freq_offset, freq_offset, places=2)
-
def test_003_multiburst (self):
""" Send several bursts, see if the number of detects is correct.
Burst lengths and content are random.
@@ -124,75 +121,55 @@ class qa_ofdm_sync_sc_cfb (gr_unittest.TestCase):
sync = digital.ofdm_sync_sc_cfb(fft_len, cp_len)
sink_freq = blocks.vector_sink_f()
sink_detect = blocks.vector_sink_b()
- self.tb.connect(blocks.vector_source_c(tx_signal), (add, 0))
- self.tb.connect(analog.noise_source_c(analog.GR_GAUSSIAN, .005), (add, 1))
- self.tb.connect(add, sync)
+ channel = channels.channel_model(0.005)
+ self.tb.connect(blocks.vector_source_c(tx_signal), channel, sync)
self.tb.connect((sync, 0), sink_freq)
self.tb.connect((sync, 1), sink_detect)
self.tb.run()
- self.assertEqual(numpy.sum(sink_detect.data()), n_bursts,
+ n_bursts_detected = numpy.sum(sink_detect.data())
+ # We allow for one false alarm or missed burst
+ self.assertTrue(abs(n_bursts_detected - n_bursts) <= 1,
msg="""Because of statistics, it is possible (though unlikely)
that the number of detected bursts differs slightly. If the number of detects is
off by one or two, run the test again and see what happen.
Detection error was: %d """ % (numpy.sum(sink_detect.data()) - n_bursts)
)
- # FIXME ofdm_mod is currently not working
- #def test_004_ofdm_packets (self):
- #"""
- #Send several bursts, see if the number of detects is correct.
- #Burst lengths and content are random.
- #"""
- #n_bursts = 42
- #fft_len = 64
- #cp_len = 12
- #tx_signal = []
- #packets = []
- #tagname = "length"
- #min_packet_length = 100
- #max_packet_length = 100
- #sync_sequence = [random.randint(0, 1)*2-1 for x in range(fft_len/2)]
- #for i in xrange(n_bursts):
- #packet_length = random.randint(min_packet_length,
- #max_packet_length+1)
- #packet = [random.randint(0, 255) for i in range(packet_length)]
- #packets.append(packet)
- #data, tags = tagged_streams.packets_to_vectors(
- #packets, tagname, vlen=1)
- #total_length = len(data)
-
- #src = blocks.vector_source_b(data, False, 1, tags)
- #mod = ofdm_tx(
- #fft_len=fft_len,
- #cp_len=cp_len,
- #length_tag_name=tagname,
- #occupied_carriers=(range(1, 27) + range(38, 64),),
- #pilot_carriers=((0,),),
- #pilot_symbols=((100,),),
- #)
- #rate_in = 16000
- #rate_out = 48000
- #ratio = float(rate_out) / rate_in
- #throttle1 = gr.throttle(gr.sizeof_gr_complex, rate_in)
- #sink_countbursts = gr.vector_sink_c()
- #head = gr.head(gr.sizeof_gr_complex, int(total_length * ratio*2))
- #add = gr.add_cc()
- #sync = digital.ofdm_sync_sc_cfb(fft_len, cp_len)
- #sink_freq = blocks.vector_sink_f()
- #sink_detect = blocks.vector_sink_b()
- #noise_level = 0.01
- #noise = gr.noise_source_c(gr.GR_GAUSSIAN, noise_level)
- #self.tb.connect(src, mod, blocks.null_sink(gr.sizeof_gr_complex))
- #self.tb.connect(insert_zeros, sink_countbursts)
- #self.tb.connect(noise, (add, 1))
- #self.tb.connect(add, sync)
- #self.tb.connect((sync, 0), sink_freq)
- #self.tb.connect((sync, 1), sink_detect)
- #self.tb.run()
- #count_data = sink_countbursts.data()
- #count_tags = sink_countbursts.tags()
- #burstcount = tagged_streams.count_bursts(count_data, count_tags, tagname)
- #self.assertEqual(numpy.sum(sink_detect.data()), burstcount)
+ def test_004_ofdm_packets (self):
+ """
+ Send several bursts using ofdm_tx, see if the number of detects is correct.
+ Burst lengths and content are random.
+ """
+ n_bursts = 42
+ fft_len = 64
+ cp_len = 16
+ # Here, coarse freq offset is allowed
+ max_freq_offset = 2*numpy.pi/fft_len * 4
+ freq_offset = ((2 * random.random()) - 1) * max_freq_offset
+ tx_signal = []
+ packets = []
+ tagname = "packet_length"
+ min_packet_length = 10
+ max_packet_length = 50
+ sync_sequence = [random.randint(0, 1)*2-1 for x in range(fft_len/2)]
+ for i in xrange(n_bursts):
+ packet_length = random.randint(min_packet_length,
+ max_packet_length+1)
+ packet = [random.randint(0, 255) for i in range(packet_length)]
+ packets.append(packet)
+ data, tags = tagged_streams.packets_to_vectors(packets, tagname, vlen=1)
+ total_length = len(data)
+ src = blocks.vector_source_b(data, False, 1, tags)
+ mod = ofdm_tx(packet_length_tag_key=tagname)
+ sync = digital.ofdm_sync_sc_cfb(fft_len, cp_len)
+ sink_freq = blocks.vector_sink_f()
+ sink_detect = blocks.vector_sink_b()
+ noise_level = 0.005
+ channel = channels.channel_model(noise_level, freq_offset / 2 / numpy.pi)
+ self.tb.connect(src, mod, channel, sync, sink_freq)
+ self.tb.connect((sync, 1), sink_detect)
+ self.tb.run()
+ self.assertEqual(numpy.sum(sink_detect.data()), n_bursts)
if __name__ == '__main__':
diff --git a/gr-digital/python/qa_ofdm_txrx.py b/gr-digital/python/qa_ofdm_txrx.py
index 15c5b90fe9..568ae0d40a 100755
--- a/gr-digital/python/qa_ofdm_txrx.py
+++ b/gr-digital/python/qa_ofdm_txrx.py
@@ -21,13 +21,47 @@
#
import numpy
+import scipy
import random
from gnuradio import gr, gr_unittest
-import digital_swig as digital
import blocks_swig as blocks
+import digital_swig as digital
+import channels_swig as channels
from ofdm_txrx import ofdm_tx, ofdm_rx
from utils import tagged_streams
+# Set this to true if you need to write out data
+LOG_DEBUG_INFO=False
+
+class ofdm_tx_fg (gr.top_block):
+ def __init__(self, data, len_tag_key):
+ gr.top_block.__init__(self, "ofdm_tx")
+ tx_data, tags = tagged_streams.packets_to_vectors((data,), len_tag_key)
+ src = blocks.vector_source_b(data, False, 1, tags)
+ self.tx = ofdm_tx(packet_length_tag_key=len_tag_key, debug_log=LOG_DEBUG_INFO)
+ self.sink = blocks.vector_sink_c()
+ self.connect(src, self.tx, self.sink)
+
+ def get_tx_samples(self):
+ return self.sink.data()
+
+class ofdm_rx_fg (gr.top_block):
+ def __init__(self, samples, len_tag_key, channel=None, prepend_zeros=100):
+ gr.top_block.__init__(self, "ofdm_rx")
+ if prepend_zeros:
+ samples = (0,) * prepend_zeros + tuple(samples)
+ src = blocks.vector_source_c(tuple(samples) + (0,) * 1000)
+ self.rx = ofdm_rx(frame_length_tag_key=len_tag_key, debug_log=LOG_DEBUG_INFO)
+ if channel is not None:
+ self.connect(src, channel, self.rx)
+ else:
+ self.connect(src, self.rx)
+ self.sink = blocks.vector_sink_b()
+ self.connect(self.rx, self.sink)
+
+ def get_rx_bytes(self):
+ return self.sink.data()
+
class test_ofdm_txrx (gr_unittest.TestCase):
def setUp (self):
@@ -36,26 +70,72 @@ class test_ofdm_txrx (gr_unittest.TestCase):
def tearDown (self):
self.tb = None
- def test_001 (self):
- pass
- #len_tag_key = 'frame_len'
- #n_bytes = 100
- #test_data = [random.randint(0, 255) for x in range(n_bytes)]
- #tx_data, tags = tagged_streams.packets_to_vectors((test_data,), len_tag_key)
- #src = blocks.vector_source_b(test_data, False, 1, tags)
- #tx = ofdm_tx(frame_length_tag_key=len_tag_key)
- #rx = ofdm_rx(frame_length_tag_key=len_tag_key)
- #self.assertEqual(tx.sync_word1, rx.sync_word1)
- #self.assertEqual(tx.sync_word2, rx.sync_word2)
- #delay = blocks.delay(gr.sizeof_gr_complex, 100)
- #noise = analog.noise_source_c(analog.GR_GAUSSIAN, 0.05)
- #add = blocks.add_cc()
- #sink = blocks.vector_sink_b()
- ##self.tb.connect(src, tx, add, rx, sink)
- ##self.tb.connect(noise, (add, 1))
- #self.tb.connect(src, tx, blocks.null_sink(gr.sizeof_gr_complex))
- #self.tb.run()
+ def test_001_tx (self):
+ """ Just make sure the Tx works in general """
+ len_tag_key = 'frame_len'
+ n_bytes = 52
+ n_samples_expected = (numpy.ceil(1.0 * (n_bytes + 4) / 6) + 3) * 80
+ test_data = [random.randint(0, 255) for x in range(n_bytes)]
+ tx_data, tags = tagged_streams.packets_to_vectors((test_data,), len_tag_key)
+ src = blocks.vector_source_b(test_data, False, 1, tags)
+ tx = ofdm_tx(packet_length_tag_key=len_tag_key)
+ tx_fg = ofdm_tx_fg(test_data, len_tag_key)
+ tx_fg.run()
+ self.assertEqual(len(tx_fg.get_tx_samples()), n_samples_expected)
+
+ def test_002_rx_only_noise(self):
+ """ Run the RX with only noise, check it doesn't crash
+ or return a burst. """
+ len_tag_key = 'frame_len'
+ samples = (0,) * 1000
+ channel = channels.channel_model(0.1)
+ rx_fg = ofdm_rx_fg(samples, len_tag_key, channel)
+ rx_fg.run()
+ self.assertEqual(len(rx_fg.get_rx_bytes()), 0)
+
+ def test_003_tx1packet(self):
+ """ Transmit one packet, with slight AWGN and slight frequency + timing offset.
+ Check packet is received and no bit errors have occurred. """
+ len_tag_key = 'frame_len'
+ n_bytes = 21
+ fft_len = 64
+ test_data = tuple([random.randint(0, 255) for x in range(n_bytes)])
+ # 1.0/fft_len is one sub-carrier, a fine freq offset stays below that
+ freq_offset = 1.0 / fft_len * 0.7
+ #channel = channels.channel_model(0.01, freq_offset)
+ channel = None
+ # Tx
+ tx_fg = ofdm_tx_fg(test_data, len_tag_key)
+ tx_fg.run()
+ tx_samples = tx_fg.get_tx_samples()
+ # Rx
+ rx_fg = ofdm_rx_fg(tx_samples, len_tag_key, channel, prepend_zeros=100)
+ rx_fg.run()
+ rx_data = rx_fg.get_rx_bytes()
+ self.assertEqual(tuple(tx_fg.tx.sync_word1), tuple(rx_fg.rx.sync_word1))
+ self.assertEqual(tuple(tx_fg.tx.sync_word2), tuple(rx_fg.rx.sync_word2))
+ self.assertEqual(test_data, rx_data)
+ def test_004_tx1packet_large_fO(self):
+ """ Transmit one packet, with slight AWGN and large frequency offset.
+ Check packet is received and no bit errors have occurred. """
+ fft_len = 64
+ len_tag_key = 'frame_len'
+ n_bytes = 21
+ test_data = tuple([random.randint(0, 255) for x in range(n_bytes)])
+ #test_data = tuple([255 for x in range(n_bytes)])
+ # 1.0/fft_len is one sub-carrier
+ frequency_offset = 1.0 / fft_len * 2.5
+ channel = channels.channel_model(0.00001, frequency_offset)
+ # Tx
+ tx_fg = ofdm_tx_fg(test_data, len_tag_key)
+ tx_fg.run()
+ tx_samples = tx_fg.get_tx_samples()
+ # Rx
+ rx_fg = ofdm_rx_fg(tx_samples, len_tag_key, channel, prepend_zeros=100)
+ rx_fg.run()
+ rx_data = rx_fg.get_rx_bytes()
+ self.assertEqual(test_data, rx_data)
if __name__ == '__main__':
gr_unittest.run(test_ofdm_txrx, "test_ofdm_txrx.xml")
diff --git a/gr-digital/python/qa_packet_headergenerator_bb.py b/gr-digital/python/qa_packet_headergenerator_bb.py
index 03d3af3010..0471385afd 100755
--- a/gr-digital/python/qa_packet_headergenerator_bb.py
+++ b/gr-digital/python/qa_packet_headergenerator_bb.py
@@ -36,15 +36,15 @@ class qa_packet_headergenerator_bb (gr_unittest.TestCase):
# 3 PDUs: | | |
data = (1, 2, 3, 4, 1, 2) + tuple(range(25))
tagname = "packet_len"
- tag1 = gr.gr_tag_t()
+ tag1 = gr.tag_t()
tag1.offset = 0
tag1.key = pmt.string_to_symbol(tagname)
tag1.value = pmt.from_long(4)
- tag2 = gr.gr_tag_t()
+ tag2 = gr.tag_t()
tag2.offset = 4
tag2.key = pmt.string_to_symbol(tagname)
tag2.value = pmt.from_long(2)
- tag3 = gr.gr_tag_t()
+ tag3 = gr.tag_t()
tag3.offset = 6
tag3.key = pmt.string_to_symbol(tagname)
tag3.value = pmt.from_long(25)
@@ -65,15 +65,15 @@ class qa_packet_headergenerator_bb (gr_unittest.TestCase):
# 3 PDUs: | | | |
data = (1, 2, 3, 4, 1, 2, 1, 2, 3, 4)
tagname = "packet_len"
- tag1 = gr.gr_tag_t()
+ tag1 = gr.tag_t()
tag1.offset = 0
tag1.key = pmt.string_to_symbol(tagname)
tag1.value = pmt.from_long(4)
- tag2 = gr.gr_tag_t()
+ tag2 = gr.tag_t()
tag2.offset = 4
tag2.key = pmt.string_to_symbol(tagname)
tag2.value = pmt.from_long(2)
- tag3 = gr.gr_tag_t()
+ tag3 = gr.tag_t()
tag3.offset = 6
tag3.key = pmt.string_to_symbol(tagname)
tag3.value = pmt.from_long(4)
@@ -95,15 +95,15 @@ class qa_packet_headergenerator_bb (gr_unittest.TestCase):
# 3 PDUs: | | | |
data = (1, 2, 3, 4, 1, 2, 1, 2, 3, 4)
tagname = "packet_len"
- tag1 = gr.gr_tag_t()
+ tag1 = gr.tag_t()
tag1.offset = 0
tag1.key = pmt.string_to_symbol(tagname)
tag1.value = pmt.from_long(4)
- tag2 = gr.gr_tag_t()
+ tag2 = gr.tag_t()
tag2.offset = 4
tag2.key = pmt.string_to_symbol(tagname)
tag2.value = pmt.from_long(2)
- tag3 = gr.gr_tag_t()
+ tag3 = gr.tag_t()
tag3.offset = 6
tag3.key = pmt.string_to_symbol(tagname)
tag3.value = pmt.from_long(4)
@@ -125,15 +125,15 @@ class qa_packet_headergenerator_bb (gr_unittest.TestCase):
# 3 PDUs: | | | |
data = (1, 2, 3, 4, 1, 2, 1, 2, 3, 4)
tagname = "packet_len"
- tag1 = gr.gr_tag_t()
+ tag1 = gr.tag_t()
tag1.offset = 0
tag1.key = pmt.string_to_symbol(tagname)
tag1.value = pmt.from_long(4)
- tag2 = gr.gr_tag_t()
+ tag2 = gr.tag_t()
tag2.offset = 4
tag2.key = pmt.string_to_symbol(tagname)
tag2.value = pmt.from_long(2)
- tag3 = gr.gr_tag_t()
+ tag3 = gr.tag_t()
tag3.offset = 6
tag3.key = pmt.string_to_symbol(tagname)
tag3.value = pmt.from_long(4)
diff --git a/gr-digital/python/qa_packet_headerparser_b.py b/gr-digital/python/qa_packet_headerparser_b.py
index ff74da5657..cf8e1e932e 100755
--- a/gr-digital/python/qa_packet_headerparser_b.py
+++ b/gr-digital/python/qa_packet_headerparser_b.py
@@ -48,8 +48,11 @@ class qa_packet_headerparser_b (gr_unittest.TestCase):
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0
)
packet_len_tagname = "packet_len"
-
- src = blocks.vector_source_b(encoded_headers)
+ random_tag = gr.tag_t()
+ random_tag.offset = 5
+ random_tag.key = pmt.string_to_symbol("foo")
+ random_tag.value = pmt.from_long(42)
+ src = blocks.vector_source_b(encoded_headers, tags=(random_tag,))
parser = digital.packet_headerparser_b(32, packet_len_tagname)
sink = blocks.message_debug()
self.tb.connect(src, parser)
@@ -62,7 +65,7 @@ class qa_packet_headerparser_b (gr_unittest.TestCase):
msg1 = pmt.to_python(sink.get_message(0))
msg2 = pmt.to_python(sink.get_message(1))
msg3 = pmt.to_python(sink.get_message(2))
- self.assertEqual(msg1, {'packet_len': 4, 'packet_num': 0})
+ self.assertEqual(msg1, {'packet_len': 4, 'packet_num': 0, 'foo': 42})
self.assertEqual(msg2, {'packet_len': 2, 'packet_num': 1})
self.assertEqual(msg3, False)
@@ -124,8 +127,11 @@ class qa_packet_headerparser_b (gr_unittest.TestCase):
self.assertEqual(sink.num_messages(), 2)
msg1 = pmt.to_python(sink.get_message(0))
msg2 = pmt.to_python(sink.get_message(1))
- self.assertEqual(msg1, {'packet_len': 193, 'frame_len': 25, 'packet_num': 0})
- self.assertEqual(msg2, {'packet_len': 8, 'frame_len': 1, 'packet_num': 1})
+ # Multiply with 4 because unpacked bytes have only two bits
+ self.assertEqual(msg1, {'packet_len': 193*4, 'frame_len': 25, 'packet_num': 0})
+ self.assertEqual(msg2, {'packet_len': 8*4, 'frame_len': 1, 'packet_num': 1})
if __name__ == '__main__':
gr_unittest.run(qa_packet_headerparser_b, "qa_packet_headerparser_b.xml")
+
+
diff --git a/gr-digital/python/utils/tagged_streams.py b/gr-digital/python/utils/tagged_streams.py
index f2a58ffe1e..c7edbf61eb 100644
--- a/gr-digital/python/utils/tagged_streams.py
+++ b/gr-digital/python/utils/tagged_streams.py
@@ -27,7 +27,7 @@ def make_lengthtags(lengths, offsets, tagname='length', vlen=1):
tags = []
assert(len(offsets) == len(lengths))
for offset, length in zip(offsets, lengths):
- tag = gr.gr_tag_t()
+ tag = gr.tag_t()
tag.offset = offset/vlen
tag.key = pmt.string_to_symbol(tagname)
tag.value = pmt.from_long(length/vlen)
@@ -124,7 +124,7 @@ def packets_to_vectors(packets, lengthtagname, vlen=1):
offset = 0
for packet in packets:
data.extend(packet)
- tag = gr.gr_tag_t()
+ tag = gr.tag_t()
tag.offset = offset/vlen
tag.key = pmt.string_to_symbol(lengthtagname)
tag.value = pmt.from_long(len(packet)/vlen)
diff --git a/gr-digital/swig/CMakeLists.txt b/gr-digital/swig/CMakeLists.txt
index 3ecc2d12c5..3797c655f2 100644
--- a/gr-digital/swig/CMakeLists.txt
+++ b/gr-digital/swig/CMakeLists.txt
@@ -42,8 +42,8 @@ endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_TARGET_DEPS digital_generated_includes)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/digital_swig_doc.i)
set(GR_SWIG_DOC_DIRS
- ${CMAKE_CURRENT_SOURCE_DIR}/../include/digital
- ${CMAKE_CURRENT_BINARY_DIR}/../include/digital
+ ${CMAKE_CURRENT_SOURCE_DIR}/../include/gnuradio/digital
+ ${CMAKE_CURRENT_BINARY_DIR}/../include/gnuradio/digital
)
set(GR_SWIG_DOCS_TARGET_DEPS runtime_swig_swig_doc)
diff --git a/gr-digital/swig/digital_swig.i b/gr-digital/swig/digital_swig.i
index 54f9c64e2d..253bc6f3b8 100644
--- a/gr-digital/swig/digital_swig.i
+++ b/gr-digital/swig/digital_swig.i
@@ -29,147 +29,147 @@
//load generated python docstrings
%include "digital_swig_doc.i"
-%include "analog/cpm.h"
+%include "gnuradio/analog/cpm.h"
%{
-#include <blocks/control_loop.h>
+#include <gnuradio/blocks/control_loop.h>
%}
-%include <blocks/control_loop.h>
+%include <gnuradio/blocks/control_loop.h>
%{
-#include "digital/additive_scrambler_bb.h"
-#include "digital/binary_slicer_fb.h"
-#include "digital/chunks_to_symbols_bc.h"
-#include "digital/chunks_to_symbols_bf.h"
-#include "digital/chunks_to_symbols_ic.h"
-#include "digital/chunks_to_symbols_if.h"
-#include "digital/chunks_to_symbols_sc.h"
-#include "digital/chunks_to_symbols_sf.h"
-#include "digital/clock_recovery_mm_cc.h"
-#include "digital/clock_recovery_mm_ff.h"
-#include "digital/cma_equalizer_cc.h"
-#include "digital/constellation.h"
-#include "digital/constellation_decoder_cb.h"
-#include "digital/constellation_receiver_cb.h"
-#include "digital/correlate_access_code_bb.h"
-#include "digital/correlate_access_code_tag_bb.h"
-#include "digital/costas_loop_cc.h"
-#include "digital/cpmmod_bc.h"
-#include "digital/crc32.h"
-#include "digital/crc32_bb.h"
-#include "digital/descrambler_bb.h"
-#include "digital/diff_decoder_bb.h"
-#include "digital/diff_encoder_bb.h"
-#include "digital/diff_phasor_cc.h"
-#include "digital/fll_band_edge_cc.h"
-#include "digital/framer_sink_1.h"
-#include "digital/glfsr_source_b.h"
-#include "digital/glfsr_source_f.h"
-#include "digital/header_payload_demux.h"
-#include "digital/kurtotic_equalizer_cc.h"
-#include "digital/lfsr.h"
-#include "digital/lms_dd_equalizer_cc.h"
-#include "digital/map_bb.h"
-#include "digital/metric_type.h"
-#include "digital/mpsk_receiver_cc.h"
-#include "digital/mpsk_snr_est.h"
-#include "digital/mpsk_snr_est_cc.h"
-#include "digital/ofdm_carrier_allocator_cvc.h"
-#include "digital/ofdm_chanest_vcvc.h"
-#include "digital/ofdm_cyclic_prefixer.h"
-#include "digital/ofdm_equalizer_base.h"
-#include "digital/ofdm_equalizer_simpledfe.h"
-#include "digital/ofdm_equalizer_static.h"
-#include "digital/ofdm_frame_acquisition.h"
-#include "digital/ofdm_frame_equalizer_vcvc.h"
-#include "digital/ofdm_frame_sink.h"
-#include "digital/ofdm_insert_preamble.h"
-#include "digital/ofdm_mapper_bcv.h"
-#include "digital/ofdm_sampler.h"
-#include "digital/ofdm_serializer_vcc.h"
-#include "digital/ofdm_sync_sc_cfb.h"
-#include "digital/packet_header_default.h"
-#include "digital/packet_header_ofdm.h"
-#include "digital/packet_headergenerator_bb.h"
-#include "digital/packet_headerparser_b.h"
-#include "digital/packet_sink.h"
-#include "digital/pfb_clock_sync_ccf.h"
-#include "digital/pfb_clock_sync_fff.h"
-#include "digital/pn_correlator_cc.h"
-#include "digital/probe_density_b.h"
-#include "digital/probe_mpsk_snr_est_c.h"
-#include "digital/scrambler_bb.h"
-#include "digital/simple_correlator.h"
-#include "digital/simple_framer.h"
-#include "digital/ofdm_serializer_vcc.h"
-#include "digital/packet_headerparser_b.h"
-#include "digital/header_payload_demux.h"
+#include "gnuradio/digital/additive_scrambler_bb.h"
+#include "gnuradio/digital/binary_slicer_fb.h"
+#include "gnuradio/digital/chunks_to_symbols_bc.h"
+#include "gnuradio/digital/chunks_to_symbols_bf.h"
+#include "gnuradio/digital/chunks_to_symbols_ic.h"
+#include "gnuradio/digital/chunks_to_symbols_if.h"
+#include "gnuradio/digital/chunks_to_symbols_sc.h"
+#include "gnuradio/digital/chunks_to_symbols_sf.h"
+#include "gnuradio/digital/clock_recovery_mm_cc.h"
+#include "gnuradio/digital/clock_recovery_mm_ff.h"
+#include "gnuradio/digital/cma_equalizer_cc.h"
+#include "gnuradio/digital/constellation.h"
+#include "gnuradio/digital/constellation_decoder_cb.h"
+#include "gnuradio/digital/constellation_receiver_cb.h"
+#include "gnuradio/digital/correlate_access_code_bb.h"
+#include "gnuradio/digital/correlate_access_code_tag_bb.h"
+#include "gnuradio/digital/costas_loop_cc.h"
+#include "gnuradio/digital/cpmmod_bc.h"
+#include "gnuradio/digital/crc32.h"
+#include "gnuradio/digital/crc32_bb.h"
+#include "gnuradio/digital/descrambler_bb.h"
+#include "gnuradio/digital/diff_decoder_bb.h"
+#include "gnuradio/digital/diff_encoder_bb.h"
+#include "gnuradio/digital/diff_phasor_cc.h"
+#include "gnuradio/digital/fll_band_edge_cc.h"
+#include "gnuradio/digital/framer_sink_1.h"
+#include "gnuradio/digital/glfsr_source_b.h"
+#include "gnuradio/digital/glfsr_source_f.h"
+#include "gnuradio/digital/header_payload_demux.h"
+#include "gnuradio/digital/kurtotic_equalizer_cc.h"
+#include "gnuradio/digital/lfsr.h"
+#include "gnuradio/digital/lms_dd_equalizer_cc.h"
+#include "gnuradio/digital/map_bb.h"
+#include "gnuradio/digital/metric_type.h"
+#include "gnuradio/digital/mpsk_receiver_cc.h"
+#include "gnuradio/digital/mpsk_snr_est.h"
+#include "gnuradio/digital/mpsk_snr_est_cc.h"
+#include "gnuradio/digital/ofdm_carrier_allocator_cvc.h"
+#include "gnuradio/digital/ofdm_chanest_vcvc.h"
+#include "gnuradio/digital/ofdm_cyclic_prefixer.h"
+#include "gnuradio/digital/ofdm_equalizer_base.h"
+#include "gnuradio/digital/ofdm_equalizer_simpledfe.h"
+#include "gnuradio/digital/ofdm_equalizer_static.h"
+#include "gnuradio/digital/ofdm_frame_acquisition.h"
+#include "gnuradio/digital/ofdm_frame_equalizer_vcvc.h"
+#include "gnuradio/digital/ofdm_frame_sink.h"
+#include "gnuradio/digital/ofdm_insert_preamble.h"
+#include "gnuradio/digital/ofdm_mapper_bcv.h"
+#include "gnuradio/digital/ofdm_sampler.h"
+#include "gnuradio/digital/ofdm_serializer_vcc.h"
+#include "gnuradio/digital/ofdm_sync_sc_cfb.h"
+#include "gnuradio/digital/packet_header_default.h"
+#include "gnuradio/digital/packet_header_ofdm.h"
+#include "gnuradio/digital/packet_headergenerator_bb.h"
+#include "gnuradio/digital/packet_headerparser_b.h"
+#include "gnuradio/digital/packet_sink.h"
+#include "gnuradio/digital/pfb_clock_sync_ccf.h"
+#include "gnuradio/digital/pfb_clock_sync_fff.h"
+#include "gnuradio/digital/pn_correlator_cc.h"
+#include "gnuradio/digital/probe_density_b.h"
+#include "gnuradio/digital/probe_mpsk_snr_est_c.h"
+#include "gnuradio/digital/scrambler_bb.h"
+#include "gnuradio/digital/simple_correlator.h"
+#include "gnuradio/digital/simple_framer.h"
+#include "gnuradio/digital/ofdm_serializer_vcc.h"
+#include "gnuradio/digital/packet_headerparser_b.h"
+#include "gnuradio/digital/header_payload_demux.h"
%}
-%include "digital/additive_scrambler_bb.h"
-%include "digital/binary_slicer_fb.h"
-%include "digital/chunks_to_symbols_bc.h"
-%include "digital/chunks_to_symbols_bf.h"
-%include "digital/chunks_to_symbols_ic.h"
-%include "digital/chunks_to_symbols_if.h"
-%include "digital/chunks_to_symbols_sc.h"
-%include "digital/chunks_to_symbols_sf.h"
-%include "digital/clock_recovery_mm_cc.h"
-%include "digital/clock_recovery_mm_ff.h"
-%include "digital/cma_equalizer_cc.h"
-%include "digital/constellation.h"
-%include "digital/constellation_decoder_cb.h"
-%include "digital/constellation_receiver_cb.h"
-%include "digital/correlate_access_code_bb.h"
-%include "digital/correlate_access_code_tag_bb.h"
-%include "digital/costas_loop_cc.h"
-%include "digital/cpmmod_bc.h"
-%include "digital/crc32.h"
-%include "digital/crc32_bb.h"
-%include "digital/descrambler_bb.h"
-%include "digital/diff_decoder_bb.h"
-%include "digital/diff_encoder_bb.h"
-%include "digital/diff_phasor_cc.h"
-%include "digital/fll_band_edge_cc.h"
-%include "digital/framer_sink_1.h"
-%include "digital/glfsr_source_b.h"
-%include "digital/glfsr_source_f.h"
-%include "digital/header_payload_demux.h"
-%include "digital/kurtotic_equalizer_cc.h"
-%include "digital/lfsr.h"
-%include "digital/lms_dd_equalizer_cc.h"
-%include "digital/map_bb.h"
-%include "digital/metric_type.h"
-%include "digital/mpsk_receiver_cc.h"
-%include "digital/mpsk_snr_est.h"
-%include "digital/mpsk_snr_est_cc.h"
-%include "digital/ofdm_carrier_allocator_cvc.h"
-%include "digital/ofdm_chanest_vcvc.h"
-%include "digital/ofdm_cyclic_prefixer.h"
-%include "digital/ofdm_equalizer_base.h"
-%include "digital/ofdm_equalizer_simpledfe.h"
-%include "digital/ofdm_equalizer_static.h"
-%include "digital/ofdm_frame_acquisition.h"
-%include "digital/ofdm_frame_equalizer_vcvc.h"
-%include "digital/ofdm_frame_sink.h"
-%include "digital/ofdm_insert_preamble.h"
-%include "digital/ofdm_mapper_bcv.h"
-%include "digital/ofdm_sampler.h"
-%include "digital/ofdm_serializer_vcc.h"
-%include "digital/ofdm_sync_sc_cfb.h"
-%include "digital/packet_header_default.h"
-%include "digital/packet_header_ofdm.h"
-%include "digital/packet_headergenerator_bb.h"
-%include "digital/packet_headerparser_b.h"
-%include "digital/packet_sink.h"
-%include "digital/pfb_clock_sync_ccf.h"
-%include "digital/pfb_clock_sync_fff.h"
-%include "digital/pn_correlator_cc.h"
-%include "digital/probe_density_b.h"
-%include "digital/probe_mpsk_snr_est_c.h"
-%include "digital/scrambler_bb.h"
-%include "digital/simple_correlator.h"
-%include "digital/simple_framer.h"
+%include "gnuradio/digital/additive_scrambler_bb.h"
+%include "gnuradio/digital/binary_slicer_fb.h"
+%include "gnuradio/digital/chunks_to_symbols_bc.h"
+%include "gnuradio/digital/chunks_to_symbols_bf.h"
+%include "gnuradio/digital/chunks_to_symbols_ic.h"
+%include "gnuradio/digital/chunks_to_symbols_if.h"
+%include "gnuradio/digital/chunks_to_symbols_sc.h"
+%include "gnuradio/digital/chunks_to_symbols_sf.h"
+%include "gnuradio/digital/clock_recovery_mm_cc.h"
+%include "gnuradio/digital/clock_recovery_mm_ff.h"
+%include "gnuradio/digital/cma_equalizer_cc.h"
+%include "gnuradio/digital/constellation.h"
+%include "gnuradio/digital/constellation_decoder_cb.h"
+%include "gnuradio/digital/constellation_receiver_cb.h"
+%include "gnuradio/digital/correlate_access_code_bb.h"
+%include "gnuradio/digital/correlate_access_code_tag_bb.h"
+%include "gnuradio/digital/costas_loop_cc.h"
+%include "gnuradio/digital/cpmmod_bc.h"
+%include "gnuradio/digital/crc32.h"
+%include "gnuradio/digital/crc32_bb.h"
+%include "gnuradio/digital/descrambler_bb.h"
+%include "gnuradio/digital/diff_decoder_bb.h"
+%include "gnuradio/digital/diff_encoder_bb.h"
+%include "gnuradio/digital/diff_phasor_cc.h"
+%include "gnuradio/digital/fll_band_edge_cc.h"
+%include "gnuradio/digital/framer_sink_1.h"
+%include "gnuradio/digital/glfsr_source_b.h"
+%include "gnuradio/digital/glfsr_source_f.h"
+%include "gnuradio/digital/header_payload_demux.h"
+%include "gnuradio/digital/kurtotic_equalizer_cc.h"
+%include "gnuradio/digital/lfsr.h"
+%include "gnuradio/digital/lms_dd_equalizer_cc.h"
+%include "gnuradio/digital/map_bb.h"
+%include "gnuradio/digital/metric_type.h"
+%include "gnuradio/digital/mpsk_receiver_cc.h"
+%include "gnuradio/digital/mpsk_snr_est.h"
+%include "gnuradio/digital/mpsk_snr_est_cc.h"
+%include "gnuradio/digital/ofdm_carrier_allocator_cvc.h"
+%include "gnuradio/digital/ofdm_chanest_vcvc.h"
+%include "gnuradio/digital/ofdm_cyclic_prefixer.h"
+%include "gnuradio/digital/ofdm_equalizer_base.h"
+%include "gnuradio/digital/ofdm_equalizer_simpledfe.h"
+%include "gnuradio/digital/ofdm_equalizer_static.h"
+%include "gnuradio/digital/ofdm_frame_acquisition.h"
+%include "gnuradio/digital/ofdm_frame_equalizer_vcvc.h"
+%include "gnuradio/digital/ofdm_frame_sink.h"
+%include "gnuradio/digital/ofdm_insert_preamble.h"
+%include "gnuradio/digital/ofdm_mapper_bcv.h"
+%include "gnuradio/digital/ofdm_sampler.h"
+%include "gnuradio/digital/ofdm_serializer_vcc.h"
+%include "gnuradio/digital/ofdm_sync_sc_cfb.h"
+%include "gnuradio/digital/packet_header_default.h"
+%include "gnuradio/digital/packet_header_ofdm.h"
+%include "gnuradio/digital/packet_headergenerator_bb.h"
+%include "gnuradio/digital/packet_headerparser_b.h"
+%include "gnuradio/digital/packet_sink.h"
+%include "gnuradio/digital/pfb_clock_sync_ccf.h"
+%include "gnuradio/digital/pfb_clock_sync_fff.h"
+%include "gnuradio/digital/pn_correlator_cc.h"
+%include "gnuradio/digital/probe_density_b.h"
+%include "gnuradio/digital/probe_mpsk_snr_est_c.h"
+%include "gnuradio/digital/scrambler_bb.h"
+%include "gnuradio/digital/simple_correlator.h"
+%include "gnuradio/digital/simple_framer.h"
GR_SWIG_BLOCK_MAGIC2(digital, additive_scrambler_bb);
GR_SWIG_BLOCK_MAGIC2(digital, binary_slicer_fb);