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

Rather trivial node to detect mark/space symbols by the amplitude. More...

#include <fsk.hh>

Inheritance diagram for sdr::ASKDetector< Scalar >:
sdr::Sink< Scalar > sdr::Source sdr::SinkBase

Public Member Functions

 ASKDetector (bool invert=false)
 Constructor. More...
 
void config (const Config &src_cfg)
 Needs to be implemented by any sub-type to check and perform the configuration of the node. More...
 
void process (const Buffer< Scalar > &buffer, bool allow_overwrite)
 Needs to be implemented by any sub-type to process the received data. 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...
 

Protected Attributes

bool _invert
 If true the symbol logic is inverted. More...
 
Buffer< uint8_t > _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...
 

Additional Inherited Members

- 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...
 

Detailed Description

template<class Scalar>
class sdr::ASKDetector< Scalar >

Rather trivial node to detect mark/space symbols by the amplitude.

For low baud rates (i.e. <= 1200 baud) a FSK signal can be "demodulated" using a simple FM demodulator. The result will be a series of decaying exponentials. Hence the mark/space symbols can be determined by the means of the input amplitude (positive/negative).

This node implements such a simple symbol detection by the means of the amplitude. The node returns a sequence of symbols (sub-bits) that need to be processed to obtain the sequence of received bits (i.e. BitStream).

Constructor & Destructor Documentation

template<class Scalar >
sdr::ASKDetector< Scalar >::ASKDetector ( bool  invert = false)
inline

Constructor.

Member Function Documentation

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

Needs to be implemented by any sub-type to check and perform the configuration of the node.

Implements sdr::SinkBase.

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

Needs to be implemented by any sub-type to process the received data.

Implements sdr::Sink< Scalar >.

Member Data Documentation

template<class Scalar >
Buffer<uint8_t> sdr::ASKDetector< Scalar >::_buffer
protected

The output buffer.

template<class Scalar >
bool sdr::ASKDetector< Scalar >::_invert
protected

If true the symbol logic is inverted.


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