GNU Radio Manual and C++ API Reference
3.9.1.0
The Free & Open Software Radio Ecosystem
goertzel.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2006,2011,2012 Free Software Foundation, Inc.
4
*
5
* This file is part of GNU Radio
6
*
7
* SPDX-License-Identifier: GPL-3.0-or-later
8
*
9
*/
10
11
#ifndef INCLUDED_FFT_IMPL_GOERTZEL_H
12
#define INCLUDED_FFT_IMPL_GOERTZEL_H
13
14
#include <
gnuradio/fft/api.h
>
15
#include <
gnuradio/types.h
>
16
17
namespace
gr
{
18
namespace
fft {
19
20
/*!
21
* \brief Implements Goertzel single-bin DFT calculation
22
* \ingroup misc
23
*/
24
class
FFT_API
goertzel
25
{
26
public
:
27
goertzel
(
int
rate,
int
len,
float
freq);
28
29
void
set_params(
int
rate,
int
len,
float
freq);
30
31
// Process a input array
32
gr_complex
batch(
const
float
* in);
33
34
// Process sample by sample
35
void
input(
const
float
& in);
36
gr_complex
output();
37
bool
ready
()
const
{
return
d_processed == d_len; }
38
39
private
:
40
float
d_d1;
41
float
d_d2;
42
float
d_wr;
43
float
d_wi;
44
int
d_len;
45
int
d_processed;
46
};
47
48
}
/* namespace fft */
49
}
/* namespace gr */
50
51
#endif
/* INCLUDED_FFT_IMPL_GOERTZEL_H */
types.h
FFT_API
#define FFT_API
Definition:
gr-fft/include/gnuradio/fft/api.h:18
gr::fft::goertzel::ready
bool ready() const
Definition:
goertzel.h:37
gr_complex
std::complex< float > gr_complex
Definition:
gr_complex.h:15
api.h
gr::fft::goertzel
Implements Goertzel single-bin DFT calculation.
Definition:
goertzel.h:24
gr
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition:
basic_block.h:29
gr-fft
include
gnuradio
fft
goertzel.h
Generated by
1.8.17