67 ret->registerThread(ret);
99 static constexpr float HW_RATE = 2048000.0f;
109 std::weak_ptr<RTLSDRCtrl>
self;
Shared RAII wrapper for an rtlsdr_dev_t handle.
Thread class that provides the common radio functions for any compatible radio.
RTLSDRCtrl(RTLSDRDevPtr dev_in, ParamsPtr params)
float setRFGain(float gain, SoDa::RXTX rxtx) override
set tain on the RX or TX side
double setLOFreq(double freq, SoDa::RXTX rxtx) override
static constexpr float HW_RATE
RTL2832U actual USB delivery rate (2.048 MSPS)
std::vector< std::string > listAntennas(SoDa::RXTX rxtx) override
report the antennas that are available.
RadioControlPtr getSelfPtr() override
void setAntenna(const std::string &ant, SoDa::RXTX rxtx) override
Set the antenna choice.
static RTLSDRCtrlPtr make(RTLSDRDevPtr dev_in, ParamsPtr params)
bool getTXEna() override
get the state of the TXEna bit
std::vector< int > gain_steps
valid tuner gains in tenths of dB
double getLOFreq(SoDa::RXTX rxtx) override
Return the current LO (front end) oscillator setting for RX or TX chain.
std::string getAntenna(SoDa::RXTX rxtx) override
Get the current selected antenna.
void setSampleRate(float rate, SoDa::RXTX rxtx) override
Set the RX or TX sample rate.
std::string getHardwareDescription() override
report the model number and any other interesting features (like freq range) to be displayed on the U...
bool isLOLocked(SoDa::RXTX rxtx) override
Methods that ALL radios must implement.
void setTXEna(bool, bool) override
Enable or disable the transmit hardware chain, including the antenna relay and PA enable.
int sodaGainToRTL(float soda_gain) const
Map SoDaRadio gain (-30..0 dB) to the nearest discrete RTL gain step.
std::weak_ptr< RTLSDRCtrl > self
double rx_lo_freq
last RX center frequency written (Hz)
std::string hw_description
float rx_sample_rate
current sample rate (Hz)
float getSampleRate(SoDa::RXTX rxtx) override
Get the current setting for the sample rate.
bool getTXRelayOn() override
get the state of the TX relay confirm bit
RadioControl(ParamsPtr params, const std::string &name)
Constructor Build a RadioControl thread.
std::shared_ptr< RadioControl > RadioControlPtr
RXTX
We often need to distinguis between the RX and TX device.
std::shared_ptr< RTLSDRDev > RTLSDRDevPtr
std::shared_ptr< Params > ParamsPtr
std::shared_ptr< RTLSDRCtrl > RTLSDRCtrlPtr