GNU Radio's LTE Package
sss_calculator_vcm_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_SSS_CALCULATOR_VCM_IMPL_H
22#define INCLUDED_LTE_SSS_CALCULATOR_VCM_IMPL_H
23
25
26namespace gr {
27 namespace lte {
28
29 struct sss_info{
30 int pos;
31 int N_id_1;
32 };
33
35 {
36 private:
37 int d_N_id_2;
38 int d_cell_id;
39 int d_fftl;
40 int d_slotl;
41 char d_cX[31];
42 gr_complex d_sref[62];
43 char d_zX[31];
44 int d_v_m0[168];
45 int d_v_m1[168];
46 float d_max_val_new;
47 float d_max_val_old;
48 int d_sss_pos;
49 long d_frame_start;
50 bool d_is_locked;
51 int d_unchanged_id;
52 pmt::pmt_t d_key_id;
53 pmt::pmt_t d_key_offset;
54
55 // calculation functions!
56 int calc_m(gr_complex *s0m0);
57 int get_N_id_1(int m0, int m1);
58 sss_info get_sss_info(gr_complex* even, gr_complex* odd, int N_id_2);
59 gr_complex corr(gr_complex *x,gr_complex *y, int len);
60 void xcorr(std::vector<gr_complex> &v, gr_complex *x,gr_complex *y, int len);
61
62 pmt::pmt_t d_port_cell_id;
63 pmt::pmt_t d_port_frame_start;
64 void publish_cell_id(int cell_id);
65 void publish_frame_start(long frame_start);
66
67 public:
68 sss_calculator_vcm_impl(int fftl, std::string key_id, std::string key_offset, std::string& name);
70
71 // Where all the action really happens
72 int work(int noutput_items,
73 gr_vector_const_void_star &input_items,
74 gr_vector_void_star &output_items);
75
76 int get_cell_id(){return d_cell_id;}
77 long get_frame_start(){return d_frame_start;}
78 };
79
80 } // namespace lte
81} // namespace gr
82
83#endif /* INCLUDED_LTE_SSS_CALCULATOR_VCM_IMPL_H */
84
Definition sss_calculator_vcm_impl.h:35
int get_cell_id()
Definition sss_calculator_vcm_impl.h:76
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
long get_frame_start()
Definition sss_calculator_vcm_impl.h:77
sss_calculator_vcm_impl(int fftl, std::string key_id, std::string key_offset, std::string &name)
Detect SSS in symbol.
Definition sss_calculator_vcm.h:37
Definition bch_crc_check_ant_chooser_bb.h:28
Definition sss_calculator_vcm_impl.h:29
int N_id_1
Definition mimo_sss_calculator_impl.h:31
int pos
Definition mimo_sss_calculator_impl.h:30