summaryrefslogtreecommitdiff
path: root/gr-digital
diff options
context:
space:
mode:
Diffstat (limited to 'gr-digital')
-rw-r--r--gr-digital/CMakeLists.txt105
-rw-r--r--gr-digital/grc/CMakeLists.txt34
-rw-r--r--gr-digital/lib/CMakeLists.txt75
-rw-r--r--gr-digital/lib/Makefile.am1
-rw-r--r--gr-digital/lib/digital_api.h33
-rw-r--r--gr-digital/lib/digital_cma_equalizer_cc.h7
-rw-r--r--gr-digital/lib/digital_constellation.h41
-rw-r--r--gr-digital/lib/digital_constellation_decoder_cb.h7
-rw-r--r--gr-digital/lib/digital_constellation_receiver_cb.h10
-rw-r--r--gr-digital/lib/digital_costas_loop_cc.h7
-rw-r--r--gr-digital/lib/digital_kurtotic_equalizer_cc.h7
-rw-r--r--gr-digital/lib/digital_lms_dd_equalizer_cc.h7
-rw-r--r--gr-digital/python/CMakeLists.txt71
-rw-r--r--gr-digital/swig/CMakeLists.txt52
14 files changed, 418 insertions, 39 deletions
diff --git a/gr-digital/CMakeLists.txt b/gr-digital/CMakeLists.txt
new file mode 100644
index 000000000..cc00da69a
--- /dev/null
+++ b/gr-digital/CMakeLists.txt
@@ -0,0 +1,105 @@
+# 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}/lib
+)
+
+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(lib)
+IF(ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(swig)
+ ADD_SUBDIRECTORY(python)
+ ADD_SUBDIRECTORY(grc)
+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/grc/CMakeLists.txt b/gr-digital/grc/CMakeLists.txt
new file mode 100644
index 000000000..b6c26b0db
--- /dev/null
+++ b/gr-digital/grc/CMakeLists.txt
@@ -0,0 +1,34 @@
+# 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_costas_loop_cc.xml
+ digital_cma_equalizer_cc.xml
+ digital_lms_dd_equalizer_cc.xml
+ digital_kurtotic_equalizer_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/lib/CMakeLists.txt b/gr-digital/lib/CMakeLists.txt
new file mode 100644
index 000000000..86e082b31
--- /dev/null
+++ b/gr-digital/lib/CMakeLists.txt
@@ -0,0 +1,75 @@
+# 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_constellation.cc
+ digital_constellation_receiver_cb.cc
+ digital_constellation_decoder_cb.cc
+ digital_costas_loop_cc.cc
+ digital_cma_equalizer_cc.cc
+ digital_lms_dd_equalizer_cc.cc
+ digital_kurtotic_equalizer_cc.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
+)
+
+########################################################################
+# Install header files
+########################################################################
+INSTALL(FILES
+ digital_api.h
+ digital_constellation.h
+ digital_constellation_receiver_cb.h
+ digital_constellation_decoder_cb.h
+ digital_costas_loop_cc.h
+ digital_cma_equalizer_cc.h
+ digital_lms_dd_equalizer_cc.h
+ digital_kurtotic_equalizer_cc.h
+ digital_metric_type.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "digital_devel"
+)
diff --git a/gr-digital/lib/Makefile.am b/gr-digital/lib/Makefile.am
index 4f67614d8..1cdb27a38 100644
--- a/gr-digital/lib/Makefile.am
+++ b/gr-digital/lib/Makefile.am
@@ -25,6 +25,7 @@ AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
# These headers get installed in ${prefix}/include/gnuradio
grinclude_HEADERS = \
+ digital_api.h \
digital_constellation.h \
digital_constellation_receiver_cb.h \
digital_constellation_decoder_cb.h \
diff --git a/gr-digital/lib/digital_api.h b/gr-digital/lib/digital_api.h
new file mode 100644
index 000000000..d45ace13f
--- /dev/null
+++ b/gr-digital/lib/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/lib/digital_cma_equalizer_cc.h b/gr-digital/lib/digital_cma_equalizer_cc.h
index 0dd99debd..69e2f657a 100644
--- a/gr-digital/lib/digital_cma_equalizer_cc.h
+++ b/gr-digital/lib/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);
/*!
@@ -43,13 +44,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/lib/digital_constellation.h b/gr-digital/lib/digital_constellation.h
index d345ebc10..df00f3898 100644
--- a/gr-digital/lib/digital_constellation.h
+++ b/gr-digital/lib/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>
@@ -38,7 +39,7 @@
class digital_constellation;
typedef boost::shared_ptr<digital_constellation> digital_constellation_sptr;
-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, std::vector<unsigned int> pre_diff_code,
@@ -118,12 +119,12 @@ 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, unsigned int dimensionality);
-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,
@@ -136,7 +137,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);
};
@@ -149,7 +150,7 @@ class digital_constellation_calcdist : public digital_constellation
/* point. */
/************************************************************/
-class digital_constellation_sector : public digital_constellation
+class DIGITAL_API digital_constellation_sector : public digital_constellation
{
public:
@@ -192,13 +193,13 @@ 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,
unsigned int real_sectors, unsigned int imag_sectors,
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:
@@ -220,7 +221,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,
unsigned int real_sectors, unsigned int imag_sectors,
@@ -242,12 +243,12 @@ 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);
-class digital_constellation_psk : public digital_constellation_sector
+class DIGITAL_API digital_constellation_psk : public digital_constellation_sector
{
public:
@@ -263,7 +264,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);
@@ -281,17 +282,17 @@ 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 ();
-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 ();
};
@@ -307,17 +308,17 @@ 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 ();
-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 ();
};
@@ -334,17 +335,17 @@ 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 ();
-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/lib/digital_constellation_decoder_cb.h b/gr-digital/lib/digital_constellation_decoder_cb.h
index 022456733..1ce01fe12 100644
--- a/gr-digital/lib/digital_constellation_decoder_cb.h
+++ b/gr-digital/lib/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);
/*!
@@ -38,14 +39,14 @@ digital_make_constellation_decoder_cb (digital_constellation_sptr constellation)
* \ingroup coding_blk
*
*/
-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/lib/digital_constellation_receiver_cb.h b/gr-digital/lib/digital_constellation_receiver_cb.h
index bf6fc51fa..36169d76b 100644
--- a/gr-digital/lib/digital_constellation_receiver_cb.h
+++ b/gr-digital/lib/digital_constellation_receiver_cb.h
@@ -23,6 +23,8 @@
#ifndef INCLUDED_DIGITAL_CONSTELLATION_RECEIVER_CB_H
#define INCLUDED_DIGITAL_CONSTELLATION_RECEIVER_CB_H
+#include <digital_api.h>
+#include <gruel/attributes.h>
#include <gr_block.h>
#include <digital_constellation.h>
#include <gr_complex.h>
@@ -33,7 +35,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 alpha, float beta,
float fmin, float fmax);
@@ -64,7 +66,7 @@ digital_make_constellation_receiver_cb (digital_constellation_sptr constellation
*
*/
-class digital_constellation_receiver_cb : public gr_block
+class DIGITAL_API digital_constellation_receiver_cb : public gr_block
{
public:
int general_work (int noutput_items,
@@ -135,12 +137,12 @@ protected:
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 alpha, float beta,
float fmin, float fmax);
diff --git a/gr-digital/lib/digital_costas_loop_cc.h b/gr-digital/lib/digital_costas_loop_cc.h
index 9c112d328..099fca3be 100644
--- a/gr-digital/lib/digital_costas_loop_cc.h
+++ b/gr-digital/lib/digital_costas_loop_cc.h
@@ -24,6 +24,7 @@
#ifndef INCLUDED_DIGITAL_COSTAS_LOOP_CC_H
#define INCLUDED_DIGITAL_COSTAS_LOOP_CC_H
+#include <digital_api.h>
#include <gr_sync_block.h>
#include <stdexcept>
#include <fstream>
@@ -57,7 +58,7 @@ 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 damping, float nat_freq,
int order
) throw (std::invalid_argument);
@@ -73,9 +74,9 @@ digital_make_costas_loop_cc (float damping, float nat_freq,
*
* \p order must be 2 or 4.
*/
-class digital_costas_loop_cc : public gr_sync_block
+class DIGITAL_API digital_costas_loop_cc : public gr_sync_block
{
- friend digital_costas_loop_cc_sptr
+ friend DIGITAL_API digital_costas_loop_cc_sptr
digital_make_costas_loop_cc (float damping, float nat_freq,
int order
) throw (std::invalid_argument);
diff --git a/gr-digital/lib/digital_kurtotic_equalizer_cc.h b/gr-digital/lib/digital_kurtotic_equalizer_cc.h
index e01cbd6e6..c07862e11 100644
--- a/gr-digital/lib/digital_kurtotic_equalizer_cc.h
+++ b/gr-digital/lib/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);
/*!
@@ -41,7 +42,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;
@@ -49,7 +50,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/lib/digital_lms_dd_equalizer_cc.h b/gr-digital/lib/digital_lms_dd_equalizer_cc.h
index e3ad4bf4a..edfa18e23 100644
--- a/gr-digital/lib/digital_lms_dd_equalizer_cc.h
+++ b/gr-digital/lib/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);
@@ -65,10 +66,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/python/CMakeLists.txt b/gr-digital/python/CMakeLists.txt
new file mode 100644
index 000000000..194894c73
--- /dev/null
+++ b/gr-digital/python/CMakeLists.txt
@@ -0,0 +1,71 @@
+# 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
+ psk.py
+ dbpsk.py
+ dqpsk.py
+ d8psk.py
+ psk2.py
+ generic_mod_demod.py
+ qam.py
+ bpsk.py
+ qpsk.py
+ ofdm.py
+ pkt.py
+ modulation_utils2.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} ${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..a7374f0f0
--- /dev/null
+++ b/gr-digital/swig/CMakeLists.txt
@@ -0,0 +1,52 @@
+# 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_constellation.i
+ digital_constellation_receiver_cb.i
+ digital_constellation_decoder_cb.i
+ digital_costas_loop_cc.i
+ digital_cma_equalizer_cc.i
+ digital_lms_dd_equalizer_cc.i
+ digital_kurtotic_equalizer_cc.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "digital_swig"
+)