summaryrefslogtreecommitdiff
path: root/gr-digital/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gr-digital/lib')
-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
107 files changed, 584 insertions, 467 deletions
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 {