libsdr
0.1.0
A simple SDR library
|
Implements a Baudot decoder. More...
#include <baudot.hh>
Public Types | |
enum | Mode { LETTERS, FIGURES } |
Specifies the current code-tables. More... | |
enum | StopBits { STOP1, STOP15, STOP2 } |
Specifies the number of stop bits. More... | |
Public Member Functions | |
Baudot (StopBits stopBits=STOP15) | |
Constructor. More... | |
virtual void | config (const Config &src_cfg) |
Configures the node. More... | |
virtual void | process (const Buffer< uint8_t > &buffer, bool allow_overwrite) |
Processes the bit-stream. 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 | |
uint16_t | _bitstream |
The last bits received. More... | |
size_t | _bitcount |
The number of bits received. More... | |
Mode | _mode |
The currently selected table. More... | |
size_t | _bitsPerSymbol |
Specifies the number of half bits per symbol. More... | |
uint16_t | _pattern |
Specifies the frame pattern. More... | |
uint16_t | _mask |
Specifies the frame mask. More... | |
uint16_t | _stopHBits |
Number of half bits forming the stop bit. 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... | |
Static Protected Attributes | |
static char | _letter [32] |
Code table for letters. More... | |
static char | _figure [32] |
Code table for symbols or figure (i.e. 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... | |
Implements a Baudot decoder.
Inconjecture with the (A)FSK demodulator, it enables the reception of radio teletype (RTTY) messages.
Please note that a baudot encoded char is usually transmitted in a frame with one start bit and 1, 1.5 or 2 stop bits. Hence this node expects to receive two bits for one decoded bit in order to detect the 1.5 stop bits reliably.
I.e. to receive a 45.45 baud RTTY signal, the (A)FSK demodulator need to be configured for 90.90 baud (= 2*45.45 baud).
|
virtual |
Configures the node.
Implements sdr::SinkBase.
|
virtual |
Processes the bit-stream.
Implements sdr::Sink< uint8_t >.
|
protected |
The number of bits received.
|
protected |
Specifies the number of half bits per symbol.
|
protected |
The last bits received.
|
protected |
The output buffer.
|
staticprotected |
Code table for symbols or figure (i.e.
numbers).
|
staticprotected |
Code table for letters.
|
protected |
Specifies the frame mask.
|
protected |
The currently selected table.
|
protected |
Specifies the frame pattern.
|
protected |
Number of half bits forming the stop bit.