38#include <SoDa/ReSampler.hxx>
41#include <uhd/usrp/multi_usrp.hpp>
42#include <uhd/stream.hpp>
44#include <SoDa/MailBox.hxx>
69 auto ret = std::shared_ptr<USRPRX>(
new USRPRX(
params, _usrp));
71 ret->registerThread(ret);
141 uhd::usrp::multi_usrp::sptr
usrp;
173 std::vector<std::complex<float>>
hw_cf;
175 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.
The Baseclass for all SoDa thread objects.
ModulationType
modulation selector targets take one of these values
sin/cos oscillator to drive TX signal chain
bool downConvert()
A receiver must accept input data from the rx_stream and beat it against its NCO to produce output on...
std::ofstream rf_dumpfile
std::vector< std::complex< float > > rs_out
decimated output at 625 kS/s
uhd::usrp::multi_usrp::sptr usrp
bool enable_spectrum_report
static USRPRXPtr make(ParamsPtr params, uhd::usrp::multi_usrp::sptr _usrp)
void actualStartStream()
The USRP never stops the RX streamer once it starts.
unsigned int hw_buf_size
samples per recv at hw rate
QuadratureOscillator IF_osc
SoDa::ReSamplerPtr hw_resampler
std::weak_ptr< USRPRX > self
bool audio_rx_stream_enabled
void setNCOFreq(double freq)
Set the last LO (convert to baseband) frequency for the NCO.
void enableIFStreamer(bool enable)
Enable IF streamer - This passes the incoming RF sample buffer onto the IF stream where it can be con...
std::vector< std::complex< float > > accu
accumulator → rf_buf_size chunks
uhd::rx_streamer::sptr rx_bits
std::ofstream if_dumpfile
SoDa::Command::ModulationType rx_modulation
unsigned int rx_buffer_size
unsigned int rf_buf_size
publish chunk (30000 samples at 625 kS/s)
unsigned int rs_out_size
resampler output block size
USRPRX(ParamsPtr params, uhd::usrp::multi_usrp::sptr usrp)
The constructor.
void startStream()
flush the input rx data stream and set the stream_processing flag to on.
bool streamEnabled()
test the processing stream flag
void stopStream()
we never stop a USRP stream until the radio shuts down
std::vector< std::complex< float > > hw_cf
raw samples at hw rate
void doMixer(SoDa::CBufPtr inout)
implement a complex down converter with complex multiplication
void closeStream()
stop and close down the USRP input stream
std::shared_ptr< Params > ParamsPtr
std::shared_ptr< USRPRX > USRPRXPtr
std::shared_ptr< CBuf > CBufPtr