GNU Radio's LTE Package
mimo_sss_calculator_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2014 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_MIMO_SSS_CALCULATOR_IMPL_H
22#define INCLUDED_LTE_MIMO_SSS_CALCULATOR_IMPL_H
23
25
26namespace gr {
27 namespace lte {
28
29 struct sss_info{
30 int pos;
31 int N_id_1;
32 };
33
34
36 {
37 private:
38 int d_N_id_2;
39 int d_cell_id;
40 int d_fftl;
41 int d_rxant;
42 int d_slotl;
43 char d_cX[31];
44 gr_complex d_sref[62];
45 char d_zX[31];
46 int d_v_m0[168];
47 int d_v_m1[168];
48 float d_max_val_new;
49 float d_max_val_old;
50 int d_sss_pos;
51 long d_frame_start;
52 bool d_is_locked;
53 int d_unchanged_id;
54
55
56
57 pmt::pmt_t d_key_id;
58 pmt::pmt_t d_key_offset;
59
60
61 // calculation functions!
62 int calc_m(gr_complex **s0m0, int rxant);
63 int get_N_id_1(int m0, int m1);
64 sss_info get_sss_info(gr_complex** even, gr_complex** odd, int N_id_2, int rxant);
65 gr_complex corr(const gr_complex *x, const gr_complex *y, int len);
66 void xcorr(std::vector<float> &v, const gr_complex *x, const gr_complex *y, int len);
67 int max_element_position(const std::vector<float> &v);
68 void msg_set_N_id_2(pmt::pmt_t msg);
69
70 pmt::pmt_t d_port_cell_id;
71 pmt::pmt_t d_port_frame_start;
72 void publish_cell_id(int cell_id);
73 void publish_frame_start(long frame_start);
74
75 public:
78
79 // Where all the action really happens
80 int work(int noutput_items,
81 gr_vector_const_void_star &input_items,
82 gr_vector_void_star &output_items);
83
84 int get_cell_id(){return d_cell_id;}
85 long get_frame_start(){return d_frame_start;}
86 };
87
88 } // namespace lte
89} // namespace gr
90
91#endif /* INCLUDED_LTE_MIMO_SSS_CALCULATOR_IMPL_H */
92
Definition: mimo_sss_calculator_impl.h:36
long get_frame_start()
Definition: mimo_sss_calculator_impl.h:85
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
int get_cell_id()
Definition: mimo_sss_calculator_impl.h:84
<+description of block+>
Definition: mimo_sss_calculator.h:37
Definition: bch_crc_check_ant_chooser_bb.h:28
Definition: mimo_sss_calculator_impl.h:29
int N_id_1
Definition: mimo_sss_calculator_impl.h:31
int pos
Definition: mimo_sss_calculator_impl.h:30