sdr::IQBalance< Scalar > Class Template Reference
Filter and signal processing nodes.

A simple node, that allows to balance an IQ signal. More...

`#include <utils.hh>`

Inheritance diagram for sdr::IQBalance< Scalar >:

## Public Types

typedef Traits< Scalar >::SScalar | SScalar
| The internal used compute scalar. More...

## Public Member Functions

| IQBalance (double balance=0.0)
| Constructor. More...
virtual | ~IQBalance ()
| Destructor. More...
double | balance () const
| Retunrs the balance. More...
void | setBalance (double balance)
| Sets the I/Q balance. More...
virtual void | config (const Config &src_cfg)
| Configures the node. More...
virtual void | process (const Buffer< std::complex< Scalar > > &buffer, bool allow_overwrite)
| Processes a buffer. 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< std::complex< Scalar > > &out)
| The actual implementation. 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

int32_t | _realFact
| Scaleing factor for the real part. More...
int32_t | _imagFact
| Scaleing factor for the imaginary part. More...
Buffer< std::complex< Scalar > > | _buffer
| The working 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::IQBalance< Scalar >

A simple node, that allows to balance an IQ signal.

## Member Typedef Documentation

template<class Scalar >

typedef Traits<Scalar>::SScalar sdr::IQBalance< Scalar >::SScalar

The internal used compute scalar.

## Constructor & Destructor Documentation

template<class Scalar >

sdr::IQBalance< Scalar >::IQBalance | ( | double | balance = `0.0` | ) |

inline

Constructor.

Parameters

  balance | Specifies the balance between the I and Q chanel. If `balance` = 1, only the I chanel remains, on `balance` = -1 only the Q chanel remains and on `balance` = 0 both chanels are balanced equally.

template<class Scalar >

virtual sdr::IQBalance< Scalar >::~IQBalance | ( |  | ) |

inlinevirtual

Destructor.

## Member Function Documentation

template<class Scalar >

void sdr::IQBalance< Scalar >::_process | ( | const Buffer< std::complex< Scalar > > & | in,
|  | const Buffer< std::complex< Scalar > > & | out
| ) |  |

inlineprotected

The actual implementation.

template<class Scalar >

double sdr::IQBalance< Scalar >::balance | ( |  | ) | const

inline

Retunrs the balance.

template<class Scalar >

virtual void sdr::IQBalance< Scalar >::config | ( | const Config & | src_cfg | ) |

inlinevirtual

Configures the node.

Implements sdr::SinkBase.

template<class Scalar >

virtual void sdr::IQBalance< Scalar >::process | ( | const Buffer< std::complex< Scalar > > & | buffer,
|  | bool | allow_overwrite
| ) |  |

inlinevirtual

Processes a buffer.

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

template<class Scalar >

void sdr::IQBalance< Scalar >::setBalance | ( | double | balance | ) |

inline

Sets the I/Q balance.

## Member Data Documentation

template<class Scalar >

Buffer< std::complex<Scalar> > sdr::IQBalance< Scalar >::_buffer

protected

The working buffer.

template<class Scalar >

int32_t sdr::IQBalance< Scalar >::_imagFact

protected

Scaleing factor for the imaginary part.

template<class Scalar >

int32_t sdr::IQBalance< Scalar >::_realFact

protected

Scaleing factor for the real part.

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

- /Users/hannes/Uni/Elektronik/sdr/libsdr/src/utils.hh