USRP Hardware Driver and USRP Manual  Version: 3.15.0.HEAD-0-g6563c537
UHD and USRP Manual
uhd::rfnoc::radio_ctrl Class Referenceabstract

Block controller for all RFNoC-based radio blocks. More...

#include <uhd/rfnoc/radio_ctrl.hpp>

Inheritance diagram for uhd::rfnoc::radio_ctrl:
uhd::rfnoc::source_block_ctrl_base uhd::rfnoc::sink_block_ctrl_base uhd::rfnoc::rate_node_ctrl uhd::rfnoc::tick_node_ctrl uhd::rfnoc::terminator_node_ctrl uhd::rfnoc::block_ctrl_base uhd::rfnoc::source_node_ctrl uhd::rfnoc::block_ctrl_base uhd::rfnoc::sink_node_ctrl uhd::rfnoc::node_ctrl_base uhd::rfnoc::node_ctrl_base uhd::rfnoc::node_ctrl_base uhd::rfnoc::node_ctrl_base uhd::rfnoc::node_ctrl_base uhd::rfnoc::node_ctrl_base uhd::rfnoc::node_ctrl_base

Public Member Functions

virtual ~radio_ctrl ()
 
virtual double get_rate () const =0
 
virtual double set_rate (double rate)=0
 
virtual std::string get_tx_antenna (const size_t chan)=0
 
virtual void set_tx_antenna (const std::string &ant, const size_t chan)=0
 
virtual std::string get_rx_antenna (const size_t chan)=0
 
virtual void set_rx_antenna (const std::string &ant, const size_t chan)=0
 
virtual double get_tx_frequency (const size_t chan)=0
 
virtual double set_tx_frequency (const double freq, size_t chan)=0
 
virtual double get_rx_frequency (const size_t chan)=0
 
virtual double set_rx_frequency (const double freq, const size_t chan)=0
 
virtual double get_tx_gain (const size_t chan)=0
 
virtual double set_tx_gain (const double gain, const size_t chan)=0
 
virtual double get_rx_gain (const size_t chan)=0
 
virtual double set_rx_gain (const double gain, const size_t chan)=0
 
virtual double get_tx_bandwidth (const size_t chan)=0
 
virtual double set_tx_bandwidth (const double bandwidth, const size_t chan)=0
 
virtual double get_rx_bandwidth (const size_t chan)=0
 
virtual double set_rx_bandwidth (const double bandwidth, const size_t chan)=0
 
virtual void set_time_now (const time_spec_t &time_spec)=0
 
virtual void set_time_next_pps (const time_spec_t &time_spec)=0
 
virtual time_spec_t get_time_now ()=0
 
virtual time_spec_t get_time_last_pps ()=0
 
virtual std::vector< std::string > get_gpio_banks () const =0
 
virtual void set_gpio_attr (const std::string &bank, const std::string &attr, const uint32_t value, const uint32_t mask)=0
 
virtual uint32_t get_gpio_attr (const std::string &bank, const std::string &attr)=0
 
virtual std::vector< std::string > get_rx_lo_names (const size_t chan)=0
 
virtual std::vector< std::string > get_rx_lo_sources (const std::string &name, const size_t chan)=0
 
virtual freq_range_t get_rx_lo_freq_range (const std::string &name, const size_t chan)=0
 
virtual void set_rx_lo_source (const std::string &src, const std::string &name, const size_t chan)=0
 
virtual const std::string get_rx_lo_source (const std::string &name, const size_t chan)=0
 
virtual void set_rx_lo_export_enabled (bool enabled, const std::string &name, const size_t chan)=0
 
virtual bool get_rx_lo_export_enabled (const std::string &name, const size_t chan)=0
 
virtual double set_rx_lo_freq (double freq, const std::string &name, const size_t chan)=0
 
virtual double get_rx_lo_freq (const std::string &name, const size_t chan)=0
 
virtual std::vector< std::string > get_tx_lo_names (const size_t chan)=0
 
virtual std::vector< std::string > get_tx_lo_sources (const std::string &name, const size_t chan)=0
 
virtual freq_range_t get_tx_lo_freq_range (const std::string &name, const size_t chan)=0
 
virtual void set_tx_lo_source (const std::string &src, const std::string &name, const size_t chan)=0
 
virtual const std::string get_tx_lo_source (const std::string &name, const size_t chan)=0
 
