libsdr  0.1.0
A simple SDR library
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sdr::USBDemod< Scalar > Class Template Reference

SSB upper side band (USB) demodulator from an I/Q signal. More...

#include <demod.hh>

Inheritance diagram for sdr::USBDemod< Scalar >:
sdr::Sink< std::complex< Scalar > > sdr::Source sdr::SinkBase

Public Types

typedef std::complex< Scalar > CScalar
 The complex input scalar. More...
 
typedef Traits< Scalar >::SScalar SScalar
 The real compute scalar. More...
 

Public Member Functions

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

Protected Member Functions

void _process (const Buffer< std::complex< Scalar > > &in, const Buffer< Scalar > &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

Buffer< Scalar > _buffer
 The output buffer. 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 Scalar>
class sdr::USBDemod< Scalar >

SSB upper side band (USB) demodulator from an I/Q signal.

Member Typedef Documentation

template<class Scalar >
typedef std::complex<Scalar> sdr::USBDemod< Scalar >::CScalar

The complex input scalar.

template<class Scalar >
typedef Traits<Scalar>::SScalar sdr::USBDemod< Scalar >::SScalar

The real compute scalar.

Constructor & Destructor Documentation

template<class Scalar >
sdr::USBDemod< Scalar >::USBDemod ( )
inline

Constructor.

template<class Scalar >
virtual sdr::USBDemod< Scalar >::~USBDemod ( )
inlinevirtual

Destructor.

Member Function Documentation

template<class Scalar >
void sdr::USBDemod< Scalar >::_process ( const Buffer< std::complex< Scalar > > &  in,
const Buffer< Scalar > &  out 
)
inlineprotected

The actual demodulation.

template<class Scalar >
virtual void sdr::USBDemod< Scalar >::config ( const Config src_cfg)
inlinevirtual

Configures the USB demodulator.

Implements sdr::SinkBase.

template<class Scalar >
virtual void sdr::USBDemod< Scalar >::process ( const Buffer< CScalar > &  buffer,
bool  allow_overwrite 
)
inlinevirtual

Performs the demodulation.

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

Member Data Documentation

template<class Scalar >
Buffer<Scalar> sdr::USBDemod< Scalar >::_buffer
protected

The output buffer.


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