GNU Radio Manual and C++ API Reference  3.9.1.0
The Free & Open Software Radio Ecosystem
ctcss_squelch_ff.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2006,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_ANALOG_CTCSS_SQUELCH_FF_H
12 #define INCLUDED_ANALOG_CTCSS_SQUELCH_FF_H
13 
14 #include <gnuradio/analog/api.h>
16 #include <gnuradio/block.h>
17 
18 namespace gr {
19 namespace analog {
20 
21 /*!
22  * \brief gate or zero output if CTCSS tone not present
23  * \ingroup level_controllers_blk
24  */
25 class ANALOG_API ctcss_squelch_ff : public squelch_base_ff, virtual public block
26 {
27 protected:
28  void update_state(const float& in) override = 0;
29  bool mute() const override = 0;
30 
31 public:
32  // gr::analog::ctcss_squelch_ff::sptr
33  typedef std::shared_ptr<ctcss_squelch_ff> sptr;
34 
35  /*!
36  * \brief Make CTCSS tone squelch block.
37  *
38  * \param rate gain of the internal frequency filters.
39  * \param freq frequency value to use as the squelch tone.
40  * \param level threshold level for the squelch tone.
41  * \param len length of the frequency filters.
42  * \param ramp attack / release time in samples; a sinusodial ramp
43  * is used. set to 0 to disable.
44  * \param gate if true, no output if no squelch tone.
45  * if false, output 0's if no squelch tone.
46  */
47  static sptr make(int rate, float freq, float level, int len, int ramp, bool gate);
48 
49  std::vector<float> squelch_range() const override = 0;
50  virtual float level() const = 0;
51  virtual void set_level(float level) = 0;
52  virtual int len() const = 0;
53  virtual float frequency() const = 0;
54  virtual void set_frequency(float frequency) = 0;
55 
56  int ramp() const override = 0;
57  void set_ramp(int ramp) override = 0;
58  bool gate() const override = 0;
59  void set_gate(bool gate) override = 0;
60  bool unmuted() const override = 0;
61 };
62 
63 } /* namespace analog */
64 } /* namespace gr */
65 
66 #endif /* INCLUDED_ANALOG_CTCSS_SQUELCH_FF_H */
block.h
squelch_base_ff.h
gr::analog::ctcss_squelch_ff::sptr
std::shared_ptr< ctcss_squelch_ff > sptr
Definition: ctcss_squelch_ff.h:33
gr::analog::squelch_base_ff
basic squelch block; to be subclassed for other squelches.
Definition: squelch_base_ff.h:24
ANALOG_API
#define ANALOG_API
Definition: gr-analog/include/gnuradio/analog/api.h:18
gr::block
The abstract base class for all 'terminal' processing blocks.
Definition: block.h:59
gr
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:29
api.h
gr::analog::ctcss_squelch_ff
gate or zero output if CTCSS tone not present
Definition: ctcss_squelch_ff.h:25