The Inspector (GNU Radio module gr-inspector)
signal_extractor_c_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2019 Free Software Foundation, Inc..
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_INSPECTOR_SIGNAL_EXTRACTOR_C_IMPL_H
22 #define INCLUDED_INSPECTOR_SIGNAL_EXTRACTOR_C_IMPL_H
23 
24 #include <gnuradio/filter/pfb_arb_resampler.h>
26 
27 namespace gr {
28 namespace inspector {
29 
31 {
32 private:
33  int d_signal, d_length;
34  bool d_ready, d_resample;
35  float d_out_rate, d_oversampling, d_rate;
36  std::vector<gr_complex> d_samples;
37  gr_complex* d_msg_buffer;
38  filter::kernel::pfb_arb_resampler_ccf* d_resampler;
39 
40 public:
41  signal_extractor_c_impl(int signal, bool resample, float rate, float osf);
43 
44  // write samples from message in buffer
45  void handle_msg(pmt::pmt_t msg);
46 
47  // Where all the action really happens
48  int work(int noutput_items,
49  gr_vector_const_void_star& input_items,
50  gr_vector_void_star& output_items);
51 
52  // callback
53  void set_signal(int d_signal) { signal_extractor_c_impl::d_signal = d_signal; }
54 };
55 
56 } // namespace inspector
57 } // namespace gr
58 
59 #endif /* INCLUDED_INSPECTOR_SIGNAL_EXTRACTOR_C_IMPL_H */
Definition: inspector_form.h:40
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Definition: signal_extractor_c_impl.h:30
void set_signal(int d_signal)
Definition: signal_extractor_c_impl.h:53
Extractor block to extract signal samples out of bundled message passed from Signal Separator block...
Definition: signal_extractor_c.h:47
signal_extractor_c_impl(int signal, bool resample, float rate, float osf)