GNU Radio's TPMS Package
burst_detector_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2014 Jared Boone <jared@sharebrained.com>.
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_TPMS_BURST_DETECTOR_IMPL_H
22 #define INCLUDED_TPMS_BURST_DETECTOR_IMPL_H
23 
24 #include <tpms/burst_detector.h>
25 
26 #include <fftw3.h>
27 
28 namespace gr {
29  namespace tpms {
30 
32  {
33  private:
34  unsigned int d_hysteresis_timeout;
35  unsigned int d_hysteresis_count;
36  bool d_burst;
37  pmt::pmt_t d_tag_burst;
38 
39  size_t d_block_size;
40  size_t d_advance;
41  size_t d_readahead_items;
42 
43  float* d_fft_window;
44  float* d_temp_f;
45 
46  gr_complex *d_fft_in;
47  gr_complex *d_fft_out;
48  fftwf_plan d_fft_plan;
49 
50  public:
53 
54  void forecast(int noutput_items,
55  gr_vector_int &ninput_items_required);
56 
57  int general_work(int noutput_items,
58  gr_vector_int &ninput_items,
59  gr_vector_const_void_star &input_items,
60  gr_vector_void_star &output_items);
61  };
62 
63  } // namespace tpms
64 } // namespace gr
65 
66 #endif /* INCLUDED_TPMS_BURST_DETECTOR_IMPL_H */
67 
Definition: burst_detector_impl.h:31
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Identify and tag stream ranges that contain significant bursts of energy.
Definition: burst_detector.h:35
Definition: ask_env.h:27
void forecast(int noutput_items, gr_vector_int &ninput_items_required)