51#include <SoDa/MailBox.hxx>
The Baseclass for all SoDa objects, and useful commonly used classes.
The Baseclass for all SoDa thread objects.
RxTxState
Transmit/Receive state changes go through stages.
ClockSource
some radios support two sources for the master oscillator reference.
Though libuhd is designed to be re-entrant, there are some indications that all control functions (se...
double cur_rx_if_freq
difference between rx
double tvrt_lo_gain
output power for the second transmit channel (used for transverter LO)
virtual void setSampleRate(float rate, SoDa::RXTX rxtx)=0
Set the RX or TX sample rate.
double tvrt_lo_fe_freq
the frequency of the second transmit channel front-end oscillator
double rx_rf_gain
rf gain for RX front end amp/attenuator
virtual double getLOFreq(SoDa::RXTX rxtx)=0
Return the current LO (front end) oscillator setting for RX or TX chain.
virtual bool setClockSource(Command::ClockSource src)
Some radios support multiple choices for the main reference clock source.
void auxRun()
Methods that a radio MAY implement (see above)
double tx_samp_rate
sample rate to TX chain.
virtual bool getTXRelayOn()=0
get the state of the TX relay confirm bit
virtual RadioControlPtr getSelfPtr()=0
virtual double setLOFreq(double freq, SoDa::RXTX rxtx)=0
double getTime()
get the number of seconds since the "Epoch"
virtual float setRFGain(float gain, SoDa::RXTX rxtx)=0
set tain on the RX or TX side
void execRepCommand(CommandPtr cmd) final
Parse an incoming REPort command and dispatch.
void setTXRXMode(Command::RxTxState rxtxst, bool full_duplex)
Initiate the actions that will turn on the transmitter and (optionally) disable the receiver.
virtual std::string getHardwareDescription()=0
report the model number and any other interesting features (like freq range) to be displayed on the U...
double cur_rx_lo_freq
The current receiver LO frequency.
double tx_rf_gain
rf gain for final TX amp
double findGoodRXLO(double freq, double cur_lo_freq)
see setFreq - this is a helper to find a good LO frequency that puts the IF in a range that is conven...
std::string tx_ant
TX antenna choice (usually has to be TX or TX/RX1?
void run() final
start the thread
void subExecSetCommand(CommandPtr cmd)
void subscribeToMailBoxes(const std::vector< MailBoxBasePtr > &mailboxes)
implement the subscription method
virtual Command::ClockSource getClockSource()
Some radios support multiple choices for the main reference clock source.
static const double tx_freq_rxmode_offset
tx offset when in RX mode
bool tvrt_lo_mode
if true, set the transmit frequency, with some knowledge of the tvrt LO.
CmdMBoxPtr cmd_stream
command stream channel
bool tx_on
if true, we are transmitting.
virtual void setTXEna(bool tx_on, bool full_duplex)=0
Enable or disable the transmit hardware chain, including the antenna relay and PA enable.
virtual std::string getAntenna(SoDa::RXTX rxtx)=0
Get the current selected antenna.
void subExecGetCommand(CommandPtr cmd)
void execSetCommand(CommandPtr cmd) final
Parse an incoming SET command and dispatch.
virtual bool getTXEna()=0
get the state of the TXEna bit
double cur_tx_lo_freq
The current requested transmitter LO frequency.
virtual bool isLOLocked(SoDa::RXTX rxtx)=0
Methods that ALL radios must implement.
void setFreq(double freq, SoDa::RXTX rxtx)
Set the recieve or transmit frequency to 'freq' This includes setting the PLL front end synthesizer,...
RadioControl(ParamsPtr params, const std::string &name)
Constructor Build a RadioControl thread.
CmdMBox::Subscription cmd_subs
subscriber ID for this thread's connection to the command channel
double tvrt_lo_freq
the frequency of the second transmit channel oscillator
virtual float getSampleRate(SoDa::RXTX rxtx)=0
Get the current setting for the sample rate.
virtual std::vector< std::string > listAntennas(SoDa::RXTX rxtx)=0
report the antennas that are available.
virtual void execGetCommand(CommandPtr cmd) final
Parse an incoming GET command and dispatch.
bool isLocked(SoDa::RXTX rxtx)
checked state of front-end LO and back-end IF chain NCO.
virtual void execCommand(CommandPtr cmd) final
Parse an incoming command and dispatch.
virtual void init()
perform initialization.
bool tvrt_lo_capable
if true, this unit can implement a local transverter oscillator.
double cur_tx_if_freq
the TX LO frequency reported by the RadioTX front end.
std::string motherboard_name
The model name of the radio.
void subExecRepCommand(CommandPtr cmd)
bool debug_mode
print stuff when we are in debug mode
virtual void reportAntennas() final
write all antenna names to the report message channel Get these from the listAntennas call.
virtual void setAntenna(const std::string &ant, SoDa::RXTX rxtx)=0
Set the antenna choice.
double first_gettime
timestamps are relative to the first timestamp.
The Thread baseclass for all SoDa thread objects.
std::shared_ptr< RadioControl > RadioControlPtr
RXTX
We often need to distinguis between the RX and TX device.
std::shared_ptr< Params > ParamsPtr
std::shared_ptr< Command > CommandPtr
std::shared_ptr< CmdMBox > CmdMBoxPtr