88 ret->registerThread(ret);
126 void setTXEna(
bool enable,
bool full_duplex)
override;
Thread class that provides the common radio functions for any compatible radio.
The Baseclass for all SoDa objects, and useful commonly used classes.
The Baseclass for all SoDa thread objects.
Concrete RadioControl for the ADALM-PLUTO SDR (AD9361 transceiver).
iio_context * ctx
IIO context (network, USB, or local)
double tx_lo_freq
last TX LO written to hardware (Hz)
PlutoCtrl(ParamsPtr params)
float setRFGain(float gain, SoDa::RXTX rxtx) override
set tain on the RX or TX side
void writeHWTXGain(double gain_db)
Write TX hardware gain (dB, range TX_GAIN_MIN..0) to IIO, clamping first.
iio_channel * tx_lo_chan
altvoltage1: TX PLL oscillator
iio_channel * tx_phy_chan
voltage0 (output direction): TX path config
std::string getHardwareDescription() override
report the model number and any other interesting features (like freq range) to be displayed on the U...
void setSampleRate(float rate, SoDa::RXTX rxtx) override
Set the RX or TX sample rate.
void writeHWRXGain(double gain_db)
Write RX hardware gain (dB, range 0..RX_GAIN_MAX) to IIO, clamping first.
iio_device * phy
ad9361-phy control device
double getLOFreq(SoDa::RXTX rxtx) override
Return the current LO (front end) oscillator setting for RX or TX chain.
std::vector< std::string > listAntennas(SoDa::RXTX rxtx) override
report the antennas that are available.
bool getTXEna() override
get the state of the TXEna bit
static constexpr double FREQ_MIN
Hz (software-extended lower limit)
static constexpr double FREQ_MAX
Hz (software-extended upper limit)
void setAntenna(const std::string &ant, SoDa::RXTX rxtx) override
Set the antenna choice.
static constexpr float PLUTO_SAMPLE_RATE
static constexpr double RX_GAIN_MAX
dB maximum RX hardware gain
iio_channel * rx_phy_chan
voltage0 (input direction): RX path config
std::string tx_antenna_name
bool isLOLocked(SoDa::RXTX rxtx) override
Methods that ALL radios must implement.
std::string hw_description
cached string for getHardwareDescription()
double rx_lo_freq
last RX LO written to hardware (Hz)
std::string rx_antenna_name
bool getTXRelayOn() override
get the state of the TX relay confirm bit
std::weak_ptr< PlutoCtrl > self
float tx_samp_rate_hw
TX sample rate read back from hardware.
void init() override
Set hardware sample rate before PlutoTX/PlutoRX create their DMA buffers.
float rx_samp_rate_hw
RX sample rate read back from hardware.
iio_channel * rx_lo_chan
altvoltage0: RX PLL oscillator
static PlutoCtrlPtr make(ParamsPtr params)
void setTXEna(bool enable, bool full_duplex) override
Enable or disable the transmit hardware chain, including the antenna relay and PA enable.
RadioControlPtr getSelfPtr() override
static constexpr double TX_GAIN_MIN
dB most-negative TX gain (= max atten)
float getSampleRate(SoDa::RXTX rxtx) override
Get the current setting for the sample rate.
double setLOFreq(double freq, SoDa::RXTX rxtx) override
std::string getAntenna(SoDa::RXTX rxtx) override
Get the current selected antenna.
Though libuhd is designed to be re-entrant, there are some indications that all control functions (se...
std::shared_ptr< RadioControl > RadioControlPtr
RXTX
We often need to distinguis between the RX and TX device.
std::shared_ptr< PlutoCtrl > PlutoCtrlPtr
std::shared_ptr< Params > ParamsPtr