GNU Radio's LTE Package
pcfich_unpack_vfm_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_PCFICH_UNPACK_VFM_IMPL_H
22#define INCLUDED_LTE_PCFICH_UNPACK_VFM_IMPL_H
23
25
26namespace gr {
27 namespace lte {
28
30 {
31 private:
32 struct cfi_result {
33 int cfi;
34 float val;
35 };
36
37 pmt::pmt_t d_port_cfi;
38 pmt::pmt_t d_key;
39 float* d_in_seq;
40 std::vector<float*> d_ref_seqs;
41 int d_subframe;
42 void initialize_ref_seqs();
43
44 cfi_result calculate_cfi(float* in_seq);
45 float correlate(float* in0, float* in1, int len);
46
47 void publish_cfi(int subframe, cfi_result cfi);
48
49 // Helpers to write test code
50 bool d_dbg;
51 void activate_debug_mode(bool ena){d_dbg = ena;}
52 std::vector<int> d_cfi_results;
53 std::vector<int> cfi_results() {return d_cfi_results;}
54
55 public:
56 pcfich_unpack_vfm_impl(std::string key, std::string msg_buf_name, std::string& name);
58
59 // Where all the action really happens
60 int work(int noutput_items,
61 gr_vector_const_void_star &input_items,
62 gr_vector_void_star &output_items);
63 };
64
65 } // namespace lte
66} // namespace gr
67
68#endif /* INCLUDED_LTE_PCFICH_UNPACK_VFM_IMPL_H */
69
Definition pcfich_unpack_vfm_impl.h:30
pcfich_unpack_vfm_impl(std::string key, std::string msg_buf_name, std::string &name)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Unpack CFI and publish it on output message port.
Definition pcfich_unpack_vfm.h:38
Definition bch_crc_check_ant_chooser_bb.h:28