GNU Radio's CDMA Package
switched_peak_detector_fb_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2016 <+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_CDMA_SWITCHED_PEAK_DETECTOR_FB_IMPL_H
22#define INCLUDED_CDMA_SWITCHED_PEAK_DETECTOR_FB_IMPL_H
23
25
26namespace gr {
27 namespace cdma {
28
30 {
31 private:
32 // Nothing to declare in this block.
33 float d_threshold_factor_rise;
34 float d_threshold_factor_fall;
35 int d_look_ahead;
36 float d_avg_alpha;
37 float d_avg;
38 unsigned char d_found;
39 int d_on;
40 int d_state;
41
42 public:
45 int look_ahead,
46 float alpha,
47 int on);
49
50 void set_threshold_factor_rise(float thr) { d_threshold_factor_rise = thr; }
51 void set_threshold_factor_fall(float thr) { d_threshold_factor_fall = thr; }
52 void set_look_ahead(int look) { d_look_ahead = look; }
53 void set_alpha(float alpha) { d_avg_alpha = alpha; }
54 void set_on(int on) { d_on = on; }
55 float threshold_factor_rise() { return d_threshold_factor_rise; }
56 float threshold_factor_fall() { return d_threshold_factor_fall; }
57 int look_ahead() { return d_look_ahead; }
58 float alpha() { return d_avg_alpha; }
59 int on() { return d_on; }
60
61
62 // Where all the action really happens
63 int work(int noutput_items,
64 gr_vector_const_void_star &input_items,
65 gr_vector_void_star &output_items);
66 };
67
68 } // namespace cdma
69} // namespace gr
70
71#endif /* INCLUDED_CDMA_SWITCHED_PEAK_DETECTOR_FB_IMPL_H */
72
Definition: switched_peak_detector_fb_impl.h:30
int look_ahead()
Definition: switched_peak_detector_fb_impl.h:57
void set_threshold_factor_fall(float thr)
Definition: switched_peak_detector_fb_impl.h:51
void set_on(int on)
Definition: switched_peak_detector_fb_impl.h:54
float alpha()
Definition: switched_peak_detector_fb_impl.h:58
int on()
Definition: switched_peak_detector_fb_impl.h:59
void set_threshold_factor_rise(float thr)
Definition: switched_peak_detector_fb_impl.h:50
void set_look_ahead(int look)
Definition: switched_peak_detector_fb_impl.h:52
float threshold_factor_rise()
Definition: switched_peak_detector_fb_impl.h:55
switched_peak_detector_fb_impl(float threshold_factor_rise, float threshold_factor_fall, int look_ahead, float alpha, int on)
void set_alpha(float alpha)
Definition: switched_peak_detector_fb_impl.h:53
float threshold_factor_fall()
Definition: switched_peak_detector_fb_impl.h:56
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
<+description of block+>
Definition: switched_peak_detector_fb.h:37
Definition: amp_var_est.h:30