virtual void set_tx_lo_export_enabled (const bool enabled, const std::string &name, const size_t chan)=0
 
virtual bool get_tx_lo_export_enabled (const std::string &name, const size_t chan)=0
 
virtual double set_tx_lo_freq (const double freq, const std::string &name, const size_t chan)=0
 
virtual double get_tx_lo_freq (const std::string &name, const size_t chan)=0
 
virtual void set_time_source (const std::string &source)=0
 
virtual std::string get_time_source ()=0
 
virtual std::vector< std::string > get_time_sources ()=0
 
virtual void set_clock_source (const std::string &source)=0
 
virtual std::string get_clock_source ()=0
 
virtual std::vector< std::string > get_clock_sources ()=0
 
virtual size_t get_chan_from_dboard_fe (const std::string &fe, const uhd::direction_t dir)=0
 
virtual std::string get_dboard_fe_from_chan (const size_t chan, const uhd::direction_t dir)=0
 
virtual void enable_rx_timestamps (const bool enable, const size_t chan)=0
 
- Public Member Functions inherited from uhd::rfnoc::source_block_ctrl_base
virtual void issue_stream_cmd (const uhd::stream_cmd_t &stream_cmd, const size_t chan=0)
 
stream_sig_t get_output_signature (size_t block_port=0) const
 
std::vector< size_t > get_output_ports () const
 
virtual void set_destination (uint32_t next_address, size_t output_block_port=0)
 
virtual void configure_flow_control_out (const bool enable_output, const bool lossless_link, const size_t buf_size_bytes, const size_t pkt_limit=0, const size_t block_port=0, const uhd::sid_t &sid=uhd::sid_t())
 
size_t get_mtu (size_t block_port=0) const
 
- Public Member Functions inherited from uhd::rfnoc::block_ctrl_base
uint32_t get_address (size_t block_port=0)
 
block_id_t get_block_id () const
 
std::string unique_id () const
 
std::vector< size_t > get_ctrl_ports () const
 
void sr_write (const uint32_t reg, const uint32_t data, const size_t port=0)
 
void sr_write (const std::string &reg, const uint32_t data, const size_t port=0)
 
uint64_t sr_read64 (const settingsbus_reg_t reg, const size_t port=0)
 
uint32_t sr_read32 (const settingsbus_reg_t reg, const size_t port=0)
 
uint64_t user_reg_read64 (const uint32_t addr, const size_t port=0)
 
uint64_t user_reg_read64 (const std::string &reg, const size_t port=0)
 
uint32_t user_reg_read32 (const uint32_t addr, const size_t port=0)
 
uint32_t user_reg_read32 (const std::string &reg, const size_t port=0)
 
void set_command_time (const time_spec_t &time_spec, const size_t port=ANY_PORT)
 
time_spec_t get_command_time (const size_t port=0)
 
void set_command_tick_rate (const double tick_rate, const size_t port=ANY_PORT)
 
void clear_command_time (const size_t port)
 
void clear ()
 
void set_args (const uhd::device_addr_t &args, const size_t port=0)
 
void set_arg (const std::string &key, const std::string &val, const size_t port=0)
 Set a specific block argument. val is converted to the corresponding. More...
 
template<typename T >
void set_arg (const std::string &key, const T &val, const size_t port=0)
 Direct access to set a block argument. More...
 
uhd::device_addr_t get_args (const size_t port=0) const
 Return all block arguments as a device_addr_t. More...
 
std::string get_arg (const std::string &key, const size_t port=0) const
 Return a single block argument in string format. More...
 
template<typename T >
get_arg (const std::string &key, const size_t port=0) const
 Direct access to get a block argument. More...
 
std::string get_arg_type (const std::string &key, const size_t port=0) const
 
- Public Member Functions inherited from uhd::rfnoc::node_ctrl_base
node_map_t list_downstream_nodes ()
 
node_map_t list_upstream_nodes ()
 
void disconnect ()
 
void disconnect_output_port (const size_t output_port)
 
void disconnect_input_port (const size_t input_port)
 
void set_downstream_port (const size_t this_port, const size_t remote_port)
 
size_t get_downstream_port (const size_t this_port)
 
void set_upstream_port (const size_t this_port, const size_t remote_port)
 
size_t get_upstream_port (const size_t this_port)
 
template<typename T >
UHD_INLINE std::vector< boost::shared_ptr< T > > find_downstream_node (bool active_only=false)
 
