diff options
Diffstat (limited to 'gr-digital')
31 files changed, 605 insertions, 88 deletions
diff --git a/gr-digital/CMakeLists.txt b/gr-digital/CMakeLists.txt new file mode 100644 index 000000000..babf64eee --- /dev/null +++ b/gr-digital/CMakeLists.txt @@ -0,0 +1,107 @@ +# Copyright 2011 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + +######################################################################## +# Setup dependencies +######################################################################## +include(GrBoost) + +######################################################################## +# Register component +######################################################################## +include(GrComponent) +GR_REGISTER_COMPONENT("gr-digital" ENABLE_GR_DIGITAL + Boost_FOUND + ENABLE_GR_CORE_ +) + +GR_SET_GLOBAL(GR_DIGITAL_INCLUDE_DIRS + ${CMAKE_CURRENT_SOURCE_DIR}/include +) + +GR_SET_GLOBAL(GR_DIGITAL_SWIG_INCLUDE_DIRS + ${CMAKE_CURRENT_SOURCE_DIR}/swig +) + +######################################################################## +# Begin conditional configuration +######################################################################## +if(ENABLE_GR_DIGITAL) + +######################################################################## +# Setup CPack components +######################################################################## +include(GrPackage) +CPACK_SET(CPACK_COMPONENT_GROUP_DIGITAL_DESCRIPTION "GNU Radio Digital Blocks") + +CPACK_COMPONENT("digital_runtime" + GROUP "Digital" + DISPLAY_NAME "Runtime" + DESCRIPTION "Dynamic link libraries" + DEPENDS "core_runtime" +) + +CPACK_COMPONENT("digital_devel" + GROUP "Digital" + DISPLAY_NAME "Development" + DESCRIPTION "C++ headers, package config, import libraries" + DEPENDS "core_devel" +) + +CPACK_COMPONENT("digital_python" + GROUP "Digital" + DISPLAY_NAME "Python" + DESCRIPTION "Python modules for runtime" + DEPENDS "core_python;digital_runtime" +) + +CPACK_COMPONENT("digital_swig" + GROUP "Digital" + DISPLAY_NAME "SWIG" + DESCRIPTION "SWIG development .i files" + DEPENDS "core_swig;digital_python;digital_devel" +) + +######################################################################## +# Add subdirectories +######################################################################## +add_subdirectory(include) +add_subdirectory(lib) +if(ENABLE_PYTHON) + add_subdirectory(swig) + add_subdirectory(python) + add_subdirectory(grc) + add_subdirectory(examples) +endif(ENABLE_PYTHON) + +######################################################################## +# Create Pkg Config File +######################################################################## +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-digital.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-digital.pc +@ONLY) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-digital.pc + DESTINATION ${GR_LIBRARY_DIR}/pkgconfig + COMPONENT "digital_devel" +) + +endif(ENABLE_GR_DIGITAL) diff --git a/gr-digital/examples/CMakeLists.txt b/gr-digital/examples/CMakeLists.txt new file mode 100644 index 000000000..2645557cc --- /dev/null +++ b/gr-digital/examples/CMakeLists.txt @@ -0,0 +1,45 @@ +# Copyright 2011 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + +include(GrPython) + +GR_PYTHON_INSTALL(PROGRAMS + example_costas.py + example_fll.py + example_timing.py + run_length.py + gen_whitener.py + DESTINATION ${GR_PKG_DATA_DIR}/examples/digital + COMPONENT "digital_python" +) + +GR_PYTHON_INSTALL(PROGRAMS + narrowband/transmit_path.py + narrowband/receive_path.py + narrowband/uhd_interface.py + narrowband/benchmark_tx.py + narrowband/benchmark_rx.py + narrowband/tx_voice.py + narrowband/rx_voice.py + narrowband/digital_bert_rx.py + narrowband/digital_bert_tx.py + narrowband/tunnel.py + DESTINATION ${GR_PKG_DATA_DIR}/examples/digital/narrowband + COMPONENT "digital_python" +) diff --git a/gr-digital/grc/CMakeLists.txt b/gr-digital/grc/CMakeLists.txt new file mode 100644 index 000000000..daca55253 --- /dev/null +++ b/gr-digital/grc/CMakeLists.txt @@ -0,0 +1,40 @@ +# Copyright 2011 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + +install(FILES + digital_block_tree.xml + digital_binary_slicer_fb.xml + digital_clock_recovery_mm_xx.xml + digital_constellation_decoder_cb.xml + digital_correlate_access_code_bb.xml + digital_costas_loop_cc.xml + digital_cma_equalizer_cc.xml + digital_fll_band_edge_cc.xml + digital_kurtotic_equalizer_cc.xml + digital_lms_dd_equalizer_cc.xml + digital_mpsk_receiver_cc.xml + digital_dxpsk_mod.xml + digital_dxpsk_demod.xml + digital_psk_mod.xml + digital_psk_demod.xml + digital_qam_mod.xml + digital_qam_demod.xml + DESTINATION ${GRC_BLOCKS_DIR} + COMPONENT "digital_python" +) diff --git a/gr-digital/include/CMakeLists.txt b/gr-digital/include/CMakeLists.txt new file mode 100644 index 000000000..cf20bd1e7 --- /dev/null +++ b/gr-digital/include/CMakeLists.txt @@ -0,0 +1,50 @@ +# Copyright 2011 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + +######################################################################## +# Install header files +######################################################################## +install(FILES + digital_api.h + digital_binary_slicer_fb.h + digital_clock_recovery_mm_cc.h + digital_clock_recovery_mm_ff.h + digital_constellation.h + digital_constellation_receiver_cb.h + digital_constellation_decoder_cb.h + digital_correlate_access_code_bb.h + digital_costas_loop_cc.h + digital_cma_equalizer_cc.h + digital_crc32.h + digital_fll_band_edge_cc.h + digital_lms_dd_equalizer_cc.h + digital_kurtotic_equalizer_cc.h + digital_metric_type.h + digital_mpsk_receiver_cc.h + digital_ofdm_cyclic_prefixer.h + digital_ofdm_frame_acquisition.h + digital_ofdm_frame_sink.h + digital_ofdm_insert_preamble.h + digital_ofdm_mapper_bcv.h + digital_ofdm_sampler.h + digital_gmskmod_bc.h + digital_cpmmod_bc.h + DESTINATION ${GR_INCLUDE_DIR}/gnuradio + COMPONENT "digital_devel" +) diff --git a/gr-digital/include/Makefile.am b/gr-digital/include/Makefile.am index ce9e67efb..8ce3a94e8 100644 --- a/gr-digital/include/Makefile.am +++ b/gr-digital/include/Makefile.am @@ -23,6 +23,7 @@ include $(top_srcdir)/Makefile.common # These headers get installed in ${prefix}/include/gnuradio grinclude_HEADERS = \ + digital_api.h \ digital_binary_slicer_fb.h \ digital_clock_recovery_mm_cc.h \ digital_clock_recovery_mm_ff.h \ diff --git a/gr-digital/include/digital_api.h b/gr-digital/include/digital_api.h new file mode 100644 index 000000000..d45ace13f --- /dev/null +++ b/gr-digital/include/digital_api.h @@ -0,0 +1,33 @@ +/* + * Copyright 2011 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#ifndef INCLUDED_DIGITAL_API_H +#define INCLUDED_DIGITAL_API_H + +#include <gruel/attributes.h> + +#ifdef gnuradio_digital_EXPORTS +# define DIGITAL_API __GR_ATTR_EXPORT +#else +# define DIGITAL_API __GR_ATTR_IMPORT +#endif + +#endif /* INCLUDED_DIGITAL_API_H */ diff --git a/gr-digital/include/digital_binary_slicer_fb.h b/gr-digital/include/digital_binary_slicer_fb.h index 4e6717de6..35a7380fb 100644 --- a/gr-digital/include/digital_binary_slicer_fb.h +++ b/gr-digital/include/digital_binary_slicer_fb.h @@ -23,12 +23,13 @@ #ifndef INCLUDED_DIGITAL_BINARY_SLICER_FB_H #define INCLUDED_DIGITAL_BINARY_SLICER_FB_H +#include <digital_api.h> #include <gr_sync_block.h> class digital_binary_slicer_fb; typedef boost::shared_ptr<digital_binary_slicer_fb> digital_binary_slicer_fb_sptr; -digital_binary_slicer_fb_sptr digital_make_binary_slicer_fb (); +DIGITAL_API digital_binary_slicer_fb_sptr digital_make_binary_slicer_fb (); /*! * \brief slice float binary symbol outputting 1 bit output @@ -38,9 +39,9 @@ digital_binary_slicer_fb_sptr digital_make_binary_slicer_fb (); * x < 0 --> 0 * x >= 0 --> 1 */ -class digital_binary_slicer_fb : public gr_sync_block +class DIGITAL_API digital_binary_slicer_fb : public gr_sync_block { - friend digital_binary_slicer_fb_sptr digital_make_binary_slicer_fb (); + friend DIGITAL_API digital_binary_slicer_fb_sptr digital_make_binary_slicer_fb (); digital_binary_slicer_fb (); public: diff --git a/gr-digital/include/digital_clock_recovery_mm_cc.h b/gr-digital/include/digital_clock_recovery_mm_cc.h index 5d9c8c5e5..a2577d537 100644 --- a/gr-digital/include/digital_clock_recovery_mm_cc.h +++ b/gr-digital/include/digital_clock_recovery_mm_cc.h @@ -23,6 +23,7 @@ #ifndef INCLUDED_DIGITAL_CLOCK_RECOVERY_MM_CC_H #define INCLUDED_DIGITAL_CLOCK_RECOVERY_MM_CC_H +#include <digital_api.h> #include <gr_block.h> #include <gr_complex.h> #include <gr_math.h> @@ -33,7 +34,7 @@ class digital_clock_recovery_mm_cc; typedef boost::shared_ptr<digital_clock_recovery_mm_cc> digital_clock_recovery_mm_cc_sptr; // public constructor -digital_clock_recovery_mm_cc_sptr +DIGITAL_API digital_clock_recovery_mm_cc_sptr digital_make_clock_recovery_mm_cc (float omega, float gain_omega, float mu, float gain_mu, float omega_relative_limit=0.001); @@ -53,7 +54,7 @@ digital_make_clock_recovery_mm_cc (float omega, float gain_omega, * and Muller algorithm," Electronics Letters, Vol. 31, no. 13, 22 * June 1995, pp. 1032 - 1033. */ -class digital_clock_recovery_mm_cc : public gr_block +class DIGITAL_API digital_clock_recovery_mm_cc : public gr_block { public: ~digital_clock_recovery_mm_cc (); @@ -107,7 +108,7 @@ protected: gr_complex slicer_0deg (gr_complex sample); gr_complex slicer_45deg (gr_complex sample); - friend digital_clock_recovery_mm_cc_sptr + friend DIGITAL_API digital_clock_recovery_mm_cc_sptr digital_make_clock_recovery_mm_cc (float omega, float gain_omega, float mu, float gain_mu, float omega_relative_limit); diff --git a/gr-digital/include/digital_clock_recovery_mm_ff.h b/gr-digital/include/digital_clock_recovery_mm_ff.h index 5a2206fb2..36749553f 100644 --- a/gr-digital/include/digital_clock_recovery_mm_ff.h +++ b/gr-digital/include/digital_clock_recovery_mm_ff.h @@ -23,6 +23,7 @@ #ifndef INCLUDED_DIGITAL_CLOCK_RECOVERY_MM_FF_H #define INCLUDED_DIGITAL_CLOCK_RECOVERY_MM_FF_H +#include <digital_api.h> #include <gr_block.h> #include <gr_math.h> #include <stdio.h> @@ -33,7 +34,7 @@ class digital_clock_recovery_mm_ff; typedef boost::shared_ptr<digital_clock_recovery_mm_ff> digital_clock_recovery_mm_ff_sptr; // public constructor -digital_clock_recovery_mm_ff_sptr +DIGITAL_API digital_clock_recovery_mm_ff_sptr digital_make_clock_recovery_mm_ff (float omega, float gain_omega, float mu, float gain_mu, float omega_relative_limit=0.001); @@ -49,7 +50,7 @@ digital_make_clock_recovery_mm_ff (float omega, float gain_omega, * Estimation and Signal Processing" by Heinrich Meyr, Marc Moeneclaey, & Stefan Fechtel. * ISBN 0-471-50275-8. */ -class digital_clock_recovery_mm_ff : public gr_block +class DIGITAL_API digital_clock_recovery_mm_ff : public gr_block { public: ~digital_clock_recovery_mm_ff (); @@ -90,7 +91,7 @@ protected: FILE *d_logfile; float d_omega_relative_limit; // used to compute min and max omega - friend digital_clock_recovery_mm_ff_sptr + friend DIGITAL_API digital_clock_recovery_mm_ff_sptr digital_make_clock_recovery_mm_ff (float omega, float gain_omega, float mu, float gain_mu, float omega_relative_limit); diff --git a/gr-digital/include/digital_cma_equalizer_cc.h b/gr-digital/include/digital_cma_equalizer_cc.h index 93771dca4..0d703789a 100644 --- a/gr-digital/include/digital_cma_equalizer_cc.h +++ b/gr-digital/include/digital_cma_equalizer_cc.h @@ -23,6 +23,7 @@ #ifndef INCLUDED_DIGITAL_CMA_EQUALIZER_CC_H #define INCLUDED_DIGITAL_CMA_EQUALIZER_CC_H +#include <digital_api.h> #include <gr_adaptive_fir_ccc.h> #include <gr_math.h> #include <iostream> @@ -30,7 +31,7 @@ class digital_cma_equalizer_cc; typedef boost::shared_ptr<digital_cma_equalizer_cc> digital_cma_equalizer_cc_sptr; -digital_cma_equalizer_cc_sptr +DIGITAL_API digital_cma_equalizer_cc_sptr digital_make_cma_equalizer_cc(int num_taps, float modulus, float mu, int sps); /*! @@ -44,13 +45,13 @@ digital_make_cma_equalizer_cc(int num_taps, float modulus, float mu, int sps); * Two-Dimensional Data Communication Systems," IEEE Transactions on * Communications, Vol. 28, No. 11, pp. 1867 - 1875, 1980, */ -class digital_cma_equalizer_cc : public gr_adaptive_fir_ccc +class DIGITAL_API digital_cma_equalizer_cc : public gr_adaptive_fir_ccc { private: float d_modulus; float d_mu; - friend digital_cma_equalizer_cc_sptr digital_make_cma_equalizer_cc(int num_taps, + friend DIGITAL_API digital_cma_equalizer_cc_sptr digital_make_cma_equalizer_cc(int num_taps, float modulus, float mu, int sps); diff --git a/gr-digital/include/digital_constellation.h b/gr-digital/include/digital_constellation.h index b6da7ff9b..fb2f6747a 100644 --- a/gr-digital/include/digital_constellation.h +++ b/gr-digital/include/digital_constellation.h @@ -23,6 +23,7 @@ #ifndef INCLUDED_DIGITAL_CONSTELLATION_H #define INCLUDED_DIGITAL_CONSTELLATION_H +#include <digital_api.h> #include <vector> #include <math.h> #include <gr_complex.h> @@ -53,7 +54,7 @@ typedef boost::shared_ptr<digital_constellation> digital_constellation_sptr; * from this class and overloaded to perform optimized slicing and * constellation mappings. */ -class digital_constellation : public boost::enable_shared_from_this<digital_constellation> +class DIGITAL_API digital_constellation : public boost::enable_shared_from_this<digital_constellation> { public: digital_constellation (std::vector<gr_complex> constellation, @@ -134,7 +135,7 @@ class digital_constellation_calcdist; typedef boost::shared_ptr<digital_constellation_calcdist> digital_constellation_calcdist_sptr; // public constructor -digital_constellation_calcdist_sptr +DIGITAL_API digital_constellation_calcdist_sptr digital_make_constellation_calcdist (std::vector<gr_complex> constellation, std::vector<unsigned int> pre_diff_code, unsigned int rotational_symmetry, @@ -148,7 +149,7 @@ digital_make_constellation_calcdist (std::vector<gr_complex> constellation, * constellation for decision making. Inefficient for large * constellations. */ -class digital_constellation_calcdist : public digital_constellation +class DIGITAL_API digital_constellation_calcdist : public digital_constellation { public: digital_constellation_calcdist (std::vector<gr_complex> constellation, @@ -161,7 +162,7 @@ class digital_constellation_calcdist : public digital_constellation // void calc_hard_symbol_metric(gr_complex *sample, float *metric); private: - friend digital_constellation_calcdist_sptr + friend DIGITAL_API digital_constellation_calcdist_sptr digital_make_constellation_calcdist (std::vector<gr_complex> constellation); }; @@ -178,7 +179,7 @@ class digital_constellation_calcdist : public digital_constellation * associated with the nearest constellation point. * */ -class digital_constellation_sector : public digital_constellation +class DIGITAL_API digital_constellation_sector : public digital_constellation { public: @@ -227,7 +228,7 @@ class digital_constellation_rect; typedef boost::shared_ptr<digital_constellation_rect> digital_constellation_rect_sptr; // public constructor -digital_constellation_rect_sptr +DIGITAL_API digital_constellation_rect_sptr digital_make_constellation_rect (std::vector<gr_complex> constellation, std::vector<unsigned int> pre_diff_code, unsigned int rotational_symmetry, @@ -236,7 +237,7 @@ digital_make_constellation_rect (std::vector<gr_complex> constellation, float width_real_sectors, float width_imag_sectors); -class digital_constellation_rect : public digital_constellation_sector +class DIGITAL_API digital_constellation_rect : public digital_constellation_sector { public: @@ -261,7 +262,7 @@ class digital_constellation_rect : public digital_constellation_sector float d_width_real_sectors; float d_width_imag_sectors; - friend digital_constellation_rect_sptr + friend DIGITAL_API digital_constellation_rect_sptr digital_make_constellation_rect (std::vector<gr_complex> constellation, std::vector<unsigned int> pre_diff_code, unsigned int rotational_symmetry, @@ -281,7 +282,7 @@ class digital_constellation_psk; typedef boost::shared_ptr<digital_constellation_psk> digital_constellation_psk_sptr; // public constructor -digital_constellation_psk_sptr +DIGITAL_API digital_constellation_psk_sptr digital_make_constellation_psk (std::vector<gr_complex> constellation, std::vector<unsigned int> pre_diff_code, unsigned int n_sectors); @@ -298,7 +299,7 @@ digital_make_constellation_psk (std::vector<gr_complex> constellation, * * Assumes that there is a constellation point at 1.x */ -class digital_constellation_psk : public digital_constellation_sector +class DIGITAL_API digital_constellation_psk : public digital_constellation_sector { public: @@ -314,7 +315,7 @@ class digital_constellation_psk : public digital_constellation_sector private: - friend digital_constellation_psk_sptr + friend DIGITAL_API digital_constellation_psk_sptr digital_make_constellation_psk (std::vector<gr_complex> constellation, std::vector<unsigned int> pre_diff_code, unsigned int n_sectors); @@ -333,21 +334,21 @@ class digital_constellation_bpsk; typedef boost::shared_ptr<digital_constellation_bpsk> digital_constellation_bpsk_sptr; // public constructor -digital_constellation_bpsk_sptr +DIGITAL_API digital_constellation_bpsk_sptr digital_make_constellation_bpsk (); /*! * \brief Digital constellation for BPSK * \ingroup digital */ -class digital_constellation_bpsk : public digital_constellation +class DIGITAL_API digital_constellation_bpsk : public digital_constellation { public: digital_constellation_bpsk (); unsigned int decision_maker (const gr_complex *sample); - friend digital_constellation_bpsk_sptr + friend DIGITAL_API digital_constellation_bpsk_sptr digital_make_constellation_bpsk (); }; @@ -364,21 +365,21 @@ class digital_constellation_qpsk; typedef boost::shared_ptr<digital_constellation_qpsk> digital_constellation_qpsk_sptr; // public constructor -digital_constellation_qpsk_sptr +DIGITAL_API digital_constellation_qpsk_sptr digital_make_constellation_qpsk (); /*! * \brief Digital constellation for QPSK * \ingroup digital */ -class digital_constellation_qpsk : public digital_constellation +class DIGITAL_API digital_constellation_qpsk : public digital_constellation { public: digital_constellation_qpsk (); unsigned int decision_maker (const gr_complex *sample); - friend digital_constellation_qpsk_sptr + friend DIGITAL_API digital_constellation_qpsk_sptr digital_make_constellation_qpsk (); }; @@ -395,14 +396,14 @@ class digital_constellation_dqpsk; typedef boost::shared_ptr<digital_constellation_dqpsk> digital_constellation_dqpsk_sptr; // public constructor -digital_constellation_dqpsk_sptr +DIGITAL_API digital_constellation_dqpsk_sptr digital_make_constellation_dqpsk (); /*! * \brief Digital constellation for DQPSK * \ingroup digital */ -class digital_constellation_dqpsk : public digital_constellation +class DIGITAL_API digital_constellation_dqpsk : public digital_constellation { public: @@ -426,21 +427,21 @@ class digital_constellation_8psk; typedef boost::shared_ptr<digital_constellation_8psk> digital_constellation_8psk_sptr; // public constructor -digital_constellation_8psk_sptr +DIGITAL_API digital_constellation_8psk_sptr digital_make_constellation_8psk (); /*! * \brief Digital constellation for 8PSK * \ingroup digital */ -class digital_constellation_8psk : public digital_constellation +class DIGITAL_API digital_constellation_8psk : public digital_constellation { public: digital_constellation_8psk (); unsigned int decision_maker (const gr_complex *sample); - friend digital_constellation_8psk_sptr + friend DIGITAL_API digital_constellation_8psk_sptr digital_make_constellation_8psk (); }; diff --git a/gr-digital/include/digital_constellation_decoder_cb.h b/gr-digital/include/digital_constellation_decoder_cb.h index d587f6bc4..cce3a564f 100644 --- a/gr-digital/include/digital_constellation_decoder_cb.h +++ b/gr-digital/include/digital_constellation_decoder_cb.h @@ -23,6 +23,7 @@ #ifndef INCLUDED_DIGITAL_CONSTELLATION_DECODER_CB_H #define INCLUDED_DIGITAL_CONSTELLATION_DECODER_CB_H +#include <digital_api.h> #include <gr_block.h> #include <digital_constellation.h> #include <vector> @@ -30,7 +31,7 @@ class digital_constellation_decoder_cb; typedef boost::shared_ptr<digital_constellation_decoder_cb>digital_constellation_decoder_cb_sptr; -digital_constellation_decoder_cb_sptr +DIGITAL_API digital_constellation_decoder_cb_sptr digital_make_constellation_decoder_cb (digital_constellation_sptr constellation); /*! @@ -39,14 +40,14 @@ digital_make_constellation_decoder_cb (digital_constellation_sptr constellation) * \ingroup digital * */ -class digital_constellation_decoder_cb : public gr_block +class DIGITAL_API digital_constellation_decoder_cb : public gr_block { private: digital_constellation_sptr d_constellation; unsigned int d_dim; - friend digital_constellation_decoder_cb_sptr + friend DIGITAL_API digital_constellation_decoder_cb_sptr digital_make_constellation_decoder_cb (digital_constellation_sptr constellation); digital_constellation_decoder_cb (digital_constellation_sptr constellation); diff --git a/gr-digital/include/digital_constellation_receiver_cb.h b/gr-digital/include/digital_constellation_receiver_cb.h index a67f67082..8547bdd68 100644 --- a/gr-digital/include/digital_constellation_receiver_cb.h +++ b/gr-digital/include/digital_constellation_receiver_cb.h @@ -23,8 +23,10 @@ #ifndef INCLUDED_DIGITAL_CONSTELLATION_RECEIVER_CB_H #define INCLUDED_DIGITAL_CONSTELLATION_RECEIVER_CB_H +#include <digital_api.h> #include <gr_block.h> #include <digital_constellation.h> +#include <gruel/attributes.h> #include <gri_control_loop.h> #include <gr_complex.h> #include <math.h> @@ -34,7 +36,7 @@ class digital_constellation_receiver_cb; typedef boost::shared_ptr<digital_constellation_receiver_cb> digital_constellation_receiver_cb_sptr; // public constructor -digital_constellation_receiver_cb_sptr +DIGITAL_API digital_constellation_receiver_cb_sptr digital_make_constellation_receiver_cb (digital_constellation_sptr constellation, float loop_bw, float fmin, float fmax); @@ -72,7 +74,7 @@ digital_make_constellation_receiver_cb (digital_constellation_sptr constellation * */ -class digital_constellation_receiver_cb : public gr_block, public gri_control_loop +class DIGITAL_API digital_constellation_receiver_cb : public gr_block, public gri_control_loop { public: int general_work (int noutput_items, @@ -108,12 +110,12 @@ private: static const unsigned int DLLEN = 8; //! delay line plus some length for overflow protection - gr_complex d_dl[2*DLLEN] __attribute__ ((aligned(8))); + __GR_ATTR_ALIGNED(8) gr_complex d_dl[2*DLLEN]; //! index to delay line unsigned int d_dl_idx; - friend digital_constellation_receiver_cb_sptr + friend DIGITAL_API digital_constellation_receiver_cb_sptr digital_make_constellation_receiver_cb (digital_constellation_sptr constell, float loop_bw, float fmin, float fmax); }; diff --git a/gr-digital/include/digital_correlate_access_code_bb.h b/gr-digital/include/digital_correlate_access_code_bb.h index c21875f0e..8095dd409 100644 --- a/gr-digital/include/digital_correlate_access_code_bb.h +++ b/gr-digital/include/digital_correlate_access_code_bb.h @@ -23,6 +23,7 @@ #ifndef INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_BB_H #define INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_BB_H +#include <digital_api.h> #include <gr_sync_block.h> #include <string> @@ -33,7 +34,7 @@ typedef boost::shared_ptr<digital_correlate_access_code_bb> digital_correlate_ac * \param access_code is represented with 1 byte per bit, e.g., "010101010111000100" * \param threshold maximum number of bits that may be wrong */ -digital_correlate_access_code_bb_sptr +DIGITAL_API digital_correlate_access_code_bb_sptr digital_make_correlate_access_code_bb (const std::string &access_code, int threshold); /*! @@ -50,9 +51,9 @@ digital_make_correlate_access_code_bb (const std::string &access_code, int thres * flag bit and is 1 if the corresponding data bit is the first data * bit following the access code. Otherwise the flag bit is 0. */ -class digital_correlate_access_code_bb : public gr_sync_block +class DIGITAL_API digital_correlate_access_code_bb : public gr_sync_block { - friend digital_correlate_access_code_bb_sptr + friend DIGITAL_API digital_correlate_access_code_bb_sptr digital_make_correlate_access_code_bb (const std::string &access_code, int threshold); private: unsigned long long d_access_code; // access code to locate start of packet diff --git a/gr-digital/include/digital_costas_loop_cc.h b/gr-digital/include/digital_costas_loop_cc.h index 3811825dd..c8c722c93 100644 --- a/gr-digital/include/digital_costas_loop_cc.h +++ b/gr-digital/include/digital_costas_loop_cc.h @@ -56,11 +56,14 @@ * \param min_freq the minimum frequency deviation (radians/sample) the loop can handle * \param order the loop order, either 2 or 4 */ + +#include <digital_api.h> + class digital_costas_loop_cc; typedef boost::shared_ptr<digital_costas_loop_cc> digital_costas_loop_cc_sptr; -digital_costas_loop_cc_sptr +DIGITAL_API digital_costas_loop_cc_sptr digital_make_costas_loop_cc (float loop_bw, int order ) throw (std::invalid_argument); @@ -75,9 +78,9 @@ digital_make_costas_loop_cc (float loop_bw, int order * * \p order must be 2 or 4. */ -class digital_costas_loop_cc : public gr_sync_block, public gri_control_loop +class DIGITAL_API digital_costas_loop_cc : public gr_sync_block, public gri_control_loop { - friend digital_costas_loop_cc_sptr + friend DIGITAL_API digital_costas_loop_cc_sptr digital_make_costas_loop_cc (float loop_bw, int order ) throw (std::invalid_argument); diff --git a/gr-digital/include/digital_cpmmod_bc.h b/gr-digital/include/digital_cpmmod_bc.h index 85b901ba2..332856afc 100644 --- a/gr-digital/include/digital_cpmmod_bc.h +++ b/gr-digital/include/digital_cpmmod_bc.h @@ -23,6 +23,7 @@ #ifndef INCLUDED_DIGITAL_CPMMOD_BC_H #define INCLUDED_DIGITAL_CPMMOD_BC_H +#include <digital_api.h> #include <gr_hier_block2.h> #include <gr_char_to_float.h> #include <gr_interp_fir_filter_fff.h> @@ -34,7 +35,7 @@ class digital_cpmmod_bc; typedef boost::shared_ptr<digital_cpmmod_bc> digital_cpmmod_bc_sptr; -digital_cpmmod_bc_sptr +DIGITAL_API digital_cpmmod_bc_sptr digital_make_cpmmod_bc(int type, float h, unsigned samples_per_sym, unsigned L, double beta=0.3); @@ -71,9 +72,9 @@ digital_make_cpmmod_bc(int type, float h, * The modulator will silently accept any other inputs, though. * The output is the phase-modulated signal. */ -class digital_cpmmod_bc : public gr_hier_block2 +class DIGITAL_API digital_cpmmod_bc : public gr_hier_block2 { - friend digital_cpmmod_bc_sptr digital_make_cpmmod_bc(int type, float h, + friend DIGITAL_API digital_cpmmod_bc_sptr digital_make_cpmmod_bc(int type, float h, unsigned samples_per_sym, unsigned L, double beta); diff --git a/gr-digital/include/digital_crc32.h b/gr-digital/include/digital_crc32.h index 869cf7f45..ec4a0df5b 100644 --- a/gr-digital/include/digital_crc32.h +++ b/gr-digital/include/digital_crc32.h @@ -23,6 +23,7 @@ #ifndef INCLUDED_DIGITAL_CRC32_H #define INCLUDED_DIGITAL_CRC32_H +#include <digital_api.h> #include <string> #include <gr_types.h> @@ -35,16 +36,16 @@ * complement of the final running CRC. The resulting CRC should be * transmitted in big endian order. */ -unsigned int +DIGITAL_API unsigned int digital_update_crc32(unsigned int crc, const unsigned char *buf, size_t len); -unsigned int +DIGITAL_API unsigned int digital_update_crc32(unsigned int crc, const std::string buf); -unsigned int +DIGITAL_API unsigned int digital_crc32(const unsigned char *buf, size_t len); -unsigned int +DIGITAL_API unsigned int digital_crc32(const std::string buf); #endif /* INCLUDED_CRC32_H */ diff --git a/gr-digital/include/digital_fll_band_edge_cc.h b/gr-digital/include/digital_fll_band_edge_cc.h index 576dfab87..f07d7ba42 100644 --- a/gr-digital/include/digital_fll_band_edge_cc.h +++ b/gr-digital/include/digital_fll_band_edge_cc.h @@ -24,12 +24,13 @@ #ifndef INCLUDED_DIGITAL_FLL_BAND_EDGE_CC_H #define INCLUDED_DIGITAL_FLL_BAND_EDGE_CC_H +#include <digital_api.h> #include <gr_sync_block.h> #include <gri_control_loop.h> class digital_fll_band_edge_cc; typedef boost::shared_ptr<digital_fll_band_edge_cc> digital_fll_band_edge_cc_sptr; -digital_fll_band_edge_cc_sptr digital_make_fll_band_edge_cc (float samps_per_sym, +DIGITAL_API digital_fll_band_edge_cc_sptr digital_make_fll_band_edge_cc (float samps_per_sym, float rolloff, int filter_size, float bandwidth); @@ -85,7 +86,7 @@ digital_fll_band_edge_cc_sptr digital_make_fll_band_edge_cc (float samps_per_sym * */ -class digital_fll_band_edge_cc : public gr_sync_block, public gri_control_loop +class DIGITAL_API digital_fll_band_edge_cc : public gr_sync_block, public gri_control_loop { private: /*! @@ -95,7 +96,7 @@ class digital_fll_band_edge_cc : public gr_sync_block, public gri_control_loop * \param filter_size (int) Size (in taps) of the filter * \param bandwidth (float) Loop bandwidth */ - friend digital_fll_band_edge_cc_sptr digital_make_fll_band_edge_cc (float samps_per_sym, + friend DIGITAL_API digital_fll_band_edge_cc_sptr digital_make_fll_band_edge_cc (float samps_per_sym, float rolloff, int filter_size, float bandwidth); diff --git a/gr-digital/include/digital_gmskmod_bc.h b/gr-digital/include/digital_gmskmod_bc.h index 4b0952401..9f378c8a7 100644 --- a/gr-digital/include/digital_gmskmod_bc.h +++ b/gr-digital/include/digital_gmskmod_bc.h @@ -23,13 +23,14 @@ #ifndef INCLUDED_DIGITAL_GMSKMOD_BC_H #define INCLUDED_DIGITAL_GMSKMOD_BC_H +#include <digital_api.h> #include <digital_cpmmod_bc.h> class digital_gmskmod_bc; typedef boost::shared_ptr<digital_gmskmod_bc> digital_gmskmod_bc_sptr; -digital_gmskmod_bc_sptr +DIGITAL_API digital_gmskmod_bc_sptr digital_make_gmskmod_bc(unsigned samples_per_sym=2, double bt=0.3, unsigned L=4); @@ -50,9 +51,9 @@ digital_make_gmskmod_bc(unsigned samples_per_sym=2, * The modulator will silently accept any other inputs, though. * The output is the phase-modulated signal. */ -class digital_gmskmod_bc : public digital_cpmmod_bc +class DIGITAL_API digital_gmskmod_bc : public digital_cpmmod_bc { - friend digital_gmskmod_bc_sptr digital_make_gmskmod_bc(unsigned samples_per_sym, + friend DIGITAL_API digital_gmskmod_bc_sptr digital_make_gmskmod_bc(unsigned samples_per_sym, double bt, unsigned L); digital_gmskmod_bc(unsigned samples_per_sym, double bt, unsigned L); diff --git a/gr-digital/include/digital_kurtotic_equalizer_cc.h b/gr-digital/include/digital_kurtotic_equalizer_cc.h index 018a906b0..3ac8712d5 100644 --- a/gr-digital/include/digital_kurtotic_equalizer_cc.h +++ b/gr-digital/include/digital_kurtotic_equalizer_cc.h @@ -23,6 +23,7 @@ #ifndef INCLUDED_DIGITAL_KURTOTIC_EQUALIZER_CC_H #define INCLUDED_DIGITAL_KURTOTIC_EQUALIZER_CC_H +#include <digital_api.h> #include <gr_adaptive_fir_ccc.h> #include <gr_math.h> #include <iostream> @@ -30,7 +31,7 @@ class digital_kurtotic_equalizer_cc; typedef boost::shared_ptr<digital_kurtotic_equalizer_cc> digital_kurtotic_equalizer_cc_sptr; -digital_kurtotic_equalizer_cc_sptr +DIGITAL_API digital_kurtotic_equalizer_cc_sptr digital_make_kurtotic_equalizer_cc(int num_taps, float mu); /*! @@ -42,7 +43,7 @@ digital_make_kurtotic_equalizer_cc(int num_taps, float mu); * equalization algorithm," IEEE Conf. on Control, Automation, * Robotics and Vision, Vol. 3, Dec. 2004, pp. 2052 - 2057. */ -class digital_kurtotic_equalizer_cc : public gr_adaptive_fir_ccc +class DIGITAL_API digital_kurtotic_equalizer_cc : public gr_adaptive_fir_ccc { private: float d_mu; @@ -50,7 +51,7 @@ private: gr_complex d_q, d_u; float d_alpha_p, d_alpha_q, d_alpha_m; - friend digital_kurtotic_equalizer_cc_sptr digital_make_kurtotic_equalizer_cc(int num_taps, + friend DIGITAL_API digital_kurtotic_equalizer_cc_sptr digital_make_kurtotic_equalizer_cc(int num_taps, float mu); digital_kurtotic_equalizer_cc(int num_taps, float mu); diff --git a/gr-digital/include/digital_lms_dd_equalizer_cc.h b/gr-digital/include/digital_lms_dd_equalizer_cc.h index 050d8781d..56871fa67 100644 --- a/gr-digital/include/digital_lms_dd_equalizer_cc.h +++ b/gr-digital/include/digital_lms_dd_equalizer_cc.h @@ -23,13 +23,14 @@ #ifndef INCLUDED_DIGITAL_LMS_DD_EQUALIZER_CC_H #define INCLUDED_DIGITAL_LMS_DD_EQUALIZER_CC_H +#include <digital_api.h> #include <gr_adaptive_fir_ccc.h> #include <digital_constellation.h> class digital_lms_dd_equalizer_cc; typedef boost::shared_ptr<digital_lms_dd_equalizer_cc> digital_lms_dd_equalizer_cc_sptr; -digital_lms_dd_equalizer_cc_sptr digital_make_lms_dd_equalizer_cc (int num_taps, +DIGITAL_API digital_lms_dd_equalizer_cc_sptr digital_make_lms_dd_equalizer_cc (int num_taps, float mu, int sps, digital_constellation_sptr cnst); @@ -66,10 +67,10 @@ digital_lms_dd_equalizer_cc_sptr digital_make_lms_dd_equalizer_cc (int num_taps, * Prentice Hall, 1996. * */ -class digital_lms_dd_equalizer_cc : public gr_adaptive_fir_ccc +class DIGITAL_API digital_lms_dd_equalizer_cc : public gr_adaptive_fir_ccc { private: - friend digital_lms_dd_equalizer_cc_sptr digital_make_lms_dd_equalizer_cc (int num_taps, + friend DIGITAL_API digital_lms_dd_equalizer_cc_sptr digital_make_lms_dd_equalizer_cc (int num_taps, float mu, int sps, digital_constellation_sptr cnst); diff --git a/gr-digital/include/digital_mpsk_receiver_cc.h b/gr-digital/include/digital_mpsk_receiver_cc.h index 74aca5649..e70495bfa 100644 --- a/gr-digital/include/digital_mpsk_receiver_cc.h +++ b/gr-digital/include/digital_mpsk_receiver_cc.h @@ -23,6 +23,7 @@ #ifndef INCLUDED_DIGITAL_MPSK_RECEIVER_CC_H #define INCLUDED_DIGITAL_MPSK_RECEIVER_CC_H +#include <digital_api.h> #include <gruel/attributes.h> #include <gri_control_loop.h> #include <gr_block.h> @@ -35,7 +36,7 @@ class digital_mpsk_receiver_cc; typedef boost::shared_ptr<digital_mpsk_receiver_cc> digital_mpsk_receiver_cc_sptr; // public constructor -digital_mpsk_receiver_cc_sptr +DIGITAL_API digital_mpsk_receiver_cc_sptr digital_make_mpsk_receiver_cc (unsigned int M, float theta, float loop_bw, float fmin, float fmax, @@ -79,7 +80,7 @@ digital_make_mpsk_receiver_cc (unsigned int M, float theta, * */ -class digital_mpsk_receiver_cc : public gr_block, public gri_control_loop +class DIGITAL_API digital_mpsk_receiver_cc : public gr_block, public gri_control_loop { public: ~digital_mpsk_receiver_cc (); @@ -291,7 +292,7 @@ private: //! index to delay line unsigned int d_dl_idx; - friend digital_mpsk_receiver_cc_sptr + friend DIGITAL_API digital_mpsk_receiver_cc_sptr digital_make_mpsk_receiver_cc (unsigned int M, float theta, float loop_bw, float fmin, float fmax, diff --git a/gr-digital/include/digital_ofdm_cyclic_prefixer.h b/gr-digital/include/digital_ofdm_cyclic_prefixer.h index a3c32125b..1b9682bb3 100644 --- a/gr-digital/include/digital_ofdm_cyclic_prefixer.h +++ b/gr-digital/include/digital_ofdm_cyclic_prefixer.h @@ -23,13 +23,14 @@ #ifndef INCLUDED_DIGITAL_OFDM_CYCLIC_PREFIXER_H #define INCLUDED_DIGITAL_OFDM_CYCLIC_PREFIXER_H +#include <digital_api.h> #include <gr_sync_interpolator.h> #include <stdio.h> class digital_ofdm_cyclic_prefixer; typedef boost::shared_ptr<digital_ofdm_cyclic_prefixer> digital_ofdm_cyclic_prefixer_sptr; -digital_ofdm_cyclic_prefixer_sptr +DIGITAL_API digital_ofdm_cyclic_prefixer_sptr digital_make_ofdm_cyclic_prefixer (size_t input_size, size_t output_size); @@ -38,9 +39,9 @@ digital_make_ofdm_cyclic_prefixer (size_t input_size, size_t output_size); * symbol(vector) and converts vector to a stream output_size long. * \ingroup ofdm_blk */ -class digital_ofdm_cyclic_prefixer : public gr_sync_interpolator +class DIGITAL_API digital_ofdm_cyclic_prefixer : public gr_sync_interpolator { - friend digital_ofdm_cyclic_prefixer_sptr + friend DIGITAL_API digital_ofdm_cyclic_prefixer_sptr digital_make_ofdm_cyclic_prefixer (size_t input_size, size_t output_size); protected: diff --git a/gr-digital/include/digital_ofdm_frame_acquisition.h b/gr-digital/include/digital_ofdm_frame_acquisition.h index 971202099..9c2f60233 100644 --- a/gr-digital/include/digital_ofdm_frame_acquisition.h +++ b/gr-digital/include/digital_ofdm_frame_acquisition.h @@ -23,7 +23,7 @@ #ifndef INCLUDED_DIGITAL_OFDM_FRAME_ACQUISITION_H #define INCLUDED_DIGITAL_OFDM_FRAME_ACQUISITION_H - +#include <digital_api.h> #include <gr_block.h> #include <vector> @@ -31,7 +31,7 @@ class digital_ofdm_frame_acquisition; typedef boost::shared_ptr<digital_ofdm_frame_acquisition> digital_ofdm_frame_acquisition_sptr; digital_ofdm_frame_acquisition_sptr -digital_make_ofdm_frame_acquisition (unsigned int occupied_carriers, unsigned int fft_length, +DIGITAL_API digital_make_ofdm_frame_acquisition (unsigned int occupied_carriers, unsigned int fft_length, unsigned int cplen, const std::vector<gr_complex> &known_symbol, unsigned int max_fft_shift_len=10); @@ -54,7 +54,7 @@ digital_make_ofdm_frame_acquisition (unsigned int occupied_carriers, unsigned in * distortion caused by the channel. */ -class digital_ofdm_frame_acquisition : public gr_block +class DIGITAL_API digital_ofdm_frame_acquisition : public gr_block { /*! * \brief Build an OFDM correlator and equalizer. @@ -65,7 +65,7 @@ class digital_ofdm_frame_acquisition : public gr_block * start of a frame (usually a BPSK PN sequence) * \param max_fft_shift_len Set's the maximum distance you can look between bins for correlation */ - friend digital_ofdm_frame_acquisition_sptr + friend DIGITAL_API digital_ofdm_frame_acquisition_sptr digital_make_ofdm_frame_acquisition (unsigned int occupied_carriers, unsigned int fft_length, unsigned int cplen, const std::vector<gr_complex> &known_symbol, diff --git a/gr-digital/include/digital_ofdm_frame_sink.h b/gr-digital/include/digital_ofdm_frame_sink.h index 3575ee35b..5785d4be7 100644 --- a/gr-digital/include/digital_ofdm_frame_sink.h +++ b/gr-digital/include/digital_ofdm_frame_sink.h @@ -23,13 +23,14 @@ #ifndef INCLUDED_DIGITAL_OFDM_FRAME_SINK_H #define INCLUDED_DIGITAL_OFDM_FRAME_SINK_H +#include <digital_api.h> #include <gr_sync_block.h> #include <gr_msg_queue.h> class digital_ofdm_frame_sink; typedef boost::shared_ptr<digital_ofdm_frame_sink> digital_ofdm_frame_sink_sptr; -digital_ofdm_frame_sink_sptr +DIGITAL_API digital_ofdm_frame_sink_sptr digital_make_ofdm_frame_sink (const std::vector<gr_complex> &sym_position, const std::vector<unsigned char> &sym_value_out, gr_msg_queue_sptr target_queue, unsigned int occupied_tones, @@ -45,9 +46,9 @@ digital_make_ofdm_frame_sink (const std::vector<gr_complex> &sym_position, * we want to be able to pass in a reference to an object to do the demapping and slicing * for a given modulation type. */ -class digital_ofdm_frame_sink : public gr_sync_block +class DIGITAL_API digital_ofdm_frame_sink : public gr_sync_block { - friend digital_ofdm_frame_sink_sptr + friend DIGITAL_API digital_ofdm_frame_sink_sptr digital_make_ofdm_frame_sink (const std::vector<gr_complex> &sym_position, const std::vector<unsigned char> &sym_value_out, gr_msg_queue_sptr target_queue, unsigned int occupied_tones, diff --git a/gr-digital/include/digital_ofdm_insert_preamble.h b/gr-digital/include/digital_ofdm_insert_preamble.h index a7d87d42f..6f9dae5d6 100644 --- a/gr-digital/include/digital_ofdm_insert_preamble.h +++ b/gr-digital/include/digital_ofdm_insert_preamble.h @@ -22,13 +22,14 @@ #ifndef INCLUDED_DIGITAL_OFDM_INSERT_PREAMBLE_H #define INCLUDED_DIGITAL_OFDM_INSERT_PREAMBLE_H +#include <digital_api.h> #include <gr_block.h> #include <vector> class digital_ofdm_insert_preamble; typedef boost::shared_ptr<digital_ofdm_insert_preamble> digital_ofdm_insert_preamble_sptr; -digital_ofdm_insert_preamble_sptr +DIGITAL_API digital_ofdm_insert_preamble_sptr digital_make_ofdm_insert_preamble(int fft_length, const std::vector<std::vector<gr_complex> > &preamble); @@ -62,9 +63,9 @@ digital_make_ofdm_insert_preamble(int fft_length, * \param preamble vector of symbols that represent the pre-modulated preamble. */ -class digital_ofdm_insert_preamble : public gr_block +class DIGITAL_API digital_ofdm_insert_preamble : public gr_block { - friend digital_ofdm_insert_preamble_sptr + friend DIGITAL_API digital_ofdm_insert_preamble_sptr digital_make_ofdm_insert_preamble(int fft_length, const std::vector<std::vector<gr_complex> > &preamble); diff --git a/gr-digital/include/digital_ofdm_mapper_bcv.h b/gr-digital/include/digital_ofdm_mapper_bcv.h index e9b47eb9d..daed1eab2 100644 --- a/gr-digital/include/digital_ofdm_mapper_bcv.h +++ b/gr-digital/include/digital_ofdm_mapper_bcv.h @@ -23,6 +23,7 @@ #ifndef INCLUDED_DIGITAL_OFDM_MAPPER_BCV_H #define INCLUDED_DIGITAL_OFDM_MAPPER_BCV_H +#include <digital_api.h> #include <gr_sync_block.h> #include <gr_message.h> #include <gr_msg_queue.h> @@ -30,7 +31,7 @@ class digital_ofdm_mapper_bcv; typedef boost::shared_ptr<digital_ofdm_mapper_bcv> digital_ofdm_mapper_bcv_sptr; -digital_ofdm_mapper_bcv_sptr +DIGITAL_API digital_ofdm_mapper_bcv_sptr digital_make_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, unsigned msgq_limit, unsigned occupied_carriers, unsigned int fft_length); @@ -42,9 +43,9 @@ digital_make_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, unsi * \ingroup ofdm_blk */ -class digital_ofdm_mapper_bcv : public gr_sync_block +class DIGITAL_API digital_ofdm_mapper_bcv : public gr_sync_block { - friend digital_ofdm_mapper_bcv_sptr + friend DIGITAL_API digital_ofdm_mapper_bcv_sptr digital_make_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, unsigned msgq_limit, unsigned occupied_carriers, unsigned int fft_length); protected: diff --git a/gr-digital/include/digital_ofdm_sampler.h b/gr-digital/include/digital_ofdm_sampler.h index 01aa40d46..9c54e4e77 100644 --- a/gr-digital/include/digital_ofdm_sampler.h +++ b/gr-digital/include/digital_ofdm_sampler.h @@ -23,12 +23,13 @@ #ifndef INCLUDED_DIGITAL_OFDM_SAMPLER_H #define INCLUDED_DIGITAL_OFDM_SAMPLER_H +#include <digital_api.h> #include <gr_sync_block.h> class digital_ofdm_sampler; typedef boost::shared_ptr<digital_ofdm_sampler> digital_ofdm_sampler_sptr; -digital_ofdm_sampler_sptr digital_make_ofdm_sampler (unsigned int fft_length, +DIGITAL_API digital_ofdm_sampler_sptr digital_make_ofdm_sampler (unsigned int fft_length, unsigned int symbol_length, unsigned int timeout=1000); @@ -36,9 +37,9 @@ digital_ofdm_sampler_sptr digital_make_ofdm_sampler (unsigned int fft_length, * \brief does the rest of the OFDM stuff * \ingroup ofdm_blk */ -class digital_ofdm_sampler : public gr_block +class DIGITAL_API digital_ofdm_sampler : public gr_block { - friend digital_ofdm_sampler_sptr digital_make_ofdm_sampler (unsigned int fft_length, + friend DIGITAL_API digital_ofdm_sampler_sptr digital_make_ofdm_sampler (unsigned int fft_length, unsigned int symbol_length, unsigned int timeout); diff --git a/gr-digital/lib/CMakeLists.txt b/gr-digital/lib/CMakeLists.txt new file mode 100644 index 000000000..9417dc355 --- /dev/null +++ b/gr-digital/lib/CMakeLists.txt @@ -0,0 +1,73 @@ +# Copyright 2011 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + +######################################################################## +# Setup the include and linker paths +######################################################################## +include_directories( + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GR_DIGITAL_INCLUDE_DIRS} +) + +include_directories(${Boost_INCLUDE_DIRS}) +link_directories(${Boost_LIBRARY_DIRS}) + +######################################################################## +# Setup library +######################################################################## +list(APPEND gr_digital_sources + digital_binary_slicer_fb.cc + digital_clock_recovery_mm_cc.cc + digital_clock_recovery_mm_ff.cc + digital_constellation.cc + digital_constellation_receiver_cb.cc + digital_constellation_decoder_cb.cc + digital_correlate_access_code_bb.cc + digital_costas_loop_cc.cc + digital_cma_equalizer_cc.cc + digital_crc32.cc + digital_fll_band_edge_cc.cc + digital_lms_dd_equalizer_cc.cc + digital_kurtotic_equalizer_cc.cc + digital_mpsk_receiver_cc.cc + digital_ofdm_cyclic_prefixer.cc + digital_ofdm_frame_acquisition.cc + digital_ofdm_frame_sink.cc + digital_ofdm_insert_preamble.cc + digital_ofdm_mapper_bcv.cc + digital_ofdm_sampler.cc + digital_gmskmod_bc.cc + digital_cpmmod_bc.cc +) + +list(APPEND digital_libs + gnuradio-core + ${Boost_LIBRARIES} +) + +add_library(gnuradio-digital SHARED ${gr_digital_sources}) +target_link_libraries(gnuradio-digital ${digital_libs}) +set_target_properties(gnuradio-digital PROPERTIES DEFINE_SYMBOL "gnuradio_digital_EXPORTS") +set_target_properties(gnuradio-digital PROPERTIES SOVERSION ${LIBVER}) + +install(TARGETS gnuradio-digital + LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "digital_runtime" # .so/.dylib file + ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "digital_devel" # .lib file + RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "digital_runtime" # .dll file +) diff --git a/gr-digital/python/CMakeLists.txt b/gr-digital/python/CMakeLists.txt new file mode 100644 index 000000000..905626b8b --- /dev/null +++ b/gr-digital/python/CMakeLists.txt @@ -0,0 +1,77 @@ +# Copyright 2011 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + +######################################################################## +# Setup python install +######################################################################## +include(GrPython) + +GR_PYTHON_INSTALL( + FILES + __init__.py + bpsk.py + cpm.py + crc.py + generic_mod_demod.py + gmsk.py + modulation_utils.py + ofdm.py + ofdm_packet_utils.py + ofdm_receiver.py + ofdm_sync_fixed.py + ofdm_sync_ml.py + ofdm_sync_pnac.py + ofdm_sync_pn.py + packet_utils.py + pkt.py + psk.py + qam.py + qpsk.py + DESTINATION ${GR_PYTHON_DIR}/gnuradio/digital + COMPONENT "digital_python" +) + +GR_PYTHON_INSTALL( + FILES + utils/__init__.py + utils/gray_code.py + utils/mod_codes.py + utils/alignment.py + DESTINATION ${GR_PYTHON_DIR}/gnuradio/digital/utils + COMPONENT "digital_python" +) + +######################################################################## +# Handle the unit tests +######################################################################## +if(ENABLE_TESTING) +include(GrTest) +file(GLOB py_qa_test_files "qa_*.py") +foreach(py_qa_test_file ${py_qa_test_files}) + get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE) + set(GR_TEST_PYTHON_DIRS + ${CMAKE_BINARY_DIR}/gnuradio-core/src/python + ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig + ${CMAKE_BINARY_DIR}/gr-digital/python + ${CMAKE_BINARY_DIR}/gr-digital/swig + ) + set(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-digital) + GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file}) +endforeach(py_qa_test_file) +endif(ENABLE_TESTING) diff --git a/gr-digital/swig/CMakeLists.txt b/gr-digital/swig/CMakeLists.txt new file mode 100644 index 000000000..4f4e51e33 --- /dev/null +++ b/gr-digital/swig/CMakeLists.txt @@ -0,0 +1,67 @@ +# Copyright 2011 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + +######################################################################## +# Setup swig generation +######################################################################## +include(GrPython) +include(GrSwig) + +set(GR_SWIG_INCLUDE_DIRS + ${GR_DIGITAL_INCLUDE_DIRS} + ${GNURADIO_CORE_SWIG_INCLUDE_DIRS} +) + +set(GR_SWIG_LIBRARIES gnuradio-digital) + +GR_SWIG_MAKE(digital_swig digital_swig.i) + +GR_SWIG_INSTALL( + TARGETS digital_swig + DESTINATION ${GR_PYTHON_DIR}/gnuradio/digital + COMPONENT "digital_python" +) + +install( + FILES + digital_binary_slicer_fb.i + digital_clock_recovery_mm_cc.i + digital_clock_recovery_mm_ff.i + digital_constellation.i + digital_constellation_receiver_cb.i + digital_constellation_decoder_cb.i + digital_correlate_access_code_bb.i + digital_costas_loop_cc.i + digital_cma_equalizer_cc.i + digital_crc32.i + digital_fll_band_edge_cc.i + digital_lms_dd_equalizer_cc.i + digital_kurtotic_equalizer_cc.i + digital_mpsk_receiver_cc.i + digital_ofdm_cyclic_prefixer.i + digital_ofdm_frame_acquisition.i + digital_ofdm_frame_sink.i + digital_ofdm_insert_preamble.i + digital_ofdm_mapper_bcv.i + digital_ofdm_sampler.i + digital_gmskmod_bc.i + digital_cpmmod_bc.i + DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig + COMPONENT "digital_swig" +) |