GNU Radio's GFDM Package
frame_energy_detector_cc_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2016 Johannes Demel.
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_GFDM_FRAME_ENERGY_DETECTOR_CC_IMPL_H
22#define INCLUDED_GFDM_FRAME_ENERGY_DETECTOR_CC_IMPL_H
23
26
27namespace gr {
28 namespace gfdm {
29
31 {
32 private:
33 int d_frame_len;
34 int d_backoff_len;
35 pmt::pmt_t d_tag_key;
36 pmt::pmt_t d_tag_srcid;
37 pmt::pmt_t d_tag_value;
38 int d_remaining_frame;
39
41
42 public:
43 frame_energy_detector_cc_impl(float alpha, int average_len, int frame_len, int backoff_len, const std::string& tag_key);
45
46 float alpha(){ return d_kernel->alpha();};
47 void set_alpha(float alpha){d_kernel->set_alpha(alpha);};
48
49 int backoff_len(){ return d_backoff_len;};
50 void set_backoff_len(int backoff_len){d_backoff_len = backoff_len;};
51
52 // Where all the action really happens
53 void forecast (int noutput_items, gr_vector_int &ninput_items_required);
54
55 int general_work(int noutput_items,
56 gr_vector_int &ninput_items,
57 gr_vector_const_void_star &input_items,
58 gr_vector_void_star &output_items);
59 };
60
61 } // namespace gfdm
62} // namespace gr
63
64#endif /* INCLUDED_GFDM_FRAME_ENERGY_DETECTOR_CC_IMPL_H */
65
boost::shared_ptr< detect_frame_energy_kernel_cl > sptr
Definition detect_frame_energy_kernel_cl.h:41
Definition frame_energy_detector_cc_impl.h:31
void set_alpha(float alpha)
Definition frame_energy_detector_cc_impl.h:47
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
frame_energy_detector_cc_impl(float alpha, int average_len, int frame_len, int backoff_len, const std::string &tag_key)
float alpha()
Definition frame_energy_detector_cc_impl.h:46
int backoff_len()
Definition frame_energy_detector_cc_impl.h:49
void set_backoff_len(int backoff_len)
Definition frame_energy_detector_cc_impl.h:50
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Detect frames based on energy ramp detection.
Definition frame_energy_detector_cc.h:37
Definition add_cyclic_prefix_cc.h:30