56#include <SoDa/ReSampler.hxx>
76 ret->registerThread(ret);
105 void doMixer(std::vector<std::complex<float>> & buf);
125 std::vector<std::complex<float>>
hw_cf;
127 std::vector<std::complex<float>>
accu;
Thread class that provides the common IF receive functions for any supported radio (USRP/Adalm/Pluto/...
The Baseclass for all SoDa objects, and useful commonly used classes.
void enableIFStreamer(bool enable) override
Control whether raw RF samples are forwarded to the IF stream.
static PlutoRXPtr make(ParamsPtr params)
void stopStream() override
Disarm the streaming flag; IIO DMA continues draining silently.
bool if_streaming_enabled
true → push raw RF copies to if_stream
iio_device * dev
cf-ad9361-lpc
QuadratureOscillator IF_osc
void doMixer(std::vector< std::complex< float > > &buf)
iio_channel * rx_i_chan
voltage0 (input) — I component
unsigned int hw_buf_size
IIO buffer size in samples (at 2.5 MSPS)
void setNCOFreq(double freq) override
Update the IF NCO frequency used by the complex mixer.
bool downConvert() override
Refill the IIO buffer (2.5 MSPS), resample to 625 kSPS, mix, and publish 30000-sample CBufs to rx_str...
std::vector< std::complex< float > > hw_cf
SC16→float conversion (hw_buf_size)
std::vector< std::complex< float > > rs_out
resampler output (rs_out_size)
std::weak_ptr< PlutoRX > self
double rx_sample_rate
625 kSPS — used for IF NCO phase increment
unsigned int rs_out_size
hw_resampler output size (at 625 kSPS)
unsigned int rf_buf_size
publish chunk size for BaseBandRX (30000)
iio_channel * rx_q_chan
voltage1 (input) — Q component
std::vector< std::complex< float > > accu
accumulator for 30000-sample publish
void startStream() override
Arm the streaming flag so downConvert() publishes samples.
SoDa::ReSamplerPtr hw_resampler
2.5 MSPS → 625 kSPS
PlutoRX(ParamsPtr params)
bool streamEnabled() override
test the processing stream flag
bool streaming
true after startStream(); samples published
sin/cos oscillator to drive TX signal chain
RadioRX(ParamsPtr params)
Constructor Build a RadioRX thread.
std::shared_ptr< PlutoRX > PlutoRXPtr
std::shared_ptr< Params > ParamsPtr