diff options
author | Tom Rondeau <trondeau@vt.edu> | 2012-11-09 18:08:12 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2012-11-09 18:08:12 -0500 |
commit | 0b1d665833530ff9120f55e132f95aa8013cefa2 (patch) | |
tree | f3df6b8deccb7c1a1c8fd66be908cea6893d7b33 | |
parent | 2553961b6e6a2543a81463b9a1ad2a44bf11bdf6 (diff) |
analog: fixed a few build issues against gr-analog.
-rw-r--r-- | gr-digital/include/digital/cpmmod_bc.h | 4 | ||||
-rw-r--r-- | gr-digital/lib/cpmmod_bc_impl.cc | 24 | ||||
-rw-r--r-- | gr-digital/lib/cpmmod_bc_impl.h | 5 | ||||
-rw-r--r-- | gr-digital/swig/digital_swig.i | 3 | ||||
-rw-r--r-- | gr-fcd/examples/c++/CMakeLists.txt | 3 | ||||
-rw-r--r-- | gr-fcd/examples/c++/fcd_nfm_rx.cc | 9 | ||||
-rwxr-xr-x | gr-filter/examples/resampler.py | 4 |
7 files changed, 27 insertions, 25 deletions
diff --git a/gr-digital/include/digital/cpmmod_bc.h b/gr-digital/include/digital/cpmmod_bc.h index f65ca8059f..7d91915cdd 100644 --- a/gr-digital/include/digital/cpmmod_bc.h +++ b/gr-digital/include/digital/cpmmod_bc.h @@ -25,7 +25,7 @@ #include <digital/api.h> #include <gr_hier_block2.h> -#include <gr_cpm.h> +#include <analog/cpm.h> namespace gr { namespace digital { @@ -71,7 +71,7 @@ namespace gr { * \param beta For LSRC, this is the rolloff factor. For Gaussian * pulses, this is the 3 dB time-bandwidth product. */ - static sptr make(gr_cpm::cpm_type type, float h, + static sptr make(analog::cpm::cpm_type type, float h, int samples_per_sym, int L, double beta=0.3); diff --git a/gr-digital/lib/cpmmod_bc_impl.cc b/gr-digital/lib/cpmmod_bc_impl.cc index 044090d59a..d6c3a29a29 100644 --- a/gr-digital/lib/cpmmod_bc_impl.cc +++ b/gr-digital/lib/cpmmod_bc_impl.cc @@ -29,13 +29,13 @@ namespace gr { namespace digital { cpmmod_bc::sptr - cpmmod_bc::make(gr_cpm::cpm_type type, float h, + cpmmod_bc::make(analog::cpm::cpm_type type, float h, int samples_per_sym, int L, double beta) { return gnuradio::get_initial_sptr (new cpmmod_bc_impl("cpmmod_bc", - (gr_cpm::cpm_type)type, + (analog::cpm::cpm_type)type, h, samples_per_sym, L, beta)); } @@ -46,30 +46,30 @@ namespace gr { { return gnuradio::get_initial_sptr (new cpmmod_bc_impl("gmskmod_bc", - gr_cpm::GAUSSIAN, 0.5, + analog::cpm::GAUSSIAN, 0.5, samples_per_sym, L, beta)); } cpmmod_bc_impl::cpmmod_bc_impl(const std::string &name, - gr_cpm::cpm_type type, float h, + 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))), d_type(type), d_index(h), d_sps(samples_per_sym), d_length(L), d_beta(beta), - d_taps(gr_cpm::phase_response(type, samples_per_sym, L, beta)), + d_taps(analog::cpm::phase_response(type, samples_per_sym, L, beta)), d_char_to_float(gr_make_char_to_float()), - d_pulse_shaper(gr::filter::interp_fir_filter_fff::make(samples_per_sym, d_taps)), - d_fm(gr_make_frequency_modulator_fc(M_PI * h)) + d_pulse_shaper(filter::interp_fir_filter_fff::make(samples_per_sym, d_taps)), + d_fm(analog::frequency_modulator_fc::make(M_PI * h)) { switch(type) { - case gr_cpm::LRC: - case gr_cpm::LSRC: - case gr_cpm::LREC: - case gr_cpm::TFM: - case gr_cpm::GAUSSIAN: + case analog::cpm::LRC: + case analog::cpm::LSRC: + case analog::cpm::LREC: + case analog::cpm::TFM: + case analog::cpm::GAUSSIAN: break; default: diff --git a/gr-digital/lib/cpmmod_bc_impl.h b/gr-digital/lib/cpmmod_bc_impl.h index 77e71ede74..3051e49df9 100644 --- a/gr-digital/lib/cpmmod_bc_impl.h +++ b/gr-digital/lib/cpmmod_bc_impl.h @@ -26,7 +26,6 @@ #include <digital/cpmmod_bc.h> #include <gr_char_to_float.h> #include <analog/frequency_modulator_fc.h> -#include <gr_cpm.h> #include <filter/interp_fir_filter_fff.h> namespace gr { @@ -45,11 +44,11 @@ namespace gr { std::vector<float> d_taps; gr_char_to_float_sptr d_char_to_float; gr::filter::interp_fir_filter_fff::sptr d_pulse_shaper; - analog::frequency_modulator_fc_sptr d_fm; + analog::frequency_modulator_fc::sptr d_fm; public: cpmmod_bc_impl(const std::string &name, - gr_cpm::cpm_type type, float h, + analog::cpm::cpm_type type, float h, int samples_per_sym, int L, double beta=0.3); ~cpmmod_bc_impl(); diff --git a/gr-digital/swig/digital_swig.i b/gr-digital/swig/digital_swig.i index 3783da75ea..34a921f754 100644 --- a/gr-digital/swig/digital_swig.i +++ b/gr-digital/swig/digital_swig.i @@ -20,13 +20,14 @@ */ #define DIGITAL_API +#define ANALOG_API %include "gnuradio.i" //load generated python docstrings %include "digital_swig_doc.i" -%include "gr_cpm.h" +%include "analog/cpm.h" %include "gri_control_loop.h" diff --git a/gr-fcd/examples/c++/CMakeLists.txt b/gr-fcd/examples/c++/CMakeLists.txt index adad7338cf..1bbeb5953e 100644 --- a/gr-fcd/examples/c++/CMakeLists.txt +++ b/gr-fcd/examples/c++/CMakeLists.txt @@ -21,9 +21,10 @@ include_directories(${GR_FCD_INCLUDE_DIRS}) include_directories(${GNURADIO_CORE_INCLUDE_DIRS}) include_directories(${GR_FILTER_INCLUDE_DIRS}) include_directories(${GR_AUDIO_INCLUDE_DIRS}) +include_directories(${GR_ANALOG_INCLUDE_DIRS}) add_executable(fcd_nfm_rx fcd_nfm_rx.cc) -target_link_libraries(fcd_nfm_rx gnuradio-fcd gnuradio-filter) +target_link_libraries(fcd_nfm_rx gnuradio-fcd gnuradio-filter gnuradio-analog) INSTALL(TARGETS fcd_nfm_rx diff --git a/gr-fcd/examples/c++/fcd_nfm_rx.cc b/gr-fcd/examples/c++/fcd_nfm_rx.cc index 5101121b0b..a0eee134d0 100644 --- a/gr-fcd/examples/c++/fcd_nfm_rx.cc +++ b/gr-fcd/examples/c++/fcd_nfm_rx.cc @@ -43,7 +43,7 @@ #include <iostream> #include <boost/program_options.hpp> - +using namespace gr; namespace po = boost::program_options; int main(int argc, char **argv) @@ -85,12 +85,13 @@ int main(int argc, char **argv) fcd->set_lna_gain(gain); // Low pass filter - std::vector<float> taps = gr::filter::firdes::low_pass(1.0, 96000, 5000.0, 1000.0); - gr::filter::fir_filter_ccf::sptr filter = gr::filter::fir_filter_ccf::make (2, taps); + std::vector<float> taps = filter::firdes::low_pass(1.0, 96000, 5000.0, 1000.0); + filter::fir_filter_ccf::sptr filter = filter::fir_filter_ccf::make (2, taps); // FM demodulator // gain = sample_rate / (2*pi*max_dev) - analog::quadrature_demod_cf::sptr demod = analog::quadrature_demod_cf::make(rate/(2.0*pi*5000.0)); + analog::quadrature_demod_cf::sptr demod = \ + analog::quadrature_demod_cf::make(rate/(2.0*pi*5000.0)); // Audio sink audio_sink::sptr sink = audio_make_sink(rate); diff --git a/gr-filter/examples/resampler.py b/gr-filter/examples/resampler.py index d5fd9216f6..5efb435631 100755 --- a/gr-filter/examples/resampler.py +++ b/gr-filter/examples/resampler.py @@ -52,8 +52,8 @@ class mytb(gr.top_block): # Creating our own taps taps = gr.firdes.low_pass_2(32, 32, 0.25, 0.1, 80) - self.src = analog.sig_source_c(fs_in, analog..GR_SIN_WAVE, fc, 1) - #self.src = analog..noise_source_c(analog..GR_GAUSSIAN, 1) + self.src = analog.sig_source_c(fs_in, analog.GR_SIN_WAVE, fc, 1) + #self.src = analog.noise_source_c(analog.GR_GAUSSIAN, 1) self.head = gr.head(gr.sizeof_gr_complex, N) # A resampler with our taps |