sdr::FMDemod< iScalar, oScalar > Class Template Reference
Demodulator nodes.

Demodulates FM from an I/Q signal. More...

`#include <demod.hh>`

Inheritance diagram for sdr::FMDemod< iScalar, oScalar >:

## Public Types

typedef Traits< iScalar >::SScalar | SScalar
| The super scalar. More...

## Public Member Functions

| FMDemod ()
| Constructor. More...
virtual | ~FMDemod ()
| Destructor. More...
virtual void | config (const Config &src_cfg)
| Configures the FM demodulator. More...
virtual void | process (const Buffer< std::complex< iScalar > > &buffer, bool allow_overwrite)
| Performs the FM demodulation. More...
Public Member Functions inherited from sdr::Sink< std::complex< iScalar > >
| 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...

## Protected Member Functions

void | _process (const Buffer< std::complex< iScalar > > &in, const Buffer< oScalar > &out)
| The actual demodulation. More...
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

int | _shift
| Output rescaling. More...
std::complex< iScalar > | _last_value
| The last input value. More...
bool | _can_overwrite
| If true, in-place demodulation is poissible. More...
Buffer< oScalar > | _buffer
| The output buffer, unused if demodulation 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...

## Detailed Description

### template<class iScalar, class oScalar = iScalar>
class sdr::FMDemod< iScalar, oScalar >

Demodulates FM from an I/Q signal.

This node only implements the demodulation of the signal, the needed post-filtering (deemphasize) is implemented in a separate node, `sdr::FMDeemph`.

## Member Typedef Documentation

template<class iScalar , class oScalar = iScalar>

typedef Traits<iScalar>::SScalar sdr::FMDemod< iScalar, oScalar >::SScalar

The super scalar.

## Constructor & Destructor Documentation

template<class iScalar , class oScalar = iScalar>

sdr::FMDemod< iScalar, oScalar >::FMDemod | ( |  | ) |

inline

Constructor.

template<class iScalar , class oScalar = iScalar>

virtual sdr::FMDemod< iScalar, oScalar >::~FMDemod | ( |  | ) |

inlinevirtual

Destructor.

## Member Function Documentation

template<class iScalar , class oScalar = iScalar>

void sdr::FMDemod< iScalar, oScalar >::_process | ( | const Buffer< std::complex< iScalar > > & | in,
|  | const Buffer< oScalar > & | out
| ) |  |

inlineprotected

The actual demodulation.

template<class iScalar , class oScalar = iScalar>

virtual void sdr::FMDemod< iScalar, oScalar >::config | ( | const Config & | src_cfg | ) |

inlinevirtual

Configures the FM demodulator.

Implements sdr::SinkBase.

template<class iScalar , class oScalar = iScalar>

virtual void sdr::FMDemod< iScalar, oScalar >::process | ( | const Buffer< std::complex< iScalar > > & | buffer,
|  | bool | allow_overwrite
| ) |  |

inlinevirtual

Performs the FM demodulation.

Implements sdr::Sink< std::complex< iScalar > >.

## Member Data Documentation

template<class iScalar , class oScalar = iScalar>

Buffer<oScalar> sdr::FMDemod< iScalar, oScalar >::_buffer

protected

The output buffer, unused if demodulation is performed in-place.

template<class iScalar , class oScalar = iScalar>

bool sdr::FMDemod< iScalar, oScalar >::_can_overwrite

protected

If true, in-place demodulation is poissible.

template<class iScalar , class oScalar = iScalar>

std::complex<iScalar> sdr::FMDemod< iScalar, oScalar >::_last_value

protected

The last input value.

template<class iScalar , class oScalar = iScalar>

int sdr::FMDemod< iScalar, oScalar >::_shift

protected

Output rescaling.

The documentation for this class was generated from the following file:

- /Users/hannes/Uni/Elektronik/sdr/libsdr/src/demod.hh