SoDaRadio-5.0.3-master:8901fb5
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
SoDa::USRPCtrl Class Reference

Though libuhd is designed to be re-entrant, there are some indications that all control functions (set_freq, gain, and other operations) should originate from a single thread. More...

#include <USRPCtrl.hxx>

Inheritance diagram for SoDa::USRPCtrl:
SoDa::SoDaThread SoDa::SoDaBase SoDa::Debug

Public Member Functions

 USRPCtrl (Params *params, CmdMBox *_cmd_stream)
 Constructor Build a USRPCtrl thread. More...
 
void run ()
 start the thread More...
 
uhd::usrp::multi_usrp::sptr getUSRP ()
 return a pointer to the multi_usrp object – used by RX and TX processes to find the associated USRP widget. More...
 
- Public Member Functions inherited from SoDa::SoDaThread
 SoDaThread (const std::string &oname)
 
void start ()
 Execute the threads run loop. More...
 
void join ()
 more properly "Wait for this thread to exit its run loop". More...
 
bool waitForJoin (unsigned int m)
 wait for the thread to stop running, or the specified time to pass. More...
 
void execCommand (Command *cmd)
 Execute (dispatch) a message removed from the command stream to one of the basic Command handler functions. More...
 
- Public Member Functions inherited from SoDa::SoDaBase
 SoDaBase (const std::string &oname)
 The constructor – pass a name for the object. More...
 
std::string & getObjName ()
 get the name of this object More...
 
SoDaBasefindSoDaObject (const std::string &oname)
 find a SoDa Object by name. More...
 
double getTime ()
 Get a time stamp in nS resolution that monotonically increases and that is very inexpensive (typically < 100nS). More...
 
- Public Member Functions inherited from SoDa::Debug
 Debug (std::string _unit_name=std::string("UNKNOWN"))
 
 Debug (const char *_unit_name_cstr)
 
 Debug (unsigned int _debug_level, std::string _unit_name=std::string("UNKNOWN"))
 
 Debug (unsigned int _debug_level, const char *_unit_name_cstr)
 
void debugMsg (const std::string &msg, unsigned int threshold=1)
 
void debugMsg (const boost::format &fmt, unsigned int threshold=1)
 
void debugMsg (const char *msg, unsigned int threshold=1)
 
void setDebugLevel (unsigned int v)
 
unsigned int getDebugLevel ()
 

Static Public Member Functions

static void normal_message_handler (uhd::msg::type_t type, const std::string &msg)
 This is the more permanent message handler... More...
 
- Static Public Member Functions inherited from SoDa::Debug
static void setDefaultLevel (unsigned int v)
 
static unsigned int getDefaultLevel ()
 
static void setGlobalLevel (unsigned int v)
 
static unsigned int getGlobalLevel ()
 

Static Public Attributes

static SoDa::USRPCtrlsingleton_ctrl_obj = NULL
 This is a singleton object – the last (and only, we hope) such object to be created sets a static pointer to itself. More...
 
- Static Public Attributes inherited from SoDa::Debug
static boost::mutex debug_msg_mutex
 

Private Member Functions

void execCommand (Command *cmd)
 Parse an incoming command and dispatch. More...
 
void execGetCommand (Command *cmd)
 Dispatch an incoming GET command. More...
 
void execSetCommand (Command *cmd)
 Dispatch an incoming SET command. More...
 
void execRepCommand (Command *cmd)
 Dispatch an incoming REPort command. More...
 
double getTime ()
 get the number of seconds since the "Epoch" More...
 
uhd::tune_result_t checkLock (uhd::tune_request_t &req, char sel, uhd::tune_result_t &cur)
 is the identified (rx or tx) front-end LO locked? If not, set the tuning frequency to "the right thing" More...
 
void reportAntennas ()
 report the antennas that are available, send the report on cmd_stream More...
 
void reportModes ()
 report the modulation modes that are implemented, send the report on cmd_stream More...
 
void reportAFFilters ()
 report the audio filters that are implemented, send the report on cmd_stream More...
 
void setAntenna (const std::string &ant, char sel)
 Set the antenna choice. More...
 
void set1stLOFreq (double freq, char sel, bool set_if_freq=false)
 Set the front-end (LO + DDS) frequency to 'freq' This includes setting the PLL front end synthesizer as well as the FPGA resident digital synthesizer. More...
 
void initControlGPIO ()
 Initialize the GPIO control registers to set the direction and enables for the TX/RX relay output and sense input. More...
 
bool getTXEna ()
 get the state of the TXEna bit More...
 
bool getTXRelayOn ()
 get the state of the TX relay confirm bit More...
 
void setTXEna (bool val)
 turn TX on/off More...
 
void setTXFrontEndEnable (bool val)
 set TX enable property on front-end module – not present in all daughtercards... More...
 
void setTransverterLOFreqPower (double freq, double power)
 set the transverter LO frequency and power This code does not work for libUHD after 3.7 – it may not work for the older versions either. More...
 
void enableTransverterLO ()
 
void disableTransverterLO ()
 
void applyTargetFreqCorrection (double target_freq, double avoid_freq, uhd::tune_request_t *tune_req)
 applyTargetFreqCorrection adjusts the requested frequency, if necessary, to avoid a birdie caused by a multiple of the step size within the passband. More...
 
void testIntNMode (bool force_int_N, bool force_frac_N)
 Test for support for integer-N synthesis. More...
 

Private Attributes

Paramsparams
 
bool is_B2xx
 The B200 and B210 need some special handling, as they don't have frontend lock indications (as of 3.7.0) and need a special sample rate. More...
 
bool is_B210
 the B210 has two tx channels – use the second for a Transverter LO – see USRPLO More...
 
CmdMBoxcmd_stream
 command stream channel More...
 
unsigned int subid
 subscriber ID for this thread's connection to the command channel More...
 
uhd::usrp::multi_usrp::sptr usrp
 to which USRP unit is this connected? More...
 
uhd::usrp::dboard_iface::sptr dboard
 the daughterboard we're controlling More...
 
SoDa::PropTreetx_fe_subtree
 property tree from daughtercard module More...
 
SoDa::PropTreerx_fe_subtree
 property tree from daughtercard module More...
 
bool tx_fe_has_enable
 can we access tx_fe_subtree/enabled ? More...
 
bool rx_fe_has_enable
 can we access rx_fe_subtree/enabled ? More...
 
bool tx_has_lo_locked_sensor
 does the tx frond end have an lo_locked sensor? More...
 
bool rx_has_lo_locked_sensor
 does the rx frond end have an lo_locked sensor? More...
 
bool supports_tx_gpio
 does this unit support GPIO signals? (B2xx does not as of 3.7.0) More...
 
uhd::tune_result_t last_rx_tune_result
 RX tune result – actual LO and DSP freq. More...
 
uhd::tune_result_t last_tx_tune_result
 TX tune result. More...
 
uhd::tune_result_t saved_rx_tune_result
 previous RX tune result – used for transverter LO "calibration" function More...
 
double first_gettime
 timestamps are relative to the first timestamp. More...
 
double rx_rf_gain
 rf gain for RX front end amp/attenuator More...
 
double tx_rf_gain
 rf gain for final TX amp More...
 
uhd::gain_range_t rx_rf_gain_range
 property of the device – what is the min/maximum RX gain setting? More...
 
uhd::gain_range_t tx_rf_gain_range
 property of the device – what is the min/maximum TX gain setting? More...
 
uhd::freq_range_t rx_rf_freq_range
 property of the device – what is the min/maximum RX frequency? More...
 
uhd::freq_range_t tx_rf_freq_range
 property of the device – what is the min/maximum TX frequency? More...
 
bool tx_on
 if true, we are transmitting. More...
 
double last_rx_req_freq
 remember the last setting – useful for "calibration check" More...
 
double tx_freq
 remember current tx freq More...
 
double tx_freq_rxmode_offset
 when in RX mode, move tx off frequency to put the tx birdie out of band, when in TX mode, this is 0 More...
 
double tx_samp_rate
 sample rate to USRP TX chain. More...
 
std::string tx_ant
 TX antenna choice (usually has to be TX or TX/RX1? More...
 
std::string motherboard_name
 The model name of the USRP unit. More...
 
bool tvrt_lo_capable
 if true, this unit can implement a local transverter oscillator. More...
 
bool tvrt_lo_mode
 if true, set the transmit frequency, with some knowledge of the tvrt LO. More...
 
double tvrt_lo_gain
 output power for the second transmit channel (used for transverter LO) More...
 
double tvrt_lo_freq
 the frequency of the second transmit channel oscillator More...
 
double tvrt_lo_fe_freq
 the frequency of the second transmit channel front-end oscillator More...
 
bool debug_mode
 print stuff when we are in debug mode More...
 
bool supports_IntN_Mode
 if true, this unit can tune the front-end LO More...
 
SoDa::TRControltr_control
 external control widget for TR switching and other things. More...
 

Static Private Attributes

static const unsigned int TX_RELAY_CTL = 0x1000
 we use TX_IO bit 12 to turn on the TX relay we use TX_IO bit 11 to monitor the TX relay More...
 
static const unsigned int TX_RELAY_MON = 0x0800
 mask for RELAY sense bit More...
 
static const double rxmode_offset = 1.0e6
 tx offset when in RX mode More...
 

Additional Inherited Members

- Protected Member Functions inherited from SoDa::Debug
std::string curDateTime ()
 
- Protected Attributes inherited from SoDa::Debug
std::string unit_name
 the name of the unit reporting status More...
 
unsigned int debug_level
 the debug level (threshold) for messages More...
 
- Static Protected Attributes inherited from SoDa::Debug
static unsigned int default_debug_level = 0
 
static unsigned int global_debug_level = 0
 

Detailed Description

Though libuhd is designed to be re-entrant, there are some indications that all control functions (set_freq, gain, and other operations) should originate from a single thread.

USRPCtrl does that.

USRPCtrl listens on the Command Stream message channel for requests from other components (including the SoDa::UI listener) and dumps status and completion reports back onto the command stream channel.

Definition at line 68 of file USRPCtrl.hxx.

Constructor & Destructor Documentation

◆ USRPCtrl()

SoDa::USRPCtrl::USRPCtrl ( Params params,
CmdMBox _cmd_stream 
)

Member Function Documentation

◆ applyTargetFreqCorrection()

void SoDa::USRPCtrl::applyTargetFreqCorrection ( double  target_freq,
double  avoid_freq,
uhd::tune_request_t *  tune_req 
)
private

applyTargetFreqCorrection adjusts the requested frequency, if necessary, to avoid a birdie caused by a multiple of the step size within the passband.

It will also adjust the stepsize.

Parameters
target_freq– target tuning frequency
avoid_freq– the frequency that we must avoid by at least 1MHz
tune_req– tune request record.

Definition at line 864 of file USRPCtrl.cxx.

References SoDa::Debug::debugMsg().

Referenced by set1stLOFreq().

◆ checkLock()

uhd::tune_result_t SoDa::USRPCtrl::checkLock ( uhd::tune_request_t &  req,
char  sel,
uhd::tune_result_t &  cur 
)
private

is the identified (rx or tx) front-end LO locked? If not, set the tuning frequency to "the right thing"

Parameters
reqthe requested frequency (and tuning discipline)
sel'r' for RX LO, 't' for TX LO
curtuning result, if the LO was locked.

Definition at line 286 of file USRPCtrl.cxx.

References SoDa::Debug::debugMsg(), rx_has_lo_locked_sensor, tx_has_lo_locked_sensor, and usrp.

Referenced by set1stLOFreq().

◆ disableTransverterLO()

void SoDa::USRPCtrl::disableTransverterLO ( )
private

Definition at line 856 of file USRPCtrl.cxx.

References tvrt_lo_capable, tvrt_lo_mode, and usrp.

Referenced by execSetCommand().

◆ enableTransverterLO()

void SoDa::USRPCtrl::enableTransverterLO ( )
private

◆ execCommand()

void SoDa::USRPCtrl::execCommand ( Command cmd)
private

Parse an incoming command and dispatch.

Parameters
cmda command record

Definition at line 269 of file USRPCtrl.cxx.

References SoDa::Command::cmd, execGetCommand(), execRepCommand(), execSetCommand(), SoDa::Command::GET, SoDa::Command::REP, and SoDa::Command::SET.

Referenced by run().

◆ execGetCommand()

void SoDa::USRPCtrl::execGetCommand ( Command cmd)
privatevirtual

◆ execRepCommand()

void SoDa::USRPCtrl::execRepCommand ( Command cmd)
privatevirtual

Dispatch an incoming REPort command.

Parameters
cmda command record

Reimplemented from SoDa::SoDaThread.

Definition at line 694 of file USRPCtrl.cxx.

References SoDa::Command::target.

Referenced by execCommand().

◆ execSetCommand()

void SoDa::USRPCtrl::execSetCommand ( Command cmd)
privatevirtual

Dispatch an incoming SET command.

exeSetCommand handles SET messages of the following type:

Parameters
cmda command record
  • RX_RETUNE_FREQ causes the front-end LO + DDS (FE chain) to be retuned to a frequency at least 80 kHz above and no more than 250 kHz above the requested frequency. This places the signal of interest at an IF frequency between 80 kHz and 250 kHz. The IF frequency is set (in the USRPRX thread) to the difference between the requested frequency and the FE chain frequency.
  • RX_TUNE_FREQ and RX_FE_FREQ set the FE chain frequency to the specified value.
  • LO_CHECK set the FE chain to the specified frequency. This is used in calibrating a transverter chain by "tuning" to a frequency near the transverter LO and listening to the leakage signal. (It's a long story.)
  • TX_RETUNE_FREQ, TX_TUNE_FREQ and TX_FE_FREQ all set the transmit FE chain frequency to the requested value PLUS the tx_freq_rxmode_offset (the transmit IF frequency).
  • RX_SAMP_RATE set the receive A/D sample rate in the USRP
  • TX_SAMP_RATE set the transmit D/A sample rate in the USRP
  • RX_RF_GAIN set the RF gain of the receive front-end
  • TX_RF_GAIN set the gain of the transmit front-end
  • TX_STATE turn the transmitter ON or OFF
  • CLOCK_SOURCE select the external frequency reference for the USRP or the internal clock.
  • RX_ANT set the receive antenna port
  • TX_ANT set the transmit antenna port

Reimplemented from SoDa::SoDaThread.

Definition at line 447 of file USRPCtrl.cxx.

References SoDa::Command::CLOCK_SOURCE, SoDa::Command::cmd, cmd_stream, dboard, SoDa::Debug::debugMsg(), disableTransverterLO(), SoDa::Command::dparms, enableTransverterLO(), SoDa::Command::GET, SoDa::PropTree::getBoolProp(), SoDa::Command::iparms, last_rx_req_freq, last_rx_tune_result, last_tx_tune_result, SoDa::Command::LO_CHECK, SoDa::Command::LO_OFFSET, SoDa::MultiMBox< T >::put(), SoDa::Command::REP, SoDa::Command::RX_ANT, SoDa::Command::RX_FE_FREQ, SoDa::Command::RX_LO3_FREQ, SoDa::Command::RX_RETUNE_FREQ, SoDa::Command::RX_RF_GAIN, rx_rf_gain, rx_rf_gain_range, SoDa::Command::RX_SAMP_RATE, SoDa::Command::RX_TUNE_FREQ, rxmode_offset, SoDa::Command::SET, set1stLOFreq(), setAntenna(), setTransverterLOFreqPower(), setTXEna(), SoDa::Command::sparm, supports_tx_gpio, SoDa::Command::target, SoDa::Command::toString(), SoDa::Command::TVRT_LO_CONFIG, SoDa::Command::TVRT_LO_DISABLE, SoDa::Command::TVRT_LO_ENABLE, SoDa::Command::TX_ANT, tx_ant, SoDa::Command::TX_FE_FREQ, tx_fe_subtree, tx_freq, tx_freq_rxmode_offset, tx_on, SoDa::Command::TX_RETUNE_FREQ, SoDa::Command::TX_RF_GAIN, tx_rf_gain, tx_rf_gain_range, SoDa::Command::TX_SAMP_RATE, tx_samp_rate, SoDa::Command::TX_STATE, SoDa::Command::TX_TUNE_FREQ, and usrp.

Referenced by execCommand().

◆ getTime()

double SoDa::USRPCtrl::getTime ( )
private

get the number of seconds since the "Epoch"

Returns
relative time in seconds

Definition at line 260 of file USRPCtrl.cxx.

References first_gettime.

Referenced by USRPCtrl().

◆ getTXEna()

bool SoDa::USRPCtrl::getTXEna ( )
private

get the state of the TXEna bit

Returns
true if the TX relay is activated.

Definition at line 796 of file USRPCtrl.cxx.

References dboard, supports_tx_gpio, and TX_RELAY_CTL.

◆ getTXRelayOn()

bool SoDa::USRPCtrl::getTXRelayOn ( )
private

get the state of the TX relay confirm bit

Returns
true if the TX relay sense input is asserted

Definition at line 807 of file USRPCtrl.cxx.

References dboard, supports_tx_gpio, and TX_RELAY_MON.

◆ getUSRP()

uhd::usrp::multi_usrp::sptr SoDa::USRPCtrl::getUSRP ( )
inline

return a pointer to the multi_usrp object – used by RX and TX processes to find the associated USRP widget.

Returns
a pointer to the USRP radio object

Definition at line 82 of file USRPCtrl.hxx.

References n200serbabble::msg, normal_message_handler(), and usrp.

◆ initControlGPIO()

void SoDa::USRPCtrl::initControlGPIO ( )
private

Initialize the GPIO control registers to set the direction and enables for the TX/RX relay output and sense input.

Definition at line 702 of file USRPCtrl.cxx.

References dboard, SoDa::Debug::debugMsg(), supports_tx_gpio, TX_RELAY_CTL, TX_RELAY_MON, and usrp.

Referenced by USRPCtrl().

◆ normal_message_handler()

void SoDa::USRPCtrl::normal_message_handler ( uhd::msg::type_t  type,
const std::string &  msg 
)
static

This is the more permanent message handler...

Definition at line 925 of file USRPCtrl.cxx.

References SoDa::Debug::debugMsg().

Referenced by getUSRP(), and USRPCtrl().

◆ reportAFFilters()

void SoDa::USRPCtrl::reportAFFilters ( )
private

report the audio filters that are implemented, send the report on cmd_stream

Definition at line 1033 of file USRPCtrl.cxx.

References SoDa::Command::AF_FILT_ENTRY, SoDa::Command::BW_100, SoDa::Command::BW_2000, SoDa::Command::BW_500, SoDa::Command::BW_6000, SoDa::Command::BW_PASS, cmd_stream, SoDa::MultiMBox< T >::put(), and SoDa::Command::REP.

Referenced by execGetCommand().

◆ reportAntennas()

void SoDa::USRPCtrl::reportAntennas ( )
private

report the antennas that are available, send the report on cmd_stream

Definition at line 1048 of file USRPCtrl.cxx.

References cmd_stream, SoDa::Debug::debugMsg(), SoDa::MultiMBox< T >::put(), SoDa::Command::REP, SoDa::Command::RX_ANT_NAME, SoDa::Command::TX_ANT_NAME, and usrp.

Referenced by execGetCommand().

◆ reportModes()

void SoDa::USRPCtrl::reportModes ( )
private

report the modulation modes that are implemented, send the report on cmd_stream

Definition at line 1015 of file USRPCtrl.cxx.

References SoDa::Command::AM, cmd_stream, SoDa::Command::CW_L, SoDa::Command::CW_U, SoDa::Command::LSB, SoDa::Command::MOD_SEL_ENTRY, SoDa::Command::NBFM, SoDa::MultiMBox< T >::put(), SoDa::Command::REP, SoDa::Command::USB, and SoDa::Command::WBFM.

Referenced by execGetCommand().

◆ run()

void SoDa::USRPCtrl::run ( )
virtual

◆ set1stLOFreq()

void SoDa::USRPCtrl::set1stLOFreq ( double  freq,
char  sel,
bool  set_if_freq = false 
)
private

Set the front-end (LO + DDS) frequency to 'freq' This includes setting the PLL front end synthesizer as well as the FPGA resident digital synthesizer.

Parameters
freqtarget frequency (LO and DDS combined)
sel'r' for RX LO, 't' for TX LO
set_if_freqif TRUE, tell the USRPRX thread to reset its front-end frequency so that it can adjust its own oscillator.

This code depends on the integer-N tuning features in libuhd 3.7 and after earlier libraries will revert to fractional-N tuning and might see a rise in the noisefloor and perhaps some troublesome spurs at multiples of the reference frequency divided by the fractional divisor.

Definition at line 312 of file USRPCtrl.cxx.

References applyTargetFreqCorrection(), checkLock(), cmd_stream, SoDa::Debug::debugMsg(), last_rx_req_freq, last_rx_tune_result, last_tx_tune_result, SoDa::MultiMBox< T >::put(), SoDa::Command::RX_LO3_FREQ, rx_rf_freq_range, SoDa::Command::SET, supports_IntN_Mode, tvrt_lo_fe_freq, tvrt_lo_mode, tx_rf_freq_range, and usrp.

Referenced by execSetCommand(), and setTXEna().

◆ setAntenna()

void SoDa::USRPCtrl::setAntenna ( const std::string &  ant,
char  sel 
)
private

Set the antenna choice.

Use "ant" if it is in the list of alternatives. Otherwise, choose the first alternative.

Parameters
antthe requested antenna
sel'r' for RX, 't' for TX

Definition at line 1067 of file USRPCtrl.cxx.

References usrp.

Referenced by execSetCommand(), and setTXEna().

◆ setTransverterLOFreqPower()

void SoDa::USRPCtrl::setTransverterLOFreqPower ( double  freq,
double  power 
)
private

set the transverter LO frequency and power This code does not work for libUHD after 3.7 – it may not work for the older versions either.

;(

Definition at line 817 of file USRPCtrl.cxx.

References cmd_stream, SoDa::Debug::debugMsg(), SoDa::MultiMBox< T >::put(), SoDa::Command::REP, SoDa::Command::TVRT_LO_CONFIG, tvrt_lo_freq, tvrt_lo_gain, and usrp.

Referenced by execSetCommand().

◆ setTXEna()

void SoDa::USRPCtrl::setTXEna ( bool  val)
private

turn TX on/off

Parameters
valtrue to enable the transmitter, false otherwise.

Definition at line 745 of file USRPCtrl.cxx.

References dboard, SoDa::Debug::debugMsg(), set1stLOFreq(), setAntenna(), setTXFrontEndEnable(), SoDa::TRControl::setTXOff(), SoDa::TRControl::setTXOn(), supports_tx_gpio, tr_control, tx_ant, tx_freq, tx_freq_rxmode_offset, TX_RELAY_CTL, tx_rf_gain, and usrp.

Referenced by execSetCommand(), and USRPCtrl().

◆ setTXFrontEndEnable()

void SoDa::USRPCtrl::setTXFrontEndEnable ( bool  val)
private

set TX enable property on front-end module – not present in all daughtercards...

Parameters
valtrue to enable transmitter front end, false otherwise.

Definition at line 781 of file USRPCtrl.cxx.

References SoDa::Debug::debugMsg(), SoDa::PropTree::getBoolProp(), rx_fe_has_enable, rx_fe_subtree, SoDa::PropTree::setBoolProp(), tx_fe_has_enable, and tx_fe_subtree.

Referenced by setTXEna().

◆ testIntNMode()

void SoDa::USRPCtrl::testIntNMode ( bool  force_int_N,
bool  force_frac_N 
)
private

Test for support for integer-N synthesis.

Parameters
force_int_Nforce LO tuning to use integer-N synthesis
force_frac_Nforce LO tuning to use fractional-N synthesis

Definition at line 940 of file USRPCtrl.cxx.

References SoDa::Debug::debugMsg(), SoDa::PropTree::getStringProp(), is_B2xx, rx_fe_subtree, rx_rf_freq_range, supports_IntN_Mode, and usrp.

Referenced by USRPCtrl().

Member Data Documentation

◆ cmd_stream

CmdMBox* SoDa::USRPCtrl::cmd_stream
private

◆ dboard

uhd::usrp::dboard_iface::sptr SoDa::USRPCtrl::dboard
private

the daughterboard we're controlling

Definition at line 166 of file USRPCtrl.hxx.

Referenced by execSetCommand(), getTXEna(), getTXRelayOn(), initControlGPIO(), and setTXEna().

◆ debug_mode

bool SoDa::USRPCtrl::debug_mode
private

print stuff when we are in debug mode

Definition at line 256 of file USRPCtrl.hxx.

◆ first_gettime

double SoDa::USRPCtrl::first_gettime
private

timestamps are relative to the first timestamp.

Definition at line 220 of file USRPCtrl.hxx.

Referenced by getTime(), and USRPCtrl().

◆ is_B210

bool SoDa::USRPCtrl::is_B210
private

the B210 has two tx channels – use the second for a Transverter LO – see USRPLO

Definition at line 100 of file USRPCtrl.hxx.

Referenced by USRPCtrl().

◆ is_B2xx

bool SoDa::USRPCtrl::is_B2xx
private

The B200 and B210 need some special handling, as they don't have frontend lock indications (as of 3.7.0) and need a special sample rate.

Definition at line 99 of file USRPCtrl.hxx.

Referenced by testIntNMode(), and USRPCtrl().

◆ last_rx_req_freq

double SoDa::USRPCtrl::last_rx_req_freq
private

remember the last setting – useful for "calibration check"

Definition at line 235 of file USRPCtrl.hxx.

Referenced by execSetCommand(), set1stLOFreq(), and USRPCtrl().

◆ last_rx_tune_result

uhd::tune_result_t SoDa::USRPCtrl::last_rx_tune_result
private

RX tune result – actual LO and DSP freq.

Definition at line 216 of file USRPCtrl.hxx.

Referenced by execGetCommand(), execSetCommand(), and set1stLOFreq().

◆ last_tx_tune_result

uhd::tune_result_t SoDa::USRPCtrl::last_tx_tune_result
private

TX tune result.

Definition at line 217 of file USRPCtrl.hxx.

Referenced by execGetCommand(), execSetCommand(), and set1stLOFreq().

◆ motherboard_name

std::string SoDa::USRPCtrl::motherboard_name
private

The model name of the USRP unit.

Definition at line 246 of file USRPCtrl.hxx.

Referenced by execGetCommand(), and USRPCtrl().

◆ params

Params* SoDa::USRPCtrl::params
private

Definition at line 94 of file USRPCtrl.hxx.

Referenced by run(), and USRPCtrl().

◆ rx_fe_has_enable

bool SoDa::USRPCtrl::rx_fe_has_enable
private

can we access rx_fe_subtree/enabled ?

Definition at line 175 of file USRPCtrl.hxx.

Referenced by setTXFrontEndEnable(), and USRPCtrl().

◆ rx_fe_subtree

SoDa::PropTree* SoDa::USRPCtrl::rx_fe_subtree
private

property tree from daughtercard module

Definition at line 170 of file USRPCtrl.hxx.

Referenced by setTXFrontEndEnable(), testIntNMode(), and USRPCtrl().

◆ rx_has_lo_locked_sensor

bool SoDa::USRPCtrl::rx_has_lo_locked_sensor
private

does the rx frond end have an lo_locked sensor?

Definition at line 177 of file USRPCtrl.hxx.

Referenced by checkLock(), and USRPCtrl().

◆ rx_rf_freq_range

uhd::freq_range_t SoDa::USRPCtrl::rx_rf_freq_range
private

property of the device – what is the min/maximum RX frequency?

Definition at line 229 of file USRPCtrl.hxx.

Referenced by execGetCommand(), set1stLOFreq(), testIntNMode(), and USRPCtrl().

◆ rx_rf_gain

double SoDa::USRPCtrl::rx_rf_gain
private

rf gain for RX front end amp/attenuator

Definition at line 223 of file USRPCtrl.hxx.

Referenced by execSetCommand(), and USRPCtrl().

◆ rx_rf_gain_range

uhd::gain_range_t SoDa::USRPCtrl::rx_rf_gain_range
private

property of the device – what is the min/maximum RX gain setting?

Definition at line 226 of file USRPCtrl.hxx.

Referenced by execSetCommand(), and USRPCtrl().

◆ rxmode_offset

const double SoDa::USRPCtrl::rxmode_offset = 1.0e6
staticprivate

tx offset when in RX mode

Definition at line 241 of file USRPCtrl.hxx.

Referenced by execSetCommand().

◆ saved_rx_tune_result

uhd::tune_result_t SoDa::USRPCtrl::saved_rx_tune_result
private

previous RX tune result – used for transverter LO "calibration" function

Definition at line 218 of file USRPCtrl.hxx.

◆ singleton_ctrl_obj

SoDa::USRPCtrl * SoDa::USRPCtrl::singleton_ctrl_obj = NULL
static

This is a singleton object – the last (and only, we hope) such object to be created sets a static pointer to itself.

This looks pretty gross, but it is necessary to provide context to the error message handlers.

Definition at line 91 of file USRPCtrl.hxx.

◆ subid

unsigned int SoDa::USRPCtrl::subid
private

subscriber ID for this thread's connection to the command channel

Definition at line 162 of file USRPCtrl.hxx.

Referenced by run(), and USRPCtrl().

◆ supports_IntN_Mode

bool SoDa::USRPCtrl::supports_IntN_Mode
private

if true, this unit can tune the front-end LO

in integer-N mode (as opposed to fractional-N) to improve rejection of spurious signals and drop the noise floor a bit.

Definition at line 276 of file USRPCtrl.hxx.

Referenced by set1stLOFreq(), and testIntNMode().

◆ supports_tx_gpio

bool SoDa::USRPCtrl::supports_tx_gpio
private

does this unit support GPIO signals? (B2xx does not as of 3.7.0)

Definition at line 181 of file USRPCtrl.hxx.

Referenced by execSetCommand(), getTXEna(), getTXRelayOn(), initControlGPIO(), and setTXEna().

◆ tr_control

SoDa::TRControl* SoDa::USRPCtrl::tr_control
private

external control widget for TR switching and other things.

Definition at line 282 of file USRPCtrl.hxx.

Referenced by setTXEna(), and USRPCtrl().

◆ tvrt_lo_capable

bool SoDa::USRPCtrl::tvrt_lo_capable
private

if true, this unit can implement a local transverter oscillator.

Definition at line 249 of file USRPCtrl.hxx.

Referenced by disableTransverterLO(), enableTransverterLO(), and USRPCtrl().

◆ tvrt_lo_fe_freq

double SoDa::USRPCtrl::tvrt_lo_fe_freq
private

the frequency of the second transmit channel front-end oscillator

Definition at line 253 of file USRPCtrl.hxx.

Referenced by enableTransverterLO(), and set1stLOFreq().

◆ tvrt_lo_freq

double SoDa::USRPCtrl::tvrt_lo_freq
private

the frequency of the second transmit channel oscillator

Definition at line 252 of file USRPCtrl.hxx.

Referenced by enableTransverterLO(), and setTransverterLOFreqPower().

◆ tvrt_lo_gain

double SoDa::USRPCtrl::tvrt_lo_gain
private

output power for the second transmit channel (used for transverter LO)

Definition at line 251 of file USRPCtrl.hxx.

Referenced by enableTransverterLO(), and setTransverterLOFreqPower().

◆ tvrt_lo_mode

bool SoDa::USRPCtrl::tvrt_lo_mode
private

if true, set the transmit frequency, with some knowledge of the tvrt LO.

Definition at line 250 of file USRPCtrl.hxx.

Referenced by disableTransverterLO(), enableTransverterLO(), set1stLOFreq(), and USRPCtrl().

◆ tx_ant

std::string SoDa::USRPCtrl::tx_ant
private

TX antenna choice (usually has to be TX or TX/RX1?

Definition at line 244 of file USRPCtrl.hxx.

Referenced by execSetCommand(), setTXEna(), and USRPCtrl().

◆ tx_fe_has_enable

bool SoDa::USRPCtrl::tx_fe_has_enable
private

can we access tx_fe_subtree/enabled ?

Definition at line 174 of file USRPCtrl.hxx.

Referenced by setTXFrontEndEnable(), and USRPCtrl().

◆ tx_fe_subtree

SoDa::PropTree* SoDa::USRPCtrl::tx_fe_subtree
private

property tree from daughtercard module

Definition at line 168 of file USRPCtrl.hxx.

Referenced by execSetCommand(), setTXFrontEndEnable(), and USRPCtrl().

◆ tx_freq

double SoDa::USRPCtrl::tx_freq
private

remember current tx freq

Definition at line 239 of file USRPCtrl.hxx.

Referenced by execSetCommand(), setTXEna(), and USRPCtrl().

◆ tx_freq_rxmode_offset

double SoDa::USRPCtrl::tx_freq_rxmode_offset
private

when in RX mode, move tx off frequency to put the tx birdie out of band, when in TX mode, this is 0

Definition at line 240 of file USRPCtrl.hxx.

Referenced by execSetCommand(), setTXEna(), and USRPCtrl().

◆ tx_has_lo_locked_sensor

bool SoDa::USRPCtrl::tx_has_lo_locked_sensor
private

does the tx frond end have an lo_locked sensor?

Definition at line 176 of file USRPCtrl.hxx.

Referenced by checkLock(), and USRPCtrl().

◆ tx_on

bool SoDa::USRPCtrl::tx_on
private

if true, we are transmitting.

Definition at line 233 of file USRPCtrl.hxx.

Referenced by execSetCommand(), run(), and USRPCtrl().

◆ TX_RELAY_CTL

const unsigned int SoDa::USRPCtrl::TX_RELAY_CTL = 0x1000
staticprivate

we use TX_IO bit 12 to turn on the TX relay we use TX_IO bit 11 to monitor the TX relay

mask for RELAY control bit

Definition at line 213 of file USRPCtrl.hxx.

Referenced by getTXEna(), initControlGPIO(), and setTXEna().

◆ TX_RELAY_MON

const unsigned int SoDa::USRPCtrl::TX_RELAY_MON = 0x0800
staticprivate

mask for RELAY sense bit

Definition at line 214 of file USRPCtrl.hxx.

Referenced by getTXRelayOn(), and initControlGPIO().

◆ tx_rf_freq_range

uhd::freq_range_t SoDa::USRPCtrl::tx_rf_freq_range
private

property of the device – what is the min/maximum TX frequency?

Definition at line 230 of file USRPCtrl.hxx.

Referenced by set1stLOFreq(), and USRPCtrl().

◆ tx_rf_gain

double SoDa::USRPCtrl::tx_rf_gain
private

rf gain for final TX amp

Definition at line 224 of file USRPCtrl.hxx.

Referenced by execSetCommand(), setTXEna(), and USRPCtrl().

◆ tx_rf_gain_range

uhd::gain_range_t SoDa::USRPCtrl::tx_rf_gain_range
private

property of the device – what is the min/maximum TX gain setting?

Definition at line 227 of file USRPCtrl.hxx.

Referenced by execSetCommand(), and USRPCtrl().

◆ tx_samp_rate

double SoDa::USRPCtrl::tx_samp_rate
private

sample rate to USRP TX chain.

Definition at line 243 of file USRPCtrl.hxx.

Referenced by execSetCommand(), and USRPCtrl().

◆ usrp

uhd::usrp::multi_usrp::sptr SoDa::USRPCtrl::usrp
private

The documentation for this class was generated from the following files: