GNU Radio's LTE Package
pcfich_demux_vcvc_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2013 <+YOU OR YOUR COMPANY+>.
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_DEMUX_VCVC_IMPL_H
22#define INCLUDED_LTE_PCFICH_DEMUX_VCVC_IMPL_H
23
25#include <cstdio>
26
27namespace gr {
28 namespace lte {
29
31 {
32 private:
33 pmt::pmt_t d_key;
34 pmt::pmt_t d_out_key;
35 pmt::pmt_t d_tag_id;
36 pmt::pmt_t d_msg_buf;
37 int d_N_rb_dl;
38
39 int d_cell_id;
40
41 // Handle new incoming messages to set cell_id
42 void handle_msg(pmt::pmt_t msg){ set_cell_id( int(pmt::to_long(msg)) );}
43
44 int d_sym_num;
45
46 int calculate_n_process_items(gr_vector_int ninput_items);
47 inline int get_sym_num(std::vector<gr::tag_t> v);
48
49 std::vector<int> d_pcfich_pos;
50 void update_pcfich_pos(int N_rb_dl, int cell_id);
51
52 void extract_pcfich(gr_complex* out0, const gr_complex* in0);
53
54
55 public:
56 pcfich_demux_vcvc_impl(int N_rb_dl, std::string key, std::string out_key, std::string msg_buf_name, std::string& name);
58
59 // Where all the action really happens
60 void forecast (int noutput_items, gr_vector_int &ninput_items_required);
61
62 // This is public to have access to it in QA code.
63 // In normal operation it is supposed to be called via handle_msg method.
64 void set_cell_id(int id){
65 d_cell_id = id;
66 update_pcfich_pos(d_N_rb_dl, d_cell_id);
67 printf("%s\t set cell_id = %i\n", name().c_str(), d_cell_id);
68 }
69
70 int general_work(int noutput_items,
71 gr_vector_int &ninput_items,
72 gr_vector_const_void_star &input_items,
73 gr_vector_void_star &output_items);
74 };
75
76 } // namespace lte
77} // namespace gr
78
79#endif /* INCLUDED_LTE_PCFICH_DEMUX_VCVC_IMPL_H */
80
Definition pcfich_demux_vcvc_impl.h:31
pcfich_demux_vcvc_impl(int N_rb_dl, std::string key, std::string out_key, std::string msg_buf_name, std::string &name)
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)
void set_cell_id(int id)
Definition pcfich_demux_vcvc_impl.h:64
Demux PCFICH from resource grid.
Definition pcfich_demux_vcvc.h:37
Definition bch_crc_check_ant_chooser_bb.h:28