template<typename T >
UHD_INLINE std::vector< boost::shared_ptr< T > > find_upstream_node (bool active_only=false)
 
template<typename T , typename value_type >
UHD_INLINE value_type find_downstream_unique_property (boost::function< value_type(boost::shared_ptr< T > node, size_t port)> get_property, value_type null_value, const std::set< boost::shared_ptr< T > > &exclude_nodes=std::set< boost::shared_ptr< T > >())
 
template<typename T , typename value_type >
UHD_INLINE value_type find_upstream_unique_property (boost::function< value_type(boost::shared_ptr< T > node, size_t port)> get_property, value_type null_value, const std::set< boost::shared_ptr< T > > &exclude_nodes=std::set< boost::shared_ptr< T > >())
 
- Public Member Functions inherited from uhd::rfnoc::source_node_ctrl
size_t connect_downstream (node_ctrl_base::sptr downstream_node, size_t port=ANY_PORT, const uhd::device_addr_t &args=uhd::device_addr_t())
 
virtual void set_rx_streamer (bool active, const size_t port)
 
- Public Member Functions inherited from uhd::rfnoc::sink_block_ctrl_base
stream_sig_t get_input_signature (size_t block_port=0) const
 
std::vector< size_t > get_input_ports () const
 
size_t get_fifo_size (size_t block_port=0) const
 
size_t get_mtu (size_t block_port=0) const
 
virtual void configure_flow_control_in (const size_t bytes, const size_t block_port=0)
 
virtual void set_error_policy (const std::string &policy)
 
- Public Member Functions inherited from uhd::rfnoc::sink_node_ctrl
size_t connect_upstream (node_ctrl_base::sptr upstream_node, size_t port=ANY_PORT, const uhd::device_addr_t &args=uhd::device_addr_t())
 
virtual void set_tx_streamer (bool active, const size_t port)
 
- Public Member Functions inherited from uhd::rfnoc::rate_node_ctrl
virtual double get_input_samp_rate (size_t port=ANY_PORT)
 
virtual double get_output_samp_rate (size_t port=ANY_PORT)
 
- Public Member Functions inherited from uhd::rfnoc::tick_node_ctrl
double get_tick_rate (const std::set< node_ctrl_base::sptr > &_explored_nodes=std::set< node_ctrl_base::sptr >())
 

Static Public Attributes

static const size_t ALL_CHANS = size_t(~0)
 A wildcard channel index. More...
 
static const std::string ALL_GAINS
 A wildcard gain element name. More...
 
static const std::string ALL_LOS
 A wildcard local oscillator element name. More...
 
- Static Public Attributes inherited from uhd::rfnoc::rate_node_ctrl
static const double RATE_UNDEFINED
 This value is used by rate nodes that don't actually set a rate themselves. More...
 
- Static Public Attributes inherited from uhd::rfnoc::tick_node_ctrl
static const double RATE_UNDEFINED
 This value is used by rate nodes that don't actually set a rate themselves. More...
 

Additional Inherited Members

- Public Types inherited from uhd::rfnoc::source_block_ctrl_base
typedef boost::shared_ptr< source_block_ctrl_basesptr
 
- Public Types inherited from uhd::rfnoc::block_ctrl_base
typedef boost::shared_ptr< block_ctrl_basesptr
 
typedef boost::function< sptr(const make_args_t &)> make_t
 
- Public Types inherited from uhd::rfnoc::node_ctrl_base
typedef boost::shared_ptr< node_ctrl_basesptr
 
typedef boost::weak_ptr< node_ctrl_basewptr
 
typedef std::map< size_t, wptrnode_map_t
 
typedef std::pair< size_t, wptrnode_map_pair_t
 
- Public Types inherited from uhd::rfnoc::source_node_ctrl
typedef boost::shared_ptr< source_node_ctrlsptr
 
typedef std::map< size_t, boost::weak_ptr< source_node_ctrl > > node_map_t
 
typedef std::pair< size_t, boost::weak_ptr< source_node_ctrl > > node_map_pair_t
 
- Public Types inherited from uhd::rfnoc::sink_block_ctrl_base
typedef boost::shared_ptr< sink_block_ctrl_basesptr
 
- Public Types inherited from uhd::rfnoc::sink_node_ctrl
typedef boost::shared_ptr< sink_node_ctrlsptr
 
