libsdr  0.1.0
A simple SDR library
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
sdr::Config Class Reference

A collection of configuration information that is send by a source to all connected sinks to propergate and check the configuration of the processing network. More...

#include <node.hh>

Public Types

enum  Type {
  Type_UNDEFINED = 0, Type_u8, Type_s8, Type_u16,
  Type_s16, Type_f32, Type_f64, Type_cu8,
  Type_cs8, Type_cu16, Type_cs16, Type_cf32,
  Type_cf64
}
 The type IDs. More...
 

Public Member Functions

 Config ()
 Empty constructor, will result into an invalid configuration. More...
 
 Config (Type type, double sampleRate, size_t bufferSize, size_t numBuffers)
 Constructor. More...
 
 Config (const Config &other)
 Copy constructor. More...
 
const Configoperator= (const Config &other)
 Assignment operator. More...
 
bool operator== (const Config &other) const
 Coparison operator. More...
 
bool hasType () const
 If true, the configuration has a type. More...
 
Type type () const
 Returns the type. More...
 
void setType (Type type)
 Sets the type. More...
 
bool hasSampleRate () const
 If true, the configuration has a sample rate. More...
 
double sampleRate () const
 Returns the sample rate. More...
 
void setSampleRate (double rate)
 Sets the sample rate. More...
 
bool hasBufferSize () const
 If true, the configuration has a buffer size. More...
 
size_t bufferSize () const
 Returns the max. More...
 
void setBufferSize (size_t size)
 Sets the max. More...
 
bool hasNumBuffers () const
 If true, the configuration has a number of buffers. More...
 
size_t numBuffers () const
 Returns the max. More...
 
void setNumBuffers (size_t N)
 Sets the max. More...
 
template<>
Config::Type typeId ()
 Type-id for uint8. More...
 
template<>
Config::Type typeId ()
 Type-id for int8. More...
 
template<>
Config::Type typeId ()
 Type-id for uint16. More...
 
template<>
Config::Type typeId ()
 Type-id for int16. More...
 
template<>
Config::Type typeId ()
 Type-id for float. More...
 
template<>
Config::Type typeId ()
 Type-id for double. More...
 

Static Public Member Functions

template<typename T >
static Type typeId ()
 Returns the type-id of the template type. More...
 

Protected Attributes

Type _type
 Holds the type of the source. More...
 
double _sampleRate
 Holds the sample rate of the source. More...
 
size_t _bufferSize
 Holds the max. More...
 
size_t _numBuffers
 Holds the max. More...
 

Detailed Description

A collection of configuration information that is send by a source to all connected sinks to propergate and check the configuration of the processing network.

Member Enumeration Documentation

The type IDs.

Enumerator
Type_u8 

Real unsigned 8b ints.

Type_s8 

Real signed 8b ints.

Type_u16 

Real unsigned 16b ints.

Type_s16 

Real signed 16b ints.

Type_f32 

Real 32b floats aka. "float".

Type_f64 

Real 64b floats aka. "double".

Type_cu8 

Complex (aka I/Q) type of unsigned 8b ints.

Type_cs8 

Complex (aka I/Q) type of signed 8b ints.

Type_cu16 

Complex (aka I/Q) type of unsigned 16b ints.

Type_cs16 

Complex (aka I/Q) type of signed 16b ints.

Type_cf32 

Complex (aka I/Q) type of 32bit floats aka. std::complex<float>.

Type_cf64 

Complex (aka I/Q) type of 64bit floats aka. std::complex<double>.

Constructor & Destructor Documentation

Config::Config ( )

Empty constructor, will result into an invalid configuration.

Config::Config ( Type  type,
double  sampleRate,
size_t  bufferSize,
size_t  numBuffers 
)

Constructor.

Config::Config ( const Config other)

Copy constructor.

Member Function Documentation

size_t sdr::Config::bufferSize ( ) const
inline

Returns the max.

buffer size.

bool sdr::Config::hasBufferSize ( ) const
inline

If true, the configuration has a buffer size.

bool sdr::Config::hasNumBuffers ( ) const
inline

If true, the configuration has a number of buffers.

bool sdr::Config::hasSampleRate ( ) const
inline

If true, the configuration has a sample rate.

bool sdr::Config::hasType ( ) const
inline

If true, the configuration has a type.

size_t sdr::Config::numBuffers ( ) const
inline

Returns the max.

number of buffers.

const Config & Config::operator= ( const Config other)

Assignment operator.

bool Config::operator== ( const Config other) const

Coparison operator.

double sdr::Config::sampleRate ( ) const
inline

Returns the sample rate.

void sdr::Config::setBufferSize ( size_t  size)
inline

Sets the max.

buffer size.

void sdr::Config::setNumBuffers ( size_t  N)
inline

Sets the max.

number of buffers.

void sdr::Config::setSampleRate ( double  rate)
inline

Sets the sample rate.

void sdr::Config::setType ( Type  type)
inline

Sets the type.

Type sdr::Config::type ( ) const
inline

Returns the type.

template<typename T >
static Type sdr::Config::typeId ( )
inlinestatic

Returns the type-id of the template type.

template<>
Config::Type sdr::Config::typeId ( )
inline

Type-id for uint8.

template<>
Config::Type sdr::Config::typeId ( )
inline

Type-id for int8.

template<>
Config::Type sdr::Config::typeId ( )
inline

Type-id for uint16.

template<>
Config::Type sdr::Config::typeId ( )
inline

Type-id for int16.

template<>
Config::Type sdr::Config::typeId ( )
inline

Type-id for float.

template<>
Config::Type sdr::Config::typeId ( )
inline

Type-id for double.

Member Data Documentation

size_t sdr::Config::_bufferSize
protected

Holds the max.

buffer size of the source.

size_t sdr::Config::_numBuffers
protected

Holds the max.

number of buffers of the source.

double sdr::Config::_sampleRate
protected

Holds the sample rate of the source.

Type sdr::Config::_type
protected

Holds the type of the source.


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