3 * Copyright 2008 Free Software Foundation, Inc.
5 * GNU Radio is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3, or (at your option)
10 * GNU Radio is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GNU Radio; see the file COPYING. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street,
18 * Boston, MA 02110-1301, USA.
20 #ifndef INCLUDED_GR_DECODE_CCSDS_27_FB_H
21 #define INCLUDED_GR_DECODE_CCSDS_27_FB_H
23 #include <gr_sync_decimator.h>
26 #include "../viterbi/viterbi.h"
29 class gr_decode_ccsds_27_fb;
31 typedef boost::shared_ptr<gr_decode_ccsds_27_fb> gr_decode_ccsds_27_fb_sptr;
33 gr_decode_ccsds_27_fb_sptr gr_make_decode_ccsds_27_fb();
35 /*! \brief A rate 1/2, k=7 convolutional decoder for the CCSDS standard
38 * This block performs soft-decision convolutional decoding using the Viterbi
41 * The input is a stream of (possibly noise corrupted) floating point values
42 * nominally spanning [-1.0, 1.0], representing the encoded channel symbols
43 * 0 (-1.0) and 1 (1.0), with erased symbols at 0.0.
45 * The output is MSB first packed bytes of decoded values.
47 * As a rate 1/2 code, there will be one output byte for every 16 input symbols.
49 * This block is designed for continuous data streaming, not packetized data.
50 * The first 32 bits out will be zeroes, with the output delayed four bytes
51 * from the corresponding inputs.
54 class gr_decode_ccsds_27_fb : public gr_sync_decimator
57 friend gr_decode_ccsds_27_fb_sptr gr_make_decode_ccsds_27_fb();
59 gr_decode_ccsds_27_fb();
63 struct viterbi_state d_state0[64];
64 struct viterbi_state d_state1[64];
65 unsigned char d_viterbi_in[16];
70 ~gr_decode_ccsds_27_fb();
72 int work (int noutput_items,
73 gr_vector_const_void_star &input_items,
74 gr_vector_void_star &output_items);
77 #endif /* INCLUDED_GR_DECODE_CCSDS_27_FB_H */