|
libsdr
0.1.0
A simple SDR library
|
This class performs some automatic casts to a certain buffer type (if possible) specified by the template argument. More...
#include <autocast.hh>
Public Member Functions | |
| AutoCast () | |
| Constructor. More... | |
| virtual void | config (const Config &src_cfg) |
| Configures the auto cast node. More... | |
| virtual void | handleBuffer (const RawBuffer &buffer, bool allow_overwrite) |
| Needs to be implemented by any sub-type to process the received data. 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... | |
Static Protected Member Functions | |
| static size_t | _identity (const RawBuffer &in, const RawBuffer &out) |
| Performs no cast at all. More... | |
| static size_t | _uint8_int8 (const RawBuffer &in, const RawBuffer &out) |
| uint8_t -> int8_t | |
| static size_t | _uint16_int8 (const RawBuffer &in, const RawBuffer &out) |
| uint16 -> int8 | |
| static size_t | _int16_int8 (const RawBuffer &in, const RawBuffer &out) |
| int16 -> int8 | |
| static size_t | _uint8_cint8 (const RawBuffer &in, const RawBuffer &out) |
| uint8 -> complex int8. More... | |
| static size_t | _int8_cint8 (const RawBuffer &in, const RawBuffer &out) |
| int8 -> complex int8. More... | |
| static size_t | _uint16_cint8 (const RawBuffer &in, const RawBuffer &out) |
| uint16 -> complex int 8. More... | |
| static size_t | _int16_cint8 (const RawBuffer &in, const RawBuffer &out) |
| int16 -> complex int 8. More... | |
| static size_t | _uint8_int16 (const RawBuffer &in, const RawBuffer &out) |
| uint8 -> int16. More... | |
| static size_t | _int8_int16 (const RawBuffer &in, const RawBuffer &out) |
| int8 -> int16. More... | |
| static size_t | _uint16_int16 (const RawBuffer &in, const RawBuffer &out) |
| uint16 -> int16. More... | |
| static size_t | _uint8_cint16 (const RawBuffer &in, const RawBuffer &out) |
| unsinged int8 -> complex int16. More... | |
| static size_t | _int8_cint16 (const RawBuffer &in, const RawBuffer &out) |
| int8 -> complex int16. More... | |
| static size_t | _uint16_cint16 (const RawBuffer &in, const RawBuffer &out) |
| uint16 -> complex int16. More... | |
| static size_t | _int16_cint16 (const RawBuffer &in, const RawBuffer &out) |
| int16 -> complex int16. More... | |
Protected Attributes | |
| Buffer< Scalar > | _buffer |
| Output buffer. More... | |
| size_t(* | _cast )(const RawBuffer &in, const RawBuffer &out) |
| Cast function. 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... | |
This class performs some automatic casts to a certain buffer type (if possible) specified by the template argument.
Currently only integer casts are supported.
|
inline |
Constructor.
|
inlinestaticprotected |
Performs no cast at all.
|
inlinestaticprotected |
int16 -> complex int16.
|
inlinestaticprotected |
int16 -> complex int 8.
|
inlinestaticprotected |
int8 -> complex int16.
|
inlinestaticprotected |
int8 -> complex int8.
|
inlinestaticprotected |
int8 -> int16.
|
inlinestaticprotected |
uint16 -> complex int16.
|
inlinestaticprotected |
uint16 -> complex int 8.
|
inlinestaticprotected |
uint16 -> int16.
|
inlinestaticprotected |
unsinged int8 -> complex int16.
|
inlinestaticprotected |
uint8 -> complex int8.
|
inlinestaticprotected |
uint8 -> int16.
|
inlinevirtual |
Configures the auto cast node.
Implements sdr::SinkBase.
|
inlinevirtual |
Needs to be implemented by any sub-type to process the received data.
Implements sdr::SinkBase.
|
protected |
Output buffer.
|
protected |
Cast function.
1.8.9.1