|
libsdr
0.1.0
A simple SDR library
|
Decodes a bitstream with the desired baud rate. More...
#include <fsk.hh>
Public Types | |
| enum | Mode { NORMAL, TRANSITION } |
| Possible bit decoding modes. More... | |
Public Member Functions | |
| BitStream (float baud, Mode mode=TRANSITION) | |
| 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< uint8_t > &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< uint8_t > | |
| 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 | |
| float | _baud |
| The baud rate. More... | |
| Mode | _mode |
| The bit detection mode. More... | |
| size_t | _corrLen |
| The approximative bit length in samples. More... | |
| Buffer< int8_t > | _symbols |
| Last received symbols. More... | |
| size_t | _symIdx |
| Insertion index for the next symbol. More... | |
| int32_t | _symSum |
| Sum over all received symbol (encoded as -1 & 1). More... | |
| int32_t | _lastSymSum |
| Last sum over all received symbol (encoded as -1 & 1). More... | |
| float | _phase |
| Current bit "phase". More... | |
| float | _omega |
| Phase velocity. More... | |
| float | _omegaMin |
| Minimum phase velocity. More... | |
| float | _omegaMax |
| Maximum phase velocity. More... | |
| float | _pllGain |
| PLL gain. More... | |
| uint8_t | _lastBits |
| The last decoded bits (needed for transition mode). More... | |
| Buffer< uint8_t > | _buffer |
| 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... | |
Decodes a bitstream with the desired baud rate.
This node implements a simple PLL to syncronize the bit sampling with the transitions of the input symbol sequence.
| enum sdr::BitStream::Mode |
| BitStream::BitStream | ( | float | baud, |
| Mode | mode = TRANSITION |
||
| ) |
Constructor.
| baud | Specifies the baud-rate of the input signal. |
| mode | Specifies the bit detection mode. |
|
virtual |
Needs to be implemented by any sub-type to check and perform the configuration of the node.
Implements sdr::SinkBase.
|
virtual |
Needs to be implemented by any sub-type to process the received data.
Implements sdr::Sink< uint8_t >.
|
protected |
The baud rate.
|
protected |
Output buffer.
|
protected |
The approximative bit length in samples.
|
protected |
The last decoded bits (needed for transition mode).
|
protected |
Last sum over all received symbol (encoded as -1 & 1).
|
protected |
The bit detection mode.
|
protected |
Phase velocity.
|
protected |
Maximum phase velocity.
|
protected |
Minimum phase velocity.
|
protected |
Current bit "phase".
|
protected |
PLL gain.
|
protected |
Last received symbols.
|
protected |
Insertion index for the next symbol.
|
protected |
Sum over all received symbol (encoded as -1 & 1).
1.8.9.1