GNU Radio's GFDM Package
detect_frame_energy_kernel_cl.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
22#ifndef INCLUDED_GFDM_DETECT_FRAME_ENERGY_KERNEL_CL_H
23#define INCLUDED_GFDM_DETECT_FRAME_ENERGY_KERNEL_CL_H
24
25#include <complex>
26#include <boost/shared_ptr.hpp>
27
28namespace gr {
29 namespace gfdm {
30
31 /*!
32 * \brief Perform rough energy based synchronization for TDD
33 * Calculate Energy over average_len samples and put out flag if previous_energy < alpha * current_energy.
34 * Flag is returned for the first such block.
35 *
36 */
38 {
39 public:
40 typedef std::complex<float> gfdm_complex;
41 typedef boost::shared_ptr<detect_frame_energy_kernel_cl> sptr;
42
45 long detect_frame(const gfdm_complex* p_in, const int ninput_items);
46 int average_len(){ return d_average_len;};
47 float alpha(){ return d_alpha;};
48 void set_alpha(float alpha){d_alpha = alpha;};
49 void set_initial_energy_value(const float e){d_block_energy = e;};
50 private:
51 float d_alpha;
52 int d_average_len;
53
54 float d_block_energy;
55
56 };
57
58 } // namespace gfdm
59} // namespace gr
60
61#endif /* INCLUDED_GFDM_DETECT_FRAME_ENERGY_KERNEL_CL_H */
62
Perform rough energy based synchronization for TDD Calculate Energy over average_len samples and put ...
Definition: detect_frame_energy_kernel_cl.h:38
int average_len()
Definition: detect_frame_energy_kernel_cl.h:46
void set_alpha(float alpha)
Definition: detect_frame_energy_kernel_cl.h:48
long detect_frame(const gfdm_complex *p_in, const int ninput_items)
std::complex< float > gfdm_complex
Definition: detect_frame_energy_kernel_cl.h:40
detect_frame_energy_kernel_cl(float alpha, int average_len)
float alpha()
Definition: detect_frame_energy_kernel_cl.h:47
void set_initial_energy_value(const float e)
Definition: detect_frame_energy_kernel_cl.h:49
boost::shared_ptr< detect_frame_energy_kernel_cl > sptr
Definition: detect_frame_energy_kernel_cl.h:41
Definition: add_cyclic_prefix_cc.h:30