summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/general
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2012-11-12 20:36:05 -0800
committerJohnathan Corgan <johnathan@corganlabs.com>2012-11-12 20:36:05 -0800
commitce1213e615023fa5c43f75ba2d2ec54649025b8f (patch)
tree8567615201922dc4f1196a965161f4bba0e24dd7 /gnuradio-core/src/lib/general
parent5b568abe194f027860670317915c27c174fab52e (diff)
fec: add new top-level component for FEC blocks
Removed viterbi and reed-solomon from gnuradio-core
Diffstat (limited to 'gnuradio-core/src/lib/general')
-rw-r--r--gnuradio-core/src/lib/general/CMakeLists.txt2
-rw-r--r--gnuradio-core/src/lib/general/general.i4
-rw-r--r--gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.cc86
-rw-r--r--gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.h78
-rw-r--r--gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.i31
-rw-r--r--gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.cc62
-rw-r--r--gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.h64
-rw-r--r--gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.i31
8 files changed, 0 insertions, 358 deletions
diff --git a/gnuradio-core/src/lib/general/CMakeLists.txt b/gnuradio-core/src/lib/general/CMakeLists.txt
index 848d860a8f..67205d79b9 100644
--- a/gnuradio-core/src/lib/general/CMakeLists.txt
+++ b/gnuradio-core/src/lib/general/CMakeLists.txt
@@ -175,10 +175,8 @@ set(gr_core_general_triple_threats
gr_complex_to_xxx
gr_conjugate_cc
gr_copy
- gr_decode_ccsds_27_fb
gr_deinterleave
gr_delay
- gr_encode_ccsds_27_bb
gr_endian_swap
gr_fake_channel_coder_pp
gr_feval
diff --git a/gnuradio-core/src/lib/general/general.i b/gnuradio-core/src/lib/general/general.i
index 93c5d5ddb4..b03d8bbb5e 100644
--- a/gnuradio-core/src/lib/general/general.i
+++ b/gnuradio-core/src/lib/general/general.i
@@ -90,8 +90,6 @@
#include <gr_bin_statistics_f.h>
#include <gr_peak_detector2_fb.h>
#include <gr_repeat.h>
-#include <gr_encode_ccsds_27_bb.h>
-#include <gr_decode_ccsds_27_fb.h>
#include <gr_stretch_ff.h>
#include <gr_copy.h>
#include <complex_vec_test.h>
@@ -172,8 +170,6 @@
%include "gr_bin_statistics_f.i"
%include "gr_peak_detector2_fb.i"
%include "gr_repeat.i"
-%include "gr_encode_ccsds_27_bb.i"
-%include "gr_decode_ccsds_27_fb.i"
%include "gr_stretch_ff.i"
%include "gr_copy.i"
%include "complex_vec_test.i"
diff --git a/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.cc b/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.cc
deleted file mode 100644
index 319aceeaab..0000000000
--- a/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.cc
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008,2010 Free Software Foundation, Inc.
- *
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gr_decode_ccsds_27_fb.h>
-#include <gr_io_signature.h>
-
-gr_decode_ccsds_27_fb_sptr
-gr_make_decode_ccsds_27_fb()
-{
- return gnuradio::get_initial_sptr(new gr_decode_ccsds_27_fb());
-}
-
-gr_decode_ccsds_27_fb::gr_decode_ccsds_27_fb()
- : gr_sync_decimator("decode_ccsds_27_fb",
- gr_make_io_signature(1, 1, sizeof(float)),
- gr_make_io_signature(1, 1, sizeof(char)),
- 2*8) // Rate 1/2 code, unpacked to packed translation
-{
- float RATE = 0.5;
- float ebn0 = 12.0;
- float esn0 = RATE*pow(10.0, ebn0/10.0);
-
- gen_met(d_mettab, 100, esn0, 0.0, 256);
- viterbi_chunks_init(d_state0);
-}
-
-gr_decode_ccsds_27_fb::~gr_decode_ccsds_27_fb()
-{
-}
-
-int
-gr_decode_ccsds_27_fb::work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
-{
- const float *in = (const float *)input_items[0];
- unsigned char *out = (unsigned char *)output_items[0];
-
- for (int i = 0; i < noutput_items*16; i++) {
- // Translate and clip [-1.0..1.0] to [28..228]
- float sample = in[i]*100.0+128.0;
- if (sample > 255.0)
- sample = 255.0;
- else if (sample < 0.0)
- sample = 0.0;
- unsigned char sym = (unsigned char)(floor(sample));
-
- d_viterbi_in[d_count % 4] = sym;
- if ((d_count % 4) == 3) {
- // Every fourth symbol, perform butterfly operation
- viterbi_butterfly2(d_viterbi_in, d_mettab, d_state0, d_state1);
-
- // Every sixteenth symbol, read out a byte
- if (d_count % 16 == 11) {
- // long metric =
- viterbi_get_output(d_state0, out++);
- // printf("%li\n", *(out-1), metric);
- }
- }
-
- d_count++;
- }
-
- return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.h b/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.h
deleted file mode 100644
index df8e6f449d..0000000000
--- a/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008 Free Software Foundation, Inc.
- *
- * 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_GR_DECODE_CCSDS_27_FB_H
-#define INCLUDED_GR_DECODE_CCSDS_27_FB_H
-
-#include <gr_core_api.h>
-#include <gr_sync_decimator.h>
-
-extern "C" {
-#include <viterbi.h>
-}
-
-class gr_decode_ccsds_27_fb;
-
-typedef boost::shared_ptr<gr_decode_ccsds_27_fb> gr_decode_ccsds_27_fb_sptr;
-
-GR_CORE_API gr_decode_ccsds_27_fb_sptr gr_make_decode_ccsds_27_fb();
-
-/*! \brief A rate 1/2, k=7 convolutional decoder for the CCSDS standard
- * \ingroup ecc
- *
- * This block performs soft-decision convolutional decoding using the Viterbi
- * algorithm.
- *
- * The input is a stream of (possibly noise corrupted) floating point values
- * nominally spanning [-1.0, 1.0], representing the encoded channel symbols
- * 0 (-1.0) and 1 (1.0), with erased symbols at 0.0.
- *
- * The output is MSB first packed bytes of decoded values.
- *
- * As a rate 1/2 code, there will be one output byte for every 16 input symbols.
- *
- * This block is designed for continuous data streaming, not packetized data.
- * The first 32 bits out will be zeroes, with the output delayed four bytes
- * from the corresponding inputs.
- */
-
-class GR_CORE_API gr_decode_ccsds_27_fb : public gr_sync_decimator
-{
-private:
- friend GR_CORE_API gr_decode_ccsds_27_fb_sptr gr_make_decode_ccsds_27_fb();
-
- gr_decode_ccsds_27_fb();
-
- // Viterbi state
- int d_mettab[2][256];
- struct viterbi_state d_state0[64];
- struct viterbi_state d_state1[64];
- unsigned char d_viterbi_in[16];
-
- int d_count;
-
-public:
- ~gr_decode_ccsds_27_fb();
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif /* INCLUDED_GR_DECODE_CCSDS_27_FB_H */
diff --git a/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.i b/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.i
deleted file mode 100644
index f2e13b593a..0000000000
--- a/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.i
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008 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.
- */
-
-GR_SWIG_BLOCK_MAGIC(gr,decode_ccsds_27_fb);
-
-gr_decode_ccsds_27_fb_sptr gr_make_decode_ccsds_27_fb ();
-
-class gr_decode_ccsds_27_fb : public gr_sync_decimator
-{
-private:
- gr_decode_ccsds_27_fb();
-};
diff --git a/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.cc b/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.cc
deleted file mode 100644
index 4a92d113a5..0000000000
--- a/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2008,2010 Free Software Foundation, Inc.
- *
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gr_encode_ccsds_27_bb.h>
-#include <gr_io_signature.h>
-
-extern "C" {
-#include <../viterbi/viterbi.h>
-}
-
-gr_encode_ccsds_27_bb_sptr
-gr_make_encode_ccsds_27_bb()
-{
- return gnuradio::get_initial_sptr(new gr_encode_ccsds_27_bb());
-}
-
-gr_encode_ccsds_27_bb::gr_encode_ccsds_27_bb()
- : gr_sync_interpolator("encode_ccsds_27_bb",
- gr_make_io_signature(1, 1, sizeof(char)),
- gr_make_io_signature(1, 1, sizeof(char)),
- 16) // Rate 1/2 code, packed to unpacked conversion
-{
- d_encstate = 0;
-}
-
-gr_encode_ccsds_27_bb::~gr_encode_ccsds_27_bb()
-{
-}
-
-int
-gr_encode_ccsds_27_bb::work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
-{
- unsigned char *in = (unsigned char *)input_items[0];
- unsigned char *out = (unsigned char *)output_items[0];
-
- d_encstate = encode(out, in, noutput_items/16, d_encstate);
-
- return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.h b/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.h
deleted file mode 100644
index 94e9c33f1b..0000000000
--- a/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008 Free Software Foundation, Inc.
- *
- * 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_GR_ENCODE_CCSDS_27_BB_H
-#define INCLUDED_GR_ENCODE_CCSDS_27_BB_H
-
-#include <gr_core_api.h>
-#include <gr_sync_interpolator.h>
-
-class gr_encode_ccsds_27_bb;
-
-typedef boost::shared_ptr<gr_encode_ccsds_27_bb> gr_encode_ccsds_27_bb_sptr;
-
-GR_CORE_API gr_encode_ccsds_27_bb_sptr gr_make_encode_ccsds_27_bb();
-
-/*! \brief A rate 1/2, k=7 convolutional encoder for the CCSDS standard
- * \ingroup ecc
- *
- * This block performs convolutional encoding using the CCSDS standard
- * polynomial ("Voyager").
- *
- * The input is an MSB first packed stream of bits.
- *
- * The output is a stream of symbols 0 or 1 representing the encoded data.
- *
- * As a rate 1/2 code, there will be 16 output symbols for every input byte.
- *
- * This block is designed for continuous data streaming, not packetized data.
- * There is no provision to "flush" the encoder.
- */
-
-class GR_CORE_API gr_encode_ccsds_27_bb : public gr_sync_interpolator
-{
-private:
- friend GR_CORE_API gr_encode_ccsds_27_bb_sptr gr_make_encode_ccsds_27_bb();
-
- gr_encode_ccsds_27_bb();
- unsigned char d_encstate;
-
- public:
- ~gr_encode_ccsds_27_bb();
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif /* INCLUDED_GR_ENCODE_CCSDS_27_BB_H */
diff --git a/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.i b/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.i
deleted file mode 100644
index e74e9174ac..0000000000
--- a/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.i
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008 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.
- */
-
-GR_SWIG_BLOCK_MAGIC(gr,encode_ccsds_27_bb);
-
-gr_encode_ccsds_27_bb_sptr gr_make_encode_ccsds_27_bb ();
-
-class gr_encode_ccsds_27_bb : public gr_sync_interpolator
-{
-private:
- gr_encode_ccsds_27_bb();
-};