GNU Radio's LTE Package
crc_check_vbvb_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2013 Communications Engineering Lab (CEL) / Karlsruhe Institute of Technology (KIT)
4 *
5 * This 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)
8 * any later version.
9 *
10 * This software 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.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this software; see the file COPYING. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street,
18 * Boston, MA 02110-1301, USA.
19 */
20
21#ifndef INCLUDED_LTE_CRC_CHECK_VBVB_IMPL_H
22#define INCLUDED_LTE_CRC_CHECK_VBVB_IMPL_H
23
24#include <lte/crc_check_vbvb.h>
25#include <boost/crc.hpp>
26
27namespace gr {
28 namespace lte {
29
31 {
32 private:
33 int d_exp[16];
34 const int d_data_len;
35 const int d_final_xor;
36 // length checksum, CRC ploynomial, initial state, final XOR, REFLECT Input, REFLECT_REM
37 boost::crc_optimal<16, 0x1021, 0x0000, 0x0000, false, false> lte_crc_16;
38 // final XOR may be different, but due to template restrictions this is processed outside of this function.
39 unsigned char pack_byte(const char* unc);
40
41 public:
42 crc_check_vbvb_impl(std::string& name, int data_len, int final_xor);
44
45 // Where all the action really happens
46 int work(int noutput_items,
47 gr_vector_const_void_star &input_items,
48 gr_vector_void_star &output_items);
49 };
50
51 } // namespace lte
52} // namespace gr
53
54#endif /* INCLUDED_LTE_CRC_CHECK_VBVB_IMPL_H */
55
Definition: crc_check_vbvb_impl.h:31
crc_check_vbvb_impl(std::string &name, int data_len, int final_xor)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Calculate CRC and check if it is equal to received CRC.
Definition: crc_check_vbvb.h:37
Definition: bch_crc_check_ant_chooser_bb.h:28