GNU Radio Manual and C++ API Reference 3.8.5.0
The Free & Open Software Radio Ecosystem
 
Loading...
Searching...
No Matches
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 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
10 * any later version.
11 *
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
21 */
22
23#ifndef INCLUDED_ANALOG_CTCSS_SQUELCH_FF_H
24#define INCLUDED_ANALOG_CTCSS_SQUELCH_FF_H
25
26#include <gnuradio/analog/api.h>
28#include <gnuradio/block.h>
29
30namespace gr {
31namespace analog {
32
33/*!
34 * \brief gate or zero output if CTCSS tone not present
35 * \ingroup level_controllers_blk
36 */
37class ANALOG_API ctcss_squelch_ff : public squelch_base_ff, virtual public block
38{
39protected:
40 virtual void update_state(const float& in) = 0;
41 virtual bool mute() const = 0;
42
43public:
44 // gr::analog::ctcss_squelch_ff::sptr
45 typedef boost::shared_ptr<ctcss_squelch_ff> sptr;
46
47 /*!
48 * \brief Make CTCSS tone squelch block.
49 *
50 * \param rate gain of the internal frequency filters.
51 * \param freq frequency value to use as the squelch tone.
52 * \param level threshold level for the squelch tone.
53 * \param len length of the frequency filters.
54 * \param ramp attack / release time in samples; a sinusodial ramp
55 * is used. set to 0 to disable.
56 * \param gate if true, no output if no squelch tone.
57 * if false, output 0's if no squelch tone.
58 */
59 static sptr make(int rate, float freq, float level, int len, int ramp, bool gate);
60
61 virtual std::vector<float> squelch_range() const = 0;
62 virtual float level() const = 0;
63 virtual void set_level(float level) = 0;
64 virtual int len() const = 0;
65 virtual float frequency() const = 0;
66 virtual void set_frequency(float frequency) = 0;
67
68 virtual int ramp() const = 0;
69 virtual void set_ramp(int ramp) = 0;
70 virtual bool gate() const = 0;
71 virtual void set_gate(bool gate) = 0;
72 virtual bool unmuted() const = 0;
73};
74
75} /* namespace analog */
76} /* namespace gr */
77
78#endif /* INCLUDED_ANALOG_CTCSS_SQUELCH_FF_H */
gate or zero output if CTCSS tone not present
Definition ctcss_squelch_ff.h:38
virtual int ramp() const =0
virtual bool gate() const =0
virtual void set_frequency(float frequency)=0
virtual void set_gate(bool gate)=0
virtual bool mute() const =0
virtual void update_state(const float &in)=0
virtual std::vector< float > squelch_range() const =0
virtual int len() const =0
virtual void set_ramp(int ramp)=0
virtual float frequency() const =0
virtual void set_level(float level)=0
virtual bool unmuted() const =0
virtual float level() const =0
static sptr make(int rate, float freq, float level, int len, int ramp, bool gate)
Make CTCSS tone squelch block.
boost::shared_ptr< ctcss_squelch_ff > sptr
Definition ctcss_squelch_ff.h:45
basic squelch block; to be subclassed for other squelches.
Definition squelch_base_ff.h:37
The abstract base class for all 'terminal' processing blocks.
Definition block.h:72
#define ANALOG_API
Definition gr-analog/include/gnuradio/analog/api.h:30
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition basic_block.h:46