summaryrefslogtreecommitdiff
path: root/gr-trellis/src
diff options
context:
space:
mode:
authorTom Rondeau2011-06-22 16:33:45 -0700
committerTom Rondeau2011-06-22 16:33:45 -0700
commite13fcfbd9d82ea37610c5423229fa3a228fa604d (patch)
tree9ddefc3f2eff9ab3e7de394e1304b6dd83715b83 /gr-trellis/src
parent5ce630cbce6460b739b175257ce0d717095a55f4 (diff)
parent233621d6bbc3c68109998d0e68ffc7df7de69eb4 (diff)
downloadgnuradio-e13fcfbd9d82ea37610c5423229fa3a228fa604d.tar.gz
gnuradio-e13fcfbd9d82ea37610c5423229fa3a228fa604d.tar.bz2
gnuradio-e13fcfbd9d82ea37610c5423229fa3a228fa604d.zip
Merge pull request #2 from benreynwar/8psk
Constell obj
Diffstat (limited to 'gr-trellis/src')
-rw-r--r--gr-trellis/src/lib/Makefile.am11
-rw-r--r--gr-trellis/src/lib/calc_metric.h2
-rw-r--r--gr-trellis/src/lib/core_algorithms.h2
-rw-r--r--gr-trellis/src/lib/metric_type.h31
-rw-r--r--gr-trellis/src/lib/trellis.i7
-rw-r--r--gr-trellis/src/lib/trellis_constellation_metrics_cf.cc4
-rw-r--r--gr-trellis/src/lib/trellis_constellation_metrics_cf.h12
-rw-r--r--gr-trellis/src/lib/trellis_constellation_metrics_cf.i4
8 files changed, 23 insertions, 50 deletions
diff --git a/gr-trellis/src/lib/Makefile.am b/gr-trellis/src/lib/Makefile.am
index 152608286..e81490089 100644
--- a/gr-trellis/src/lib/Makefile.am
+++ b/gr-trellis/src/lib/Makefile.am
@@ -29,8 +29,9 @@ EXTRA_DIST += \
trellis.test
-AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
-
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) \
+ -I$(abs_top_builddir)/gr-digital/lib
+
# ----------------------------------------------------------------
# these scripts generate trellis codes from template files
@@ -81,7 +82,6 @@ grinclude_HEADERS = \
quicksort_index.h \
base.h \
interleaver.h \
- metric_type.h \
calc_metric.h \
core_algorithms.h \
trellis_permutation.h \
@@ -160,6 +160,11 @@ include $(top_srcdir)/Makefile.par.gen
BUILT_SOURCES += $(python_built_sources)
+# Location of non-standard SWIG interface files
+trellis_swig_args = \
+ -I$(abs_top_builddir)/gr-digital/lib \
+ -I$(abs_top_builddir)/gr-digital/swig
+
if GUILE
TESTS += run_guile_tests
endif
diff --git a/gr-trellis/src/lib/calc_metric.h b/gr-trellis/src/lib/calc_metric.h
index d628f44e0..fd20f8d36 100644
--- a/gr-trellis/src/lib/calc_metric.h
+++ b/gr-trellis/src/lib/calc_metric.h
@@ -25,7 +25,7 @@
#include <vector>
#include <gr_complex.h>
-#include <metric_type.h>
+#include <digital_metric_type.h>
template <class T>
diff --git a/gr-trellis/src/lib/core_algorithms.h b/gr-trellis/src/lib/core_algorithms.h
index fdb5f398e..fd45844c0 100644
--- a/gr-trellis/src/lib/core_algorithms.h
+++ b/gr-trellis/src/lib/core_algorithms.h
@@ -26,7 +26,7 @@
#include <cmath>
#include <vector>
//#include <gr_complex.h>
-#include "metric_type.h"
+#include "digital_metric_type.h"
#include "fsm.h"
#include "interleaver.h"
diff --git a/gr-trellis/src/lib/metric_type.h b/gr-trellis/src/lib/metric_type.h
deleted file mode 100644
index a1040f108..000000000
--- a/gr-trellis/src/lib/metric_type.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004 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_TRELLIS_METRIC_TYPE_H
-#define INCLUDED_TRELLIS_METRIC_TYPE_H
-
-typedef enum {
- TRELLIS_EUCLIDEAN = 200, TRELLIS_HARD_SYMBOL, TRELLIS_HARD_BIT
-} trellis_metric_type_t;
-
-#endif
-
diff --git a/gr-trellis/src/lib/trellis.i b/gr-trellis/src/lib/trellis.i
index ee5f5da39..a030ab906 100644
--- a/gr-trellis/src/lib/trellis.i
+++ b/gr-trellis/src/lib/trellis.i
@@ -29,7 +29,7 @@
#include "trellis_siso_f.h"
#include "trellis_siso_combined_f.h"
#include "trellis_constellation_metrics_cf.h"
-#include "gr_constellation.h"
+#include "digital_constellation.h"
%}
@@ -41,15 +41,14 @@
%include "trellis_siso_f.i"
%include "trellis_siso_combined_f.i"
-%include "metric_type.h"
%include "siso_type.h"
%include "trellis_constellation_metrics_cf.i"
%include "trellis_generated.i"
-%import "gr_metric_type.h"
-%import "gr_constellation.i"
+%import "digital_metric_type.h"
+%import "digital_constellation.i"
%pythoncode %{
from gnuradio.gr import TRELLIS_EUCLIDEAN, TRELLIS_HARD_SYMBOL, TRELLIS_HARD_BIT
diff --git a/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc b/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc
index fb529aaa7..1d03886f1 100644
--- a/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc
+++ b/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc
@@ -35,14 +35,14 @@
trellis_constellation_metrics_cf_sptr
-trellis_make_constellation_metrics_cf (gr_constellation_sptr constellation, trellis_metric_type_t TYPE)
+trellis_make_constellation_metrics_cf (digital_constellation_sptr constellation, trellis_metric_type_t TYPE)
{
return gnuradio::get_initial_sptr (new trellis_constellation_metrics_cf (constellation, TYPE));
}
-trellis_constellation_metrics_cf::trellis_constellation_metrics_cf (gr_constellation_sptr constellation, trellis_metric_type_t TYPE)
+trellis_constellation_metrics_cf::trellis_constellation_metrics_cf (digital_constellation_sptr constellation, trellis_metric_type_t TYPE)
: gr_block ("constellation_metrics_cf",
gr_make_io_signature (1, -1, sizeof (gr_complex)),
gr_make_io_signature (1, -1, sizeof (float))),
diff --git a/gr-trellis/src/lib/trellis_constellation_metrics_cf.h b/gr-trellis/src/lib/trellis_constellation_metrics_cf.h
index df35f16d2..a34c335ec 100644
--- a/gr-trellis/src/lib/trellis_constellation_metrics_cf.h
+++ b/gr-trellis/src/lib/trellis_constellation_metrics_cf.h
@@ -24,13 +24,13 @@
#define INCLUDED_TRELLIS_CONSTELLATION_METRICS_CF_H
#include <gr_block.h>
-#include <gr_constellation.h>
-#include <gr_metric_type.h>
+#include <digital_constellation.h>
+#include <digital_metric_type.h>
class trellis_constellation_metrics_cf;
typedef boost::shared_ptr<trellis_constellation_metrics_cf> trellis_constellation_metrics_cf_sptr;
-trellis_constellation_metrics_cf_sptr trellis_make_constellation_metrics_cf (gr_constellation_sptr constellation, trellis_metric_type_t TYPE);
+trellis_constellation_metrics_cf_sptr trellis_make_constellation_metrics_cf (digital_constellation_sptr constellation, trellis_metric_type_t TYPE);
/*!
* \brief Evaluate metrics for use by the Viterbi algorithm.
@@ -46,14 +46,14 @@ class trellis_constellation_metrics_cf : public gr_block
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
protected:
- trellis_constellation_metrics_cf (gr_constellation_sptr constellation, trellis_metric_type_t TYPE);
+ trellis_constellation_metrics_cf (digital_constellation_sptr constellation, trellis_metric_type_t TYPE);
private:
- gr_constellation_sptr d_constellation;
+ digital_constellation_sptr d_constellation;
trellis_metric_type_t d_TYPE;
unsigned int d_O;
unsigned int d_D;
- friend trellis_constellation_metrics_cf_sptr trellis_make_constellation_metrics_cf (gr_constellation_sptr constellation, trellis_metric_type_t TYPE);
+ friend trellis_constellation_metrics_cf_sptr trellis_make_constellation_metrics_cf (digital_constellation_sptr constellation, trellis_metric_type_t TYPE);
};
diff --git a/gr-trellis/src/lib/trellis_constellation_metrics_cf.i b/gr-trellis/src/lib/trellis_constellation_metrics_cf.i
index f863453f2..c17522b11 100644
--- a/gr-trellis/src/lib/trellis_constellation_metrics_cf.i
+++ b/gr-trellis/src/lib/trellis_constellation_metrics_cf.i
@@ -24,10 +24,10 @@
GR_SWIG_BLOCK_MAGIC(trellis,constellation_metrics_cf);
-trellis_constellation_metrics_cf_sptr trellis_make_constellation_metrics_cf (gr_constellation_sptr constellation, trellis_metric_type_t TYPE);
+trellis_constellation_metrics_cf_sptr trellis_make_constellation_metrics_cf (digital_constellation_sptr constellation, trellis_metric_type_t TYPE);
class trellis_constellation_metrics_cf : public gr_block
{
private:
- trellis_constellation_metrics_cf (gr_constellation_sptr constellation, trellis_metric_type_t TYPE);
+ trellis_constellation_metrics_cf (digital_constellation_sptr constellation, trellis_metric_type_t TYPE);
};