GNU Radio's DAB Package
reed_solomon_decode_bb_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Reed-Solomon decoder for DAB+
4 * Copyright 2002 Phil Karn, KA9Q
5 * May be used under the terms of the GNU General Public License (GPL)
6 *
7 * Rewritten into a GNU Radio block for gr-dab
8 * Copyright 2017 Moritz Luca Schmid, Communications Engineering Lab (CEL) / Karlsruhe Institute of Technology (KIT).
9
10 *
11 * This is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 3, or (at your option)
14 * any later version.
15 *
16 * This software is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this software; see the file COPYING. If not, write to
23 * the Free Software Foundation, Inc., 51 Franklin Street,
24 * Boston, MA 02110-1301, USA.
25 */
26
27#ifndef INCLUDED_DAB_REED_SOLOMON_DECODE_BB_IMPL_H
28#define INCLUDED_DAB_REED_SOLOMON_DECODE_BB_IMPL_H
29
31
32extern "C" {
33#include "./fec/fec.h"
34}
35
36namespace gr {
37 namespace dab {
38/*! \brief Reed-Solomon decoder configured for DAB+
39 *
40 * Reed Solomon RS(120, 110, t=5) with virtual interleaving; derived from RS(255, 245, t=5). Details see ETSI TS 102 563 clause 6.0 and 6.1.
41 *
42 * @param bit_rate_n data rate in multiples of 8kbit/s
43 *
44 */
46 private:
47 int d_bit_rate_n;
48 int d_superframe_size;
49 int d_superframe_size_rs;
50 void *rs_handle;
51 uint8_t rs_packet[120];
52 int corr_pos[10];
53 int d_corrected_errors;
54
55 void DecodeSuperframe(uint8_t *sf, size_t sf_len);
56
57 public:
59
61
63 { return d_corrected_errors; }
64
65 // Where all the action really happens
66 void forecast(int noutput_items, gr_vector_int &ninput_items_required);
67
68 int general_work(int noutput_items,
69 gr_vector_int &ninput_items,
70 gr_vector_const_void_star &input_items,
71 gr_vector_void_star &output_items);
72 };
73
74 } // namespace dab
75} // namespace gr
76
77#endif /* INCLUDED_DAB_REED_SOLOMON_DECODE_BB_IMPL_H */
78
Reed-Solomon decoder configured for DAB+.
Definition reed_solomon_decode_bb_impl.h:45
virtual int get_corrected_errors()
Definition reed_solomon_decode_bb_impl.h:62
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
Reed-Solomon decoder configured for DAB+.
Definition reed_solomon_decode_bb.h:37
Definition complex_to_interleaved_float_vcf.h:28