The Inspector (GNU Radio module gr-inspector)
signal_extractor_c.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_H
22 #define INCLUDED_INSPECTOR_SIGNAL_EXTRACTOR_C_H
23 
24 #include <gnuradio/sync_block.h>
25 #include <inspector/api.h>
26 
27 namespace gr {
28 namespace inspector {
29 
30 /*!
31  * \brief Extractor block to extract signal samples out of bundled message passed from
32  * Signal Separator block. \ingroup inspector
33  *
34  * \details
35  * Signal Extractor block is able to extract signal samples for specified
36  * signal out of message passed by Signal Separator block. These messages
37  * contain the samples of all detected signals. This block only passes the
38  * ones beloging to the specified signal number as a complex stream. This
39  * way, custom signal chains can be appended after the inspector blocks.
40  *
41  * If the resample option is used, the block will try to resample the
42  * input samples based on the message input from the map port to the
43  * desired output sample rate. An oversampling factor can be taken
44  * into account, if the input samples are oversampled by the
45  * signal separator.
46  */
47 class INSPECTOR_API signal_extractor_c : virtual public gr::sync_block
48 {
49 public:
50  typedef boost::shared_ptr<signal_extractor_c> sptr;
51 
52  /*!
53  * \brief Return a new Extractor block instance
54  *
55  * \param signal Output Signal number (beginning with 0) for desired sample
56  * \param resample Enable resampling of samples
57  * \param rate Desired output sample rate if resample is enabled
58  * \param osf Oversampling factor of the input signal (relative to map input)
59  */
60  static sptr
61  make(int signal, bool resample = false, float rate = 1.0, float osf = 1.0);
62  virtual void set_signal(int signal) = 0;
63 };
64 
65 } // namespace inspector
66 } // namespace gr
67 
68 #endif /* INCLUDED_INSPECTOR_SIGNAL_EXTRACTOR_C_H */
#define INSPECTOR_API
Definition: api.h:31
boost::shared_ptr< signal_extractor_c > sptr
Definition: signal_extractor_c.h:50
Definition: inspector_form.h:40
Extractor block to extract signal samples out of bundled message passed from Signal Separator block...
Definition: signal_extractor_c.h:47