typedef std::map< size_t, boost::weak_ptr< sink_node_ctrl > > node_map_t
 
typedef std::pair< size_t, boost::weak_ptr< sink_node_ctrl > > node_map_pair_t
 
- Public Types inherited from uhd::rfnoc::rate_node_ctrl
typedef boost::shared_ptr< rate_node_ctrlsptr
 
- Public Types inherited from uhd::rfnoc::tick_node_ctrl
typedef boost::shared_ptr< tick_node_ctrlsptr
 
- Public Types inherited from uhd::rfnoc::terminator_node_ctrl
typedef boost::shared_ptr< terminator_node_ctrlsptr
 
- Static Public Member Functions inherited from uhd::rfnoc::block_ctrl_base
static void register_block (const make_t &make, const std::string &name)
 
static sptr make (const make_args_t &make_args, uint64_t noc_id=~0)
 Create a block controller class given a NoC-ID or a block name. More...
 
- Protected Member Functions inherited from uhd::rfnoc::source_block_ctrl_base
virtual size_t _request_output_port (const size_t suggested_port, const uhd::device_addr_t &args) const
 
- Protected Member Functions inherited from uhd::rfnoc::block_ctrl_base
 block_ctrl_base (void)
 
virtual ~block_ctrl_base ()
 
 block_ctrl_base (const make_args_t &make_args)
 
stream_sig_t _resolve_port_def (const blockdef::port_t &port_def) const
 
uhd::fs_path get_arg_path (const std::string &key, size_t port=0) const
 Return the property tree path to a block argument key on port. More...
 
timed_wb_iface::sptr get_ctrl_iface (const size_t block_port)
 Get a control interface object for block port block_port. More...
 
virtual void _clear (const size_t port=0)
 Override this function if your block does something else. More...
 
virtual void _set_command_time (const time_spec_t &time_spec, const size_t port=ANY_PORT)
 Override this function if your block needs to specially handle. More...
 
- Protected Member Functions inherited from uhd::rfnoc::node_ctrl_base
 node_ctrl_base (void)
 
virtual ~node_ctrl_base ()
 
- Protected Member Functions inherited from uhd::rfnoc::sink_block_ctrl_base
virtual size_t _request_input_port (const size_t suggested_port, const uhd::device_addr_t &args) const
 
- Protected Member Functions inherited from uhd::rfnoc::tick_node_ctrl
virtual double _get_tick_rate ()
 
- Protected Attributes inherited from uhd::rfnoc::block_ctrl_base
uhd::property_tree::sptr _tree
 Property sub-tree. More...
 
uhd::fs_path _root_path
 Root node of this block's properties. More...
 
blockdef::sptr _block_def
 Block definition (stores info about the block such as ports) More...
 
- Protected Attributes inherited from uhd::rfnoc::node_ctrl_base
uhd::device_addr_t _args
 Stores default arguments. More...
 
node_map_t _upstream_nodes
 List of upstream nodes. More...
 
node_map_t _downstream_nodes
 List of downstream nodes. More...
 
size_t _num_input_ports
 
size_t _num_output_ports
 
std::map< size_t, bool > _rx_streamer_active
 
std::map< size_t, bool > _tx_streamer_active
 

Detailed Description

Block controller for all RFNoC-based radio blocks.

Constructor & Destructor Documentation

◆ ~radio_ctrl()

virtual uhd::rfnoc::radio_ctrl::~radio_ctrl ( )
inlinevirtual

Member Function Documentation

◆ enable_rx_timestamps()

virtual void uhd::rfnoc::radio_ctrl::enable_rx_timestamps ( const bool  enable,
const size_t  chan 
)
pure virtual

Enable or disable the setting of timestamps on Rx.

◆ get_chan_from_dboard_fe()

virtual size_t uhd::rfnoc::radio_ctrl::get_chan_from_dboard_fe ( const std::string &  fe,
const uhd::direction_t  dir 
)
pure virtual

Given a frontend name, return the channel mapping.

E.g.: For a TwinRX board, there's two frontends, '0' and '1', which map to channels 0 and 1 respectively. A BasicRX boards has alphabetical frontends (A, B) which map to channels differently.

◆ get_clock_source()

virtual std::string uhd::rfnoc::radio_ctrl::get_clock_source ( )
pure virtual

Get the currently set clock source.

Returns
the string representing the clock source

