libsdr
0.1.0
A simple SDR library
|
A performant implementation of a frequency-shift operation on integer signals. More...
#include <freqshift.hh>
Public Types | |
typedef std::complex< Scalar > | CScalar |
The complex input signal. More... | |
typedef Traits< Scalar >::SScalar | SScalar |
The compute (super) scalar of the input type. More... | |
typedef std::complex< SScalar > | CSScalar |
The complex compute (super) scalar of the input type. More... | |
Public Member Functions | |
FreqShiftBase (double F, double Fs) | |
Constructor. More... | |
virtual | ~FreqShiftBase () |
Destructor. More... | |
double | sampleRate () const |
Returns the sample rate. More... | |
virtual void | setSampleRate (double Fs) |
Sets the sample rate and updates the LUT. More... | |
double | frequencyShift () const |
Returns the frequency shift. More... | |
virtual void | setFrequencyShift (double F) |
Sets the frequency shift and updates the LUT. More... | |
CSScalar | applyFrequencyShift (CSScalar value) |
Performs the frequency shift on a single sample. More... | |
Protected Member Functions | |
void | _update_lut_incr () |
Updates the multiplier LUT. More... | |
Protected Attributes | |
double | _freq_shift |
The current frequency shift. More... | |
double | _Fs |
The current sample rate. More... | |
size_t | _lut_inc |
The LUT increment. More... | |
size_t | _lut_count |
The LUT index counter. More... | |
Buffer< CSScalar > | _lut |
The LUT. More... | |
Static Protected Attributes | |
static const size_t | _lut_size = 128 |
The size of the LUT. More... | |
A performant implementation of a frequency-shift operation on integer signals.
typedef std::complex<Scalar> sdr::FreqShiftBase< Scalar >::CScalar |
The complex input signal.
typedef std::complex<SScalar> sdr::FreqShiftBase< Scalar >::CSScalar |
The complex compute (super) scalar of the input type.
typedef Traits<Scalar>::SScalar sdr::FreqShiftBase< Scalar >::SScalar |
The compute (super) scalar of the input type.
|
inline |
Constructor.
|
inlinevirtual |
Destructor.
|
inlineprotected |
Updates the multiplier LUT.
|
inline |
Performs the frequency shift on a single sample.
|
inline |
Returns the frequency shift.
|
inline |
Returns the sample rate.
|
inlinevirtual |
Sets the frequency shift and updates the LUT.
|
inlinevirtual |
Sets the sample rate and updates the LUT.
Reimplemented in sdr::BaseBand< Scalar >.
|
protected |
The current frequency shift.
|
protected |
The current sample rate.
|
protected |
The LUT.
|
protected |
The LUT index counter.
|
protected |
The LUT increment.
|
staticprotected |
The size of the LUT.