libsdr
0.1.0
A simple SDR library
|
Low-pass FIR filter specialization. More...
#include <firfilter.hh>
Public Member Functions | |
FIRLowPass (size_t order, double Fc) | |
Constructor. More... | |
virtual | ~FIRLowPass () |
Destructor. More... | |
double | freq () const |
Returns the filter frequency. More... | |
void | setFreq (double freq) |
Sets the filter frequency. More... | |
Public Member Functions inherited from sdr::FIRFilter< Scalar, FIRLowPassCoeffs > | |
FIRFilter (size_t order, double Fl, double Fu) | |
Constructor. More... | |
virtual | ~FIRFilter () |
Destructor. More... | |
bool | enabled () const |
Returns true if the filter is enabled. More... | |
void | enable (bool enable) |
Enable/Disable the filter. More... | |
size_t | order () const |
Returns the order of the filter. More... | |
virtual void | setOrder (size_t order) |
Sets the order of the filter and updates the filter coefficients. More... | |
double | lowerFreq () const |
Returns the lower edge frequency. More... | |
void | setLowerFreq (double Fl) |
Sets the lower edge frequency. More... | |
double | uppertFreq () const |
Returns the upper edge frequency. More... | |
void | setUpperFreq (double Fu) |
Sets the upper edge frequency. More... | |
virtual void | config (const Config &src_cfg) |
Configures the filter. More... | |
virtual void | process (const Buffer< Scalar > &buffer, bool allow_overwrite) |
Performs the filtering. More... | |
Public Member Functions inherited from sdr::Sink< Scalar > | |
Sink () | |
Constructor. More... | |
virtual | ~Sink () |
Drestructor. More... | |
virtual void | handleBuffer (const RawBuffer &buffer, bool allow_overwrite) |
Re-implemented from SinkBase . More... | |
Public Member Functions inherited from sdr::SinkBase | |
SinkBase () | |
Constructor. More... | |
virtual | ~SinkBase () |
Destructor. More... | |
Public Member Functions inherited from sdr::Source | |
Source () | |
Constructor. More... | |
virtual | ~Source () |
Destructor. More... | |
virtual void | send (const RawBuffer &buffer, bool allow_overwrite=false) |
Sends the given buffer to all connected sinks. More... | |
void | connect (SinkBase *sink, bool direct=false) |
Connect this source to a sink. More... | |
void | disconnect (SinkBase *sink) |
Disconnect a sink again. More... | |
virtual void | setConfig (const Config &config) |
Stores the configuration and propergates it if the configuration has been changed. More... | |
virtual double | sampleRate () const |
Returns the configured sample rate or 0 otherwise. More... | |
virtual Config::Type | type () const |
Returns the configured source type or Config::Type_UNDEFINED otherwise. More... | |
template<class T > | |
void | addEOS (T *instance, void(T::*function)()) |
Adds a callback to the end-of-stream signal of the source. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from sdr::FIRFilter< Scalar, FIRLowPassCoeffs > | |
void | _process (const Buffer< Scalar > &in, const Buffer< Scalar > &out) |
performs the actual computation | |
Protected Member Functions inherited from sdr::Source | |
void | signalEOS () |
Signals the EOS. More... | |
void | propagateConfig (const Config &config) |
Propagates the given configuration to all connected sinks. More... | |
Protected Attributes inherited from sdr::FIRFilter< Scalar, FIRLowPassCoeffs > | |
bool | _enabled |
If true, the filtering is enabled. More... | |
size_t | _order |
The order of the filter. More... | |
double | _Fl |
The lower edge frequency. More... | |
double | _Fu |
The upper edge frequency. More... | |
double | _Fs |
Current sample rate. More... | |
std::vector< double > | _alpha |
The current filter coefficients. More... | |
Buffer< Scalar > | _ring |
A "ring-buffer" used to perform the filtering. More... | |
size_t | _ring_offset |
Offset of the "ring-buffer". More... | |
Buffer< Scalar > | _buffer |
The output buffer, unused if filtering is performed in-place. More... | |
Protected Attributes inherited from sdr::Source | |
Config | _config |
Holds the source configuration, this can be updated by calling setConfig . More... | |
std::map< SinkBase *, bool > | _sinks |
The connected sinks. More... | |
std::list< DelegateInterface * > | _eos |
The connected EOS singal handlers. More... | |
Low-pass FIR filter specialization.
|
inline |
Constructor.
|
inlinevirtual |
Destructor.
|
inline |
Returns the filter frequency.
|
inline |
Sets the filter frequency.