◆ get_clock_sources()

virtual std::vector<std::string> uhd::rfnoc::radio_ctrl::get_clock_sources ( )
pure virtual

Get a list of possible clock sources.

Returns
a vector of strings for possible settings

◆ get_dboard_fe_from_chan()

virtual std::string uhd::rfnoc::radio_ctrl::get_dboard_fe_from_chan ( const size_t  chan,
const uhd::direction_t  dir 
)
pure virtual

The inverse function to get_chan_from_dboard_fe()

◆ get_gpio_attr()

virtual uint32_t uhd::rfnoc::radio_ctrl::get_gpio_attr ( const std::string &  bank,
const std::string &  attr 
)
pure virtual

Get a GPIO attribute on a particular GPIO bank. Possible attribute names:

  • CTRL - 1 for ATR mode 0 for GPIO mode
  • DDR - 1 for output 0 for input
  • OUT - GPIO output level (not ATR mode)
  • ATR_0X - ATR idle state
  • ATR_RX - ATR receive only state
  • ATR_TX - ATR transmit only state
  • ATR_XX - ATR full duplex state
  • READBACK - readback input GPIOs
    Parameters
    bankthe name of a GPIO bank
    attrthe name of a GPIO attribute
    Returns
    the value set for this attribute

◆ get_gpio_banks()

virtual std::vector<std::string> uhd::rfnoc::radio_ctrl::get_gpio_banks ( ) const
pure virtual

Returns the list of GPIO banks that are associated with this radio.

Returns
list of GPIO bank names

◆ get_rate()

virtual double uhd::rfnoc::radio_ctrl::get_rate ( ) const
pure virtual

Return the tick rate on all channels (rx and tx).

Returns
The tick rate.

◆ get_rx_antenna()

virtual std::string uhd::rfnoc::radio_ctrl::get_rx_antenna ( const size_t  chan)
pure virtual

Return the selected RX antenna for channel chan.

Returns
The selected antenna.

◆ get_rx_bandwidth()

virtual double uhd::rfnoc::radio_ctrl::get_rx_bandwidth ( const size_t  chan)
pure virtual

Return the analog filter bandwidth channel chan

Returns
The actual bandwidth value

◆ get_rx_frequency()

virtual double uhd::rfnoc::radio_ctrl::get_rx_frequency ( const size_t  chan)
pure virtual

Return the current receive LO frequency on channel chan.

Returns
The current LO frequency.

◆ get_rx_gain()

virtual double uhd::rfnoc::radio_ctrl::get_rx_gain ( const size_t  chan)
pure virtual

Return the transmit gain on channel chan

Returns
The actual gain value

◆ get_rx_lo_export_enabled()

virtual bool uhd::rfnoc::radio_ctrl::get_rx_lo_export_enabled ( const std::string &  name,
const size_t  chan 
)
pure virtual

Returns true if the currently selected LO is being exported.

Parameters
namethe name of the LO stage to query
chanthe channel index 0 to N-1

◆ get_rx_lo_freq()

virtual double uhd::rfnoc::radio_ctrl::get_rx_lo_freq ( const std::string &  name,
const size_t  chan 
)
pure virtual

Get the current RX LO frequency (Advanced). If the channel does not have independently configurable LOs the current rf frequency will be returned.

Parameters
namethe name of the LO stage to query
chanthe channel index 0 to N-1
Returns
the configured LO frequency

◆ get_rx_lo_freq_range()

virtual freq_range_t uhd::rfnoc::radio_ctrl::get_rx_lo_freq_range ( const std::string &  name,
const size_t  chan 
)
pure virtual

Get the LO frequency range of the RX LO. If the channel does not have independently configurable LOs the rf frequency range will be returned.

Parameters
namethe name of the LO stage to query
chanthe channel index 0 to N-1
Returns
a frequency range object

◆ get_rx_lo_names()

virtual std::vector<std::string> uhd::rfnoc::radio_ctrl::get_rx_lo_names ( const size_t  chan)
pure virtual

Get a list of possible LO stage names

Parameters
chanthe channel index 0 to N-1
Returns
a vector of strings for possible LO names

◆ get_rx_lo_source()

virtual const std::string uhd::rfnoc::radio_ctrl::get_rx_lo_source ( const std::string &  name,
const size_t  chan 
)
pure virtual

Get the currently set LO source. Channels without controllable LO sources will return "internal"

Parameters
namethe name of the LO stage to query
chanthe channel index 0 to N-1
Returns
the configured LO source

◆ get_rx_lo_sources()

virtual std::vector<std::string> uhd::rfnoc::radio_ctrl::get_rx_lo_sources ( const std::string &  name,
const size_t  chan 
)
pure virtual

Get a list of possible LO sources.

Channels which do not have controllable LO sources will return "internal".

Parameters
namethe name of the LO stage to query
chanthe channel index 0 to N-1
Returns
a vector of strings for possible settings

◆ get_time_last_pps()

virtual time_spec_t uhd::rfnoc::radio_ctrl::get_time_last_pps ( )
pure virtual

Get the time when the last PPS pulse occurred.

Returns
A timespec representing the last PPS

◆ get_time_now()

virtual time_spec_t uhd::rfnoc::radio_ctrl::get_time_now ( )
pure virtual

Get the current time in the timekeeper registers.

Note that there is a non-deterministic delay between the time the register is read and the time the function value is returned. To get the time with respect to a tick edge, use get_time_last_pps().

Returns
A timespec representing current radio time

◆ get_time_source()

virtual std::string uhd::rfnoc::radio_ctrl::get_time_source ( )
pure virtual

Get the currently set time source.

Returns
the string representing the time source

◆ get_time_sources()

virtual std::vector<std::string> uhd::rfnoc::radio_ctrl::get_time_sources ( )
pure virtual

Get a list of possible time sources.

Returns
a vector of strings for possible settings

◆ get_tx_antenna()

virtual std::string uhd::rfnoc::radio_ctrl::get_tx_antenna ( const size_t  chan)
pure virtual

Return the selected TX antenna for channel chan.

Returns
The selected antenna.

◆ get_tx_bandwidth()

virtual double uhd::rfnoc::radio_ctrl::get_tx_bandwidth ( const size_t  chan)
pure virtual

Return the analog filter bandwidth channel chan

Returns
The actual bandwidth value

◆ get_tx_frequency()

virtual double uhd::rfnoc::radio_ctrl::get_tx_frequency ( const size_t  chan)
pure virtual

Return the current transmit LO frequency on channel chan.

Note that the AD9361 only has one LO for all TX channels, and the chan parameter is thus only for API compatibility.

Returns
The current LO frequency.

◆ get_tx_gain()

virtual double uhd::rfnoc::radio_ctrl::get_tx_gain ( const size_t  chan)
pure virtual

Return the transmit gain on channel chan

Returns
The actual gain value

◆ get_tx_lo_export_enabled()

virtual bool uhd::rfnoc::radio_ctrl::get_tx_lo_export_enabled ( const std::string &  name,
const size_t  chan 
)
pure virtual

Returns true if the currently selected LO is being exported.

Parameters
namethe name of the LO stage to query
chanthe channel index 0 to N-1

◆ get_tx_lo_freq()

virtual double uhd::rfnoc::radio_ctrl::get_tx_lo_freq ( const std::string &  name,
const size_t  chan 
)
pure virtual

Get the current TX LO frequency (Advanced).

See also multi_usrp::get_tx_lo_freq()

If the channel does not have independently configurable LOs the current RF frequency will be returned.

Parameters
namethe name of the LO stage to query
chanthe channel index 0 to N-1
Returns
the configured LO frequency

◆ get_tx_lo_freq_range()

virtual freq_range_t uhd::rfnoc::radio_ctrl::get_tx_lo_freq_range ( const std::string &  name,
const size_t  chan 
)
pure virtual

Get the LO frequency range of the tx LO. If the channel does not have independently configurable LOs the rf frequency range will be returned.

Parameters
namethe name of the LO stage to query
chanthe channel index 0 to N-1
Returns
a frequency range object

◆ get_tx_lo_names()

virtual std::vector<std::string> uhd::rfnoc::radio_ctrl::get_tx_lo_names ( const size_t  chan)
pure virtual

Get a list of possible LO stage names

Parameters
chanthe channel index 0 to N-1
Returns
a vector of strings for possible LO names

◆ get_tx_lo_source()

virtual const std::string uhd::rfnoc::radio_ctrl::get_tx_lo_source ( const std::string &  name,
const size_t  chan 
)
pure virtual

Get the currently set LO source. Channels without controllable LO sources will return "internal"

Parameters
namethe name of the LO stage to query
chanthe channel index 0 to N-1
Returns
the configured LO source

◆ get_tx_lo_sources()

virtual std::vector<std::string> uhd::rfnoc::radio_ctrl::get_tx_lo_sources ( const std::string &  name,
const size_t  chan 
)
pure virtual

Get a list of possible LO sources.

Channels which do not have controllable LO sources will return "internal".

Parameters
namethe name of the LO stage to query
chanthe channel index 0 to N-1
Returns
a vector of strings for possible settings

◆ set_clock_source()

virtual void uhd::rfnoc::radio_ctrl::set_clock_source ( const std::string &  source)
pure virtual

Set the clock source for the usrp device (for reference clock).

Typical options for source: internal, external.

Parameters
sourcea string representing the clock source

◆ set_gpio_attr()

virtual void uhd::rfnoc::radio_ctrl::set_gpio_attr ( const std::string &  bank,
const std::string &  attr,
const uint32_t  value,
const uint32_t  mask 
)
pure virtual

Set a GPIO attribute on a particular GPIO bank. Possible attribute names:

  • CTRL - 1 for ATR mode 0 for GPIO mode
  • DDR - 1 for output 0 for input
  • OUT - GPIO output level (not ATR mode)
  • ATR_0X - ATR idle state
  • ATR_RX - ATR receive only state
  • ATR_TX - ATR transmit only state
  • ATR_XX - ATR full duplex state
    Parameters
    bankthe name of a GPIO bank (e.g., FP0)
    attrthe name of a GPIO attribute (e.g., CTRL)
    valuethe new value for this GPIO bank
    maskthe bit mask to effect which pins are changed

◆ set_rate()

virtual double uhd::rfnoc::radio_ctrl::set_rate ( double  rate)
pure virtual

Set the tick/sample rate on all channels (rx and tx).

Will coerce to the nearest possible rate and return the actual value.

◆ set_rx_antenna()

virtual void uhd::rfnoc::radio_ctrl::set_rx_antenna ( const std::string &  ant,
const size_t  chan 
)
pure virtual

Select RX antenna for channel chan.

Exceptions
uhd::value_errorif ant is not a valid value.

◆ set_rx_bandwidth()

virtual double uhd::rfnoc::radio_ctrl::set_rx_bandwidth ( const double  bandwidth,
const size_t  chan 
)
pure virtual

Set the analog filter bandwidth channel chan

This function will attempt to set the analog bandwidth.

Returns
The actual bandwidth value

◆ set_rx_frequency()

virtual double uhd::rfnoc::radio_ctrl::set_rx_frequency ( const double  freq,
const size_t  chan 
)
pure virtual

Tune the RX LO for channel chan.

This function will attempt to tune as close as possible, and return a coerced value of the actual tuning result.

Parameters
freqRequested LO frequency
chanChannel number.
Returns
The actual LO frequency.

◆ set_rx_gain()

virtual double uhd::rfnoc::radio_ctrl::set_rx_gain ( const double  gain,
const size_t  chan 
)
pure virtual

Set the transmit gain on channel chan

This function will attempt to set the gain as close as possible, and return a coerced value of the actual gain value.

Returns
The actual gain value

◆ set_rx_lo_export_enabled()

virtual void uhd::rfnoc::radio_ctrl::set_rx_lo_export_enabled ( bool  enabled,
const std::string &  name,
const size_t  chan 
)
pure virtual

Set whether the LO used by the usrp device is exported For usrps that support exportable LOs, this function configures if the LO used by chan is exported or not.

Parameters
enabledif true then export the LO
namethe name of the LO stage to update
chanthe channel index 0 to N-1 for the source channel

◆ set_rx_lo_freq()

virtual double uhd::rfnoc::radio_ctrl::set_rx_lo_freq ( double  freq,
const std::string &  name,
const size_t  chan 
)
pure virtual

Set the RX LO frequency (Advanced).

Parameters
freqthe frequency to set the LO to
namethe name of the LO stage to update
chanthe channel index 0 to N-1
Returns
a coerced LO frequency

◆ set_rx_lo_source()

virtual void uhd::rfnoc::radio_ctrl::set_rx_lo_source ( const std::string &  src,
const std::string &  name,
const size_t  chan 
)
pure virtual

Set the LO source for a channel. For usrps that support selectable LOs, this function allows switching between them. Typical options for source: internal, external.

Parameters
srca string representing the LO source
namethe name of the LO stage to update
chanthe channel index 0 to N-1

◆ set_time_next_pps()

virtual void uhd::rfnoc::radio_ctrl::set_time_next_pps ( const time_spec_t time_spec)
pure virtual

Set the time registers at the next pps tick.

The values will not be latched in until the pulse occurs. It is recommended that the user sleep(1) after calling to ensure that the time registers will be in a known state prior to use.

Note: Because this call sets the time on the "next" pps, the seconds in the time spec should be current seconds + 1.

Parameters
time_specthe time to latch into the timekeeper

◆ set_time_now()

virtual void uhd::rfnoc::radio_ctrl::set_time_now ( const time_spec_t time_spec)
pure virtual

Sets the time in the radio's timekeeper to the given value.

Note that there is a non-deterministic delay between calling this function and the valung written to the register. For setting the time in alignment with a certain reference time, use set_time_next_pps().

◆ set_time_source()

virtual void uhd::rfnoc::radio_ctrl::set_time_source ( const std::string &  source)
pure virtual

Set the time source for this radio.

May affect other radio blocks.

Parameters
sourceA string representing the time source
Exceptions
uhd::value_errorif the value can't be applied

◆ set_tx_antenna()

virtual void uhd::rfnoc::radio_ctrl::set_tx_antenna ( const std::string &  ant,
const size_t  chan 
)
pure virtual

Select RX antenna for channel chan.

Exceptions
uhd::value_errorif ant is not a valid value.

◆ set_tx_bandwidth()

virtual double uhd::rfnoc::radio_ctrl::set_tx_bandwidth ( const double  bandwidth,
const size_t  chan 
)
pure virtual

Set the analog filter bandwidth channel chan

This function will attempt to set the analog bandwidth.

Returns
The actual bandwidth value

◆ set_tx_frequency()

virtual double uhd::rfnoc::radio_ctrl::set_tx_frequency ( const double  freq,
size_t  chan 
)
pure virtual

Tune the TX LO for channel chan.

This function will attempt to tune as close as possible, and return a coerced value of the actual tuning result.

Parameters
freqFrequency in Hz
chanChannel to tune
Returns
The actual LO frequency.

◆ set_tx_gain()

virtual double uhd::rfnoc::radio_ctrl::set_tx_gain ( const double  gain,
const size_t  chan 
)
pure virtual

Set the transmit gain on channel chan

This function will attempt to set the gain as close as possible, and return a coerced value of the actual gain value.

Returns
The actual gain value

◆ set_tx_lo_export_enabled()

virtual void uhd::rfnoc::radio_ctrl::set_tx_lo_export_enabled ( const bool  enabled,
const std::string &  name,
const size_t  chan 
)
pure virtual

Set whether the LO used by the usrp device is exported For usrps that support exportable LOs, this function configures if the LO used by chan is exported or not.

Parameters
enabledif true then export the LO
namethe name of the LO stage to update
chanthe channel index 0 to N-1 for the source channel

◆ set_tx_lo_freq()

virtual double uhd::rfnoc::radio_ctrl::set_tx_lo_freq ( const double  freq,
const std::string &  name,
const size_t  chan 
)
pure virtual

Set the tx LO frequency (Advanced).

See also multi_usrp::set_tx_lo_freq().

Parameters
freqthe frequency to set the LO to
namethe name of the LO stage to update
chanthe channel index 0 to N-1
Returns
a coerced LO frequency

◆ set_tx_lo_source()

virtual void uhd::rfnoc::radio_ctrl::set_tx_lo_source ( const std::string &  src,
const std::string &  name,
const size_t  chan 
)
pure virtual

Set the LO source for a channel. For usrps that support selectable LOs, this function allows switching between them. Typical options for source: internal, external.

Parameters
srca string representing the LO source
namethe name of the LO stage to update
chanthe channel index 0 to N-1

Member Data Documentation

◆ ALL_CHANS

const size_t uhd::rfnoc::radio_ctrl::ALL_CHANS = size_t(~0)
static

A wildcard channel index.

◆ ALL_GAINS

const std::string uhd::rfnoc::radio_ctrl::ALL_GAINS
static

A wildcard gain element name.

◆ ALL_LOS

const std::string uhd::rfnoc::radio_ctrl::ALL_LOS
static

A wildcard local oscillator element name.


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