USRP Hardware Driver and USRP Manual  Version: 3.13.0.HEAD-0-gf114cfa0
UHD and USRP Manual
uhd::usrp::multi_usrp Class Referenceabstract

#include <uhd/usrp/multi_usrp.hpp>

Inheritance diagram for uhd::usrp::multi_usrp:

Classes

struct  register_info_t
 

Public Types

typedef boost::shared_ptr< multi_usrpsptr
 

Public Member Functions

virtual ~multi_usrp (void)=0
 
virtual device::sptr get_device (void)=0
 
virtual bool is_device3 (void)=0
 
virtual boost::shared_ptr< uhd::device3get_device3 (void)=0
 
virtual rx_streamer::sptr get_rx_stream (const stream_args_t &args)=0
 Convenience method to get a RX streamer. See also uhd::device::get_rx_stream(). More...
 
virtual tx_streamer::sptr get_tx_stream (const stream_args_t &args)=0
 Convenience method to get a TX streamer. See also uhd::device::get_rx_stream(). More...
 
virtual dict< std::string, std::string > get_usrp_rx_info (size_t chan=0)=0
 
virtual dict< std::string, std::string > get_usrp_tx_info (size_t chan=0)=0
 
virtual void set_master_clock_rate (double rate, size_t mboard=ALL_MBOARDS)=0
 
virtual double get_master_clock_rate (size_t mboard=0)=0
 
virtual meta_range_t get_master_clock_rate_range (const size_t mboard=0)=0
 
virtual std::string get_pp_string (void)=0
 
virtual std::string get_mboard_name (size_t mboard=0)=0
 
virtual time_spec_t get_time_now (size_t mboard=0)=0
 
virtual time_spec_t get_time_last_pps (size_t mboard=0)=0
 
virtual void set_time_now (const time_spec_t &time_spec, size_t mboard=ALL_MBOARDS)=0
 
virtual void set_time_next_pps (const time_spec_t &time_spec, size_t mboard=ALL_MBOARDS)=0
 
virtual void set_time_unknown_pps (const time_spec_t &time_spec)=0
 
virtual bool get_time_synchronized (void)=0
 
virtual void set_command_time (const uhd::time_spec_t &time_spec, size_t mboard=ALL_MBOARDS)=0
 
virtual void clear_command_time (size_t mboard=ALL_MBOARDS)=0
 
virtual void issue_stream_cmd (const stream_cmd_t &stream_cmd, size_t chan=ALL_CHANS)=0
 
virtual void set_clock_config (const clock_config_t &clock_config, size_t mboard=ALL_MBOARDS)=0
 
virtual void set_time_source (const std::string &source, const size_t mboard=ALL_MBOARDS)=0
 
virtual std::string get_time_source (const size_t mboard)=0
 
virtual std::vector< std::string > get_time_sources (const size_t mboard)=0
 
virtual void set_clock_source (const std::string &source, const size_t mboard=ALL_MBOARDS)=0
 
virtual std::string get_clock_source (const size_t mboard)=0
 
virtual std::vector< std::string > get_clock_sources (const size_t mboard)=0
 
virtual void set_clock_source_out (const bool enb, const size_t mboard=ALL_MBOARDS)=0
 
virtual void set_time_source_out (const bool enb, const size_t mboard=ALL_MBOARDS)=0
 
virtual size_t get_num_mboards (void)=0
 
virtual sensor_value_t get_mboard_sensor (const std::string &name, size_t mboard=0)=0
 
virtual std::vector< std::string > get_mboard_sensor_names (size_t mboard=0)=0
 
virtual void set_user_register (const uint8_t addr, const uint32_t data, size_t mboard=ALL_MBOARDS)=0
 
virtual void set_rx_subdev_spec (const uhd::usrp::subdev_spec_t &spec, size_t mboard=ALL_MBOARDS)=0
 
virtual uhd::usrp::subdev_spec_t get_rx_subdev_spec (size_t mboard=0)=0
 
virtual size_t get_rx_num_channels (void)=0
 
virtual std::string get_rx_subdev_name (size_t chan=0)=0
 
virtual void set_rx_rate (double rate, size_t chan=ALL_CHANS)=0
 
virtual double get_rx_rate (size_t chan=0)=0
 
virtual meta_range_t get_rx_rates (size_t chan=0)=0
 
virtual tune_result_t set_rx_freq (const tune_request_t &tune_request, size_t chan=0)=0
 
virtual double get_rx_freq (size_t chan=0)=0
 
virtual freq_range_t get_rx_freq_range (size_t chan=0)=0
 
virtual freq_range_t get_fe_rx_freq_range (size_t chan=0)=0
 
virtual std::vector< std::string > get_rx_lo_names (size_t chan=0)=0
 
virtual void set_rx_lo_source (const std::string &src, const std::string &name=ALL_LOS, size_t chan=0)=0
 
virtual const std::string get_rx_lo_source (const std::string &name=ALL_LOS, size_t chan=0)=0
 
virtual std::vector< std::string > get_rx_lo_sources (const std::string &name=ALL_LOS, size_t chan=0)=0
 
virtual void set_rx_lo_export_enabled (bool enabled, const std::string &name=ALL_LOS, size_t chan=0)=0
 
virtual bool get_rx_lo_export_enabled (const std::string &name=ALL_LOS, size_t chan=0)=0
 
virtual double set_rx_lo_freq (double freq, const std::string &name, size_t chan=0)=0
 
virtual double get_rx_lo_freq (const std::string &name, size_t chan=0)=0
 
virtual freq_range_t get_rx_lo_freq_range (const std::string &name, size_t chan=0)=0
 
virtual std::vector< std::string > get_tx_lo_names (size_t chan=0)=0
 
virtual void set_tx_lo_source (const std::string &src, const std::string &name=ALL_LOS, const size_t chan=0)=0
 
virtual const std::string get_tx_lo_source (const std::string &name=ALL_LOS, const size_t chan=0)=0
 
virtual std::vector< std::string > get_tx_lo_sources (const std::string &name=ALL_LOS, const size_t chan=0)=0
 
virtual void set_tx_lo_export_enabled (const bool enabled, const std::string &name=ALL_LOS, const size_t chan=0)=0
 
virtual bool get_tx_lo_export_enabled (const std::string &name=ALL_LOS, const size_t chan=0)=0
 
virtual double set_tx_lo_freq (const double freq, const std::string &name, const size_t chan=0)=0
 
virtual double get_tx_lo_freq (const std::string &name, const size_t chan=0)=0
 
virtual freq_range_t get_tx_lo_freq_range (const std::string &name, const size_t chan=0)=0
 
virtual void set_rx_gain (double gain, const std::string &name, size_t chan=0)=0
 
virtual std::vector< std::string > get_rx_gain_profile_names (const size_t chan=0)=0
 
virtual void set_rx_gain_profile (const std::string &profile, const size_t chan=0)=0
 
virtual std::string get_rx_gain_profile (const size_t chan=0)=0
 
void set_rx_gain (double gain, size_t chan=0)
 A convenience wrapper for setting overall RX gain. More...
 
virtual void set_normalized_rx_gain (double gain, size_t chan=0)=0
 
virtual void set_rx_agc (bool enable, size_t chan=0)=0
 
virtual double get_rx_gain (const std::string &name, size_t chan=0)=0
 
double get_rx_gain (size_t chan=0)
 A convenience wrapper for getting overall RX gain. More...
 
virtual double get_normalized_rx_gain (size_t chan=0)=0
 
virtual gain_range_t get_rx_gain_range (const std::string &name, size_t chan=0)=0
 
gain_range_t get_rx_gain_range (size_t chan=0)
 A convenience wrapper for getting overall RX gain range. More...
 
virtual std::vector< std::string > get_rx_gain_names (size_t chan=0)=0
 
virtual void set_rx_antenna (const std::string &ant, size_t chan=0)=0
 
virtual std::string get_rx_antenna (size_t chan=0)=0
 
virtual std::vector< std::string > get_rx_antennas (size_t chan=0)=0
 
virtual void set_rx_bandwidth (double bandwidth, size_t chan=0)=0
 
virtual double get_rx_bandwidth (size_t chan=0)=0
 
virtual meta_range_t get_rx_bandwidth_range (size_t chan=0)=0
 
virtual dboard_iface::sptr get_rx_dboard_iface (size_t chan=0)=0
 
virtual sensor_value_t get_rx_sensor (const std::string &name, size_t chan=0)=0
 
virtual std::vector< std::string > get_rx_sensor_names (size_t chan=0)=0
 
virtual void set_rx_dc_offset (const bool enb, size_t chan=ALL_CHANS)=0
 
virtual void set_rx_dc_offset (const std::complex< double > &offset, size_t chan=ALL_CHANS)=0
 
virtual meta_range_t get_rx_dc_offset_range (size_t chan=ALL_CHANS)=0
 
virtual void set_rx_iq_balance (const bool enb, size_t chan)=0
 
virtual void set_rx_iq_balance (const std::complex< double > &correction, size_t chan=ALL_CHANS)=0
 
virtual void set_tx_subdev_spec (const uhd::usrp::subdev_spec_t &spec, size_t mboard=ALL_MBOARDS)=0
 
virtual uhd::usrp::subdev_spec_t get_tx_subdev_spec (size_t mboard=0)=0
 
virtual size_t get_tx_num_channels (void)=0
 
virtual std::string get_tx_subdev_name (size_t chan=0)=0
 
virtual void set_tx_rate (double rate, size_t chan=ALL_CHANS)=0
 
virtual double get_tx_rate (size_t chan=0)=0
 
virtual meta_range_t get_tx_rates (size_t chan=0)=0
 
virtual tune_result_t set_tx_freq (const tune_request_t &tune_request, size_t chan=0)=0
 
virtual double get_tx_freq (size_t chan=0)=0
 
virtual freq_range_t get_tx_freq_range (size_t chan=0)=0
 
virtual freq_range_t get_fe_tx_freq_range (size_t chan=0)=0
 
virtual void set_tx_gain (double gain, const std::string &name, size_t chan=0)=0
 
virtual std::vector< std::string > get_tx_gain_profile_names (const size_t chan=0)=0
 
virtual void set_tx_gain_profile (const std::string &profile, const size_t chan=0)=0
 
virtual std::string get_tx_gain_profile (const size_t chan=0)=0
 
void set_tx_gain (double gain, size_t chan=0)
 A convenience wrapper for setting overall TX gain. More...
 
virtual void set_normalized_tx_gain (double gain, size_t chan=0)=0
 
virtual double get_tx_gain (const std::string &name, size_t chan=0)=0
 
double get_tx_gain (size_t chan=0)
 A convenience wrapper for getting overall TX gain. More...
 
virtual double get_normalized_tx_gain (size_t chan=0)=0
 
virtual gain_range_t get_tx_gain_range (const std::string &name, size_t chan=0)=0
 
gain_range_t get_tx_gain_range (size_t chan=0)
 A convenience wrapper for getting overall TX gain range. More...
 
virtual std::vector< std::string > get_tx_gain_names (size_t chan=0)=0
 
virtual void set_tx_antenna (const std::string &ant, size_t chan=0)=0
 
virtual std::string get_tx_antenna (size_t chan=0)=0
 
virtual std::vector< std::string > get_tx_antennas (size_t chan=0)=0
 
virtual void set_tx_bandwidth (double bandwidth, size_t chan=0)=0
 
virtual double get_tx_bandwidth (size_t chan=0)=0
 
virtual meta_range_t get_tx_bandwidth_range (size_t chan=0)=0
 
virtual dboard_iface::sptr get_tx_dboard_iface (size_t chan=0)=0
 
virtual sensor_value_t get_tx_sensor (const std::string &name, size_t chan=0)=0
 
virtual std::vector< std::string > get_tx_sensor_names (size_t chan=0)=0
 
virtual void set_tx_dc_offset (const std::complex< double > &offset, size_t chan=ALL_CHANS)=0
 
virtual meta_range_t get_tx_dc_offset_range (size_t chan=ALL_CHANS)=0
 
virtual void set_tx_iq_balance (const std::complex< double > &correction, size_t chan=ALL_CHANS)=0
 
virtual std::vector< std::string > get_gpio_banks (const size_t mboard)=0
 
virtual void set_gpio_attr (const std::string &bank, const std::string &attr, const uint32_t value, const uint32_t mask=0xffffffff, const size_t mboard=0)=0
 
virtual void set_gpio_attr (const std::string &bank, const std::string &attr, const std::string &value, const uint32_t mask=0xffffffff, const size_t mboard=0)=0
 
virtual uint32_t get_gpio_attr (const std::string &bank, const std::string &attr, const size_t mboard=0)=0
 
virtual std::vector< std::string > get_gpio_string_attr (const std::string &bank, const std::string &attr, const size_t mboard=0)=0
 
virtual std::vector< std::string > enumerate_registers (const size_t mboard=0)=0
 
virtual register_info_t get_register_info (const std::string &path, const size_t mboard=0)=0
 
virtual void write_register (const std::string &path, const uint32_t field, const uint64_t value, const size_t mboard=0)=0
 
virtual uint64_t read_register (const std::string &path, const uint32_t field, const size_t mboard=0)=0
 
virtual std::vector< std::string > get_filter_names (const std::string &search_mask="")=0
 
virtual filter_info_base::sptr get_filter (const std::string &path)=0
 
virtual void set_filter (const std::string &path, filter_info_base::sptr filter)=0
 

Static Public Member Functions

static sptr make (const device_addr_t &dev_addr)
 

Static Public Attributes

static const size_t ALL_MBOARDS = size_t(~0)
 A wildcard motherboard index. More...
 
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 LO stage name. More...
 

Detailed Description

The Multi-USRP device class:

This class facilitates ease-of-use for most use-case scenarios. The wrapper provides convenience functions to tune the devices, set the dboard gains, antennas, filters, and other properties. This class can be used to interface with a single USRP with one or more channels, or multiple USRPs in a homogeneous setup. All members take an optional parameter for board number or channel number. In the single device, single channel case, these parameters can be unspecified.

When using a single device with multiple channels:

  • Channel mapping is determined by the frontend specifications
  • All channels share a common RX sample rate
  • All channels share a common TX sample rate

When using multiple devices in a configuration:

  • Channel mapping is determined by the device address arguments
  • All boards share a common RX sample rate
  • All boards share a common TX sample rate
  • All boards share a common RX frontend specification size
  • All boards share a common TX frontend specification size
  • All boards must have synchronized times (see the set_time_*() calls)

Example to setup channel mapping for multiple devices:

//create a multi_usrp with two boards in the configuration
device_addr_t dev_addr;
dev_addr["addr0"] = "192.168.10.2"
dev_addr["addr1"] = "192.168.10.3";
multi_usrp::sptr dev = multi_usrp::make(dev_addr);
//set the board on 10.2 to use the A RX frontend (RX channel 0)
dev->set_rx_subdev_spec("A:A", 0);
//set the board on 10.3 to use the B RX frontend (RX channel 1)
dev->set_rx_subdev_spec("A:B", 1);
//set both boards to use the AB TX frontend (TX channels 0 and 1)
dev->set_tx_subdev_spec("A:AB", multi_usrp::ALL_MBOARDS);
//now that all the channels are mapped, continue with configuration...
 

Member Typedef Documentation

◆ sptr

typedef boost::shared_ptr<multi_usrp> uhd::usrp::multi_usrp::sptr

Constructor & Destructor Documentation

◆ ~multi_usrp()

virtual uhd::usrp::multi_usrp::~multi_usrp ( void  )
pure virtual

Member Function Documentation

◆ clear_command_time()

virtual void uhd::usrp::multi_usrp::clear_command_time ( size_t  mboard = ALL_MBOARDS)
pure virtual

Clear the command time so future commands are sent ASAP.

Parameters
mboardwhich motherboard to set the config

◆ enumerate_registers()

virtual std::vector<std::string> uhd::usrp::multi_usrp::enumerate_registers ( const size_t  mboard = 0)
pure virtual

Enumerate the full paths of all low-level USRP registers accessible to read/write

Parameters
mboardthe motherboard index 0 to M-1
Returns
a vector of register paths

◆ get_clock_source()

virtual std::string uhd::usrp::multi_usrp::get_clock_source ( const size_t  mboard)
pure virtual

Get the currently set clock source.

Parameters
mboardwhich motherboard to get the config
Returns
the string representing the clock source

◆ get_clock_sources()

virtual std::vector<std::string> uhd::usrp::multi_usrp::get_clock_sources ( const size_t  mboard)
pure virtual

Get a list of possible clock sources.

Parameters
mboardwhich motherboard to get the list
Returns
a vector of strings for possible settings

◆ get_device()

virtual device::sptr uhd::usrp::multi_usrp::get_device ( void  )
pure virtual

Get the underlying device object. This is needed to get access to the streaming API and properties.

Returns
the device object within this USRP

◆ get_device3()

virtual boost::shared_ptr<uhd::device3> uhd::usrp::multi_usrp::get_device3 ( void  )
pure virtual

Get the underlying device3 object. Only works for generation-3 (or later) devices.

This is needed to get access to the streaming API and properties.

Returns
The uhd::device3 object for this USRP.
Exceptions
uhd::type_errorif this device is not actually a generation-3 device.

◆ get_fe_rx_freq_range()

virtual freq_range_t uhd::usrp::multi_usrp::get_fe_rx_freq_range ( size_t  chan = 0)
pure virtual

Get the center frequency range of the RF frontend.

Parameters
chanthe channel index 0 to N-1
Returns
a frequency range object

◆ get_fe_tx_freq_range()

virtual freq_range_t uhd::usrp::multi_usrp::get_fe_tx_freq_range ( size_t  chan = 0)
pure virtual

Get the center frequency range of the TX frontend.

Parameters
chanthe channel index 0 to N-1
Returns
a frequency range object

◆ get_filter()

virtual filter_info_base::sptr uhd::usrp::multi_usrp::get_filter ( const std::string &  path)
pure virtual

Return the filter object for the given name.

Parameters
paththe name of the filter as returned from get_filter_names().
Returns
a filter_info_base::sptr.

◆ get_filter_names()

virtual std::vector<std::string> uhd::usrp::multi_usrp::get_filter_names ( const std::string &  search_mask = "")
pure virtual

Enumerate the available filters in the signal path.

Parameters
search_mask

Select only certain filter names by specifying this search mask.

E.g. if search mask is set to "rx_frontends/A" only filter names including that string will be returned.

Returns
a vector of strings representing the selected filter names.

◆ get_gpio_attr()

virtual uint32_t uhd::usrp::multi_usrp::get_gpio_attr ( const std::string &  bank,
const std::string &  attr,
const size_t  mboard = 0 
)
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
    mboardthe motherboard index 0 to M-1
    Returns
    the value set for this attribute

◆ get_gpio_banks()

virtual std::vector<std::string> uhd::usrp::multi_usrp::get_gpio_banks ( const size_t  mboard)
pure virtual

Enumerate gpio banks on the specified device.

Parameters
mboardthe motherboard index 0 to M-1
Returns
a list of string for each bank name

◆ get_gpio_string_attr()

virtual std::vector<std::string> uhd::usrp::multi_usrp::get_gpio_string_attr ( const std::string &  bank,
const std::string &  attr,
const size_t  mboard = 0 
)
pure virtual

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

  • SRC - "PS" for handling by processing system
    • "RADIO_N/M" for handling by radio block with N is in [0..Number of Radio]; M is in [0..Number of port per Radio]
  • CTRL - "ATR" for ATR mode
    • "GPIO" for GPIO mode
  • DDR - "OUT" for output
    • "IN" for input
  • OUT - a string of numbers representing GPIO output level (not ATR mode)
    • "HIGH"or "LOW" as GPIO output level that apply for each bit mask that is 1
  • ATR_0X - a string of numbers representing a value of the ATR idle state register
    • "HIGH" or "LOW" as a value set on each bit on of the ATR idle state register
  • ATR_RX - a string of numbers representing a value of a ATR receive only state register
    • "HIGH" or "LOW" as a value set on each bit on of the ATR receive only state register
  • ATR_TX - a string of numbers representing a value of the ATR transmit only state register
    • "HIGH" or "LOW" as a value set on each bit on of the ATR transmit only state register
  • ATR_XX - a string of numbers representing a value of the ATR full duplex state register
    • "HIGH" or "LOW" as a value set on each bit on of the ATR full duplex state register
  • READBACK - readback input GPIOs
    Parameters
    bankthe name of a GPIO bank
    attrthe name of a GPIO attribute
    mboardthe motherboard index 0 to M-1
    Returns
    the value set for this attribute in vector of strings

◆ get_master_clock_rate()

virtual double uhd::usrp::multi_usrp::get_master_clock_rate ( size_t  mboard = 0)
pure virtual

Get the master clock rate.

Parameters
mboardthe motherboard index 0 to M-1
Returns
the master clock rate in Hz.

◆ get_master_clock_rate_range()

virtual meta_range_t uhd::usrp::multi_usrp::get_master_clock_rate_range ( const size_t  mboard = 0)
pure virtual

Return the range within which the master clock rate can be set for this session

Note that many USRPs do not actually support setting the master clock rate during a running session. In this case, the range will consist of a single value, which is the current master clock rate. Values from this range are valid/sensible inputs to set_master_clock_rate(), although keep in mind that the latter coerces.

Examples:

  • The B200 series' master clock rate can be changed at runtime and will report the true range of supported values
  • The X300 series has two discrete options for the clock rate, but will always return the clock rate which the USRP was initialized to because it cannot be changed at runtime
  • The N200 series does not have a configurable clock rate, and will always return the same single value as a range

◆ get_mboard_name()

virtual std::string uhd::usrp::multi_usrp::get_mboard_name ( size_t  mboard = 0)
pure virtual

Get canonical name for this USRP motherboard.

Parameters
mboardwhich motherboard to query
Returns
a string representing the name

◆ get_mboard_sensor()

virtual sensor_value_t uhd::usrp::multi_usrp::get_mboard_sensor ( const std::string &  name,
size_t  mboard = 0 
)
pure virtual

Get a motherboard sensor value.

Parameters
namethe name of the sensor
mboardthe motherboard index 0 to M-1
Returns
a sensor value object

◆ get_mboard_sensor_names()

virtual std::vector<std::string> uhd::usrp::multi_usrp::get_mboard_sensor_names ( size_t  mboard = 0)
pure virtual

Get a list of possible motherboard sensor names.

Parameters
mboardthe motherboard index 0 to M-1
Returns
a vector of sensor names

◆ get_normalized_rx_gain()

virtual double uhd::usrp::multi_usrp::get_normalized_rx_gain ( size_t  chan = 0)
pure virtual

Return the normalized RX gain value.

See set_normalized_rx_gain() for a discussion of normalized gains.

Parameters
chanthe channel index 0 to N-1
Returns
The normalized gain (in [0, 1])
Exceptions
Auhd::runtime_error if the gain value is outside [0, 1].

◆ get_normalized_tx_gain()

virtual double uhd::usrp::multi_usrp::get_normalized_tx_gain ( size_t  chan = 0)
pure virtual

Return the normalized TX gain value.

See set_normalized_rx_gain() for a discussion of normalized gains.

Parameters
chanthe channel index 0 to N-1
Returns
The normalized gain (in [0, 1])
Exceptions
Auhd::runtime_error if the gain value is outside [0, 1].

◆ get_num_mboards()

virtual size_t uhd::usrp::multi_usrp::get_num_mboards ( void  )
pure virtual

Get the number of USRP motherboards in this configuration.

◆ get_pp_string()

virtual std::string uhd::usrp::multi_usrp::get_pp_string ( void  )
pure virtual

Get a printable summary for this USRP configuration.

Returns
a printable string

◆ get_register_info()

virtual register_info_t uhd::usrp::multi_usrp::get_register_info ( const std::string &  path,
const size_t  mboard = 0 
)
pure virtual

Get more information about a low-level device register

Parameters
paththe full path to the register
mboardthe motherboard index 0 to M-1
Returns
the info struct which contains the bitwidth and read-write access information

◆ get_rx_antenna()

virtual std::string uhd::usrp::multi_usrp::get_rx_antenna ( size_t  chan = 0)
pure virtual

Get the selected RX antenna on the frontend.

Parameters
chanthe channel index 0 to N-1
Returns
the antenna name

◆ get_rx_antennas()

virtual std::vector<std::string> uhd::usrp::multi_usrp::get_rx_antennas ( size_t  chan = 0)
pure virtual

Get a list of possible RX antennas on the frontend.

Parameters
chanthe channel index 0 to N-1
Returns
a vector of antenna names

◆ get_rx_bandwidth()

virtual double uhd::usrp::multi_usrp::get_rx_bandwidth ( size_t  chan = 0)
pure virtual

Get the RX bandwidth on the frontend.

Parameters
chanthe channel index 0 to N-1
Returns
the bandwidth in Hz

◆ get_rx_bandwidth_range()

virtual meta_range_t uhd::usrp::multi_usrp::get_rx_bandwidth_range ( size_t  chan = 0)
pure virtual

Get the range of the possible RX bandwidth settings.

Parameters
chanthe channel index 0 to N-1
Returns
a range of bandwidths in Hz

◆ get_rx_dboard_iface()

virtual dboard_iface::sptr uhd::usrp::multi_usrp::get_rx_dboard_iface ( size_t  chan = 0)
pure virtual

Get the dboard interface object for the RX frontend. The dboard interface gives access to GPIOs, SPI, I2C, low-speed ADC and DAC. Use at your own risk!

Parameters
chanthe channel index 0 to N-1
Returns
the dboard interface sptr

◆ get_rx_dc_offset_range()

virtual meta_range_t uhd::usrp::multi_usrp::get_rx_dc_offset_range ( size_t  chan = ALL_CHANS)
pure virtual

Get the valid range for RX DC offset values.

Parameters
chanthe channel index 0 to N-1

◆ get_rx_freq()

virtual double uhd::usrp::multi_usrp::get_rx_freq ( size_t  chan = 0)
pure virtual

Get the RX center frequency.

Parameters
chanthe channel index 0 to N-1
Returns
the frequency in Hz

◆ get_rx_freq_range()

virtual freq_range_t uhd::usrp::multi_usrp::get_rx_freq_range ( size_t  chan = 0)
pure virtual

Get the RX center frequency range. This range includes the overall tunable range of the RX chain, including frontend chain and digital down conversion chain. This tunable limit does not include the baseband bandwidth; users should assume that the actual range is +/- samp_rate/2.

Parameters
chanthe channel index 0 to N-1
Returns
a frequency range object

◆ get_rx_gain() [1/2]

virtual double uhd::usrp::multi_usrp::get_rx_gain ( const std::string &  name,
size_t  chan = 0 
)
pure virtual

Get the RX gain value for the specified gain element. For an empty name, sum across all gain elements.

Parameters
namethe name of the gain element
chanthe channel index 0 to N-1
Returns
the gain in dB

◆ get_rx_gain() [2/2]

double uhd::usrp::multi_usrp::get_rx_gain ( size_t  chan = 0)
inline

A convenience wrapper for getting overall RX gain.

◆ get_rx_gain_names()

virtual std::vector<std::string> uhd::usrp::multi_usrp::get_rx_gain_names ( size_t  chan = 0)
pure virtual

Get the names of the gain elements in the RX chain. Gain elements are ordered from antenna to FPGA.

Parameters
chanthe channel index 0 to N-1
Returns
a vector of gain element names

◆ get_rx_gain_profile()

virtual std::string uhd::usrp::multi_usrp::get_rx_gain_profile ( const size_t  chan = 0)
pure virtual

Get the RX gain profile.

Parameters
chanthe channel index 0 to N-1
Returns
a string of current RX gain profile of corresponding channel.

◆ get_rx_gain_profile_names()

virtual std::vector<std::string> uhd::usrp::multi_usrp::get_rx_gain_profile_names ( const size_t  chan = 0)
pure virtual

Get a list of possible RX gain profile options

Example: On the TwinRX, this will return "low-noise", "low-distortion" or "default". These names can be used in gain-profile related API called. An empty return value doesn't mean there are no profile options, it means that this radio does not have any gain profiles implemented, and typically means there is only one default profile of set gain

Parameters
chanthe channel index 0 to N-1
Returns
a vector of strings for possible gain profile options, or an empty list of this doesn't apply.

◆ get_rx_gain_range() [1/2]

virtual gain_range_t uhd::usrp::multi_usrp::get_rx_gain_range ( const std::string &  name,
size_t  chan = 0 
)
pure virtual

Get the RX gain range for the specified gain element. For an empty name, calculate the overall gain range.

Parameters
namethe name of the gain element
chanthe channel index 0 to N-1
Returns
a gain range object

◆ get_rx_gain_range() [2/2]

gain_range_t uhd::usrp::multi_usrp::get_rx_gain_range ( size_t  chan = 0)
inline

A convenience wrapper for getting overall RX gain range.

◆ get_rx_lo_export_enabled()

virtual bool uhd::usrp::multi_usrp::get_rx_lo_export_enabled ( const std::string &  name = ALL_LOS,
size_t  chan = 0 
)
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::usrp::multi_usrp::get_rx_lo_freq ( const std::string &  name,
size_t  chan = 0 
)
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. See also set_rx_lo_freq() for more information.

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::usrp::multi_usrp::get_rx_lo_freq_range ( const std::string &  name,
size_t  chan = 0 
)
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::usrp::multi_usrp::get_rx_lo_names ( size_t  chan = 0)
pure virtual

Get a list of possible LO stage names

Example: On the TwinRX, this will return "LO1", "LO2". These names can are used in other LO-related API calls, so this function can be used for automatically enumerating LO stages. An empty return value doesn't mean there are no LOs, it means that this radio does not have an LO API implemented, and typically means the LOs have no direct way of being controlled other than setting the frequency.

Parameters
chanthe channel index 0 to N-1
Returns
a vector of strings for possible LO names, or an empty list of this doesn't apply (i.e. there are no controllable LO stages)

◆ get_rx_lo_source()

virtual const std::string uhd::usrp::multi_usrp::get_rx_lo_source ( const std::string &  name = ALL_LOS,
size_t  chan = 0 
)
pure virtual

Get the currently selected LO source.

Channels without controllable LO sources will always 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::usrp::multi_usrp::get_rx_lo_sources ( const std::string &  name = ALL_LOS,
size_t  chan = 0 
)
pure virtual

Get a list of possible LO sources.

Channels which do not have controllable LO sources will return "internal". Typical values are "internal" and "external", although the TwinRX has more options, such as "companion". These options are device- specific.

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_rx_num_channels()

virtual size_t uhd::usrp::multi_usrp::get_rx_num_channels ( void  )
pure virtual

Get the number of RX channels in this configuration. This is the number of USRPs times the number of RX channels per board, where the number of RX channels per board is homogeneous among all USRPs.

◆ get_rx_rate()

virtual double uhd::usrp::multi_usrp::get_rx_rate ( size_t  chan = 0)
pure virtual

Gets the RX sample rate.

Parameters
chanthe channel index 0 to N-1
Returns
the rate in Sps

◆ get_rx_rates()

virtual meta_range_t uhd::usrp::multi_usrp::get_rx_rates ( size_t  chan = 0)
pure virtual

Get a range of possible RX rates.

Parameters
chanthe channel index 0 to N-1
Returns
the meta range of rates

◆ get_rx_sensor()

virtual sensor_value_t uhd::usrp::multi_usrp::get_rx_sensor ( const std::string &  name,
size_t  chan = 0 
)
pure virtual

Get an RX frontend sensor value.

Parameters
namethe name of the sensor
chanthe channel index 0 to N-1
Returns
a sensor value object

◆ get_rx_sensor_names()

virtual std::vector<std::string> uhd::usrp::multi_usrp::get_rx_sensor_names ( size_t  chan = 0)
pure virtual

Get a list of possible RX frontend sensor names.

Parameters
chanthe channel index 0 to N-1
Returns
a vector of sensor names

◆ get_rx_stream()

virtual rx_streamer::sptr uhd::usrp::multi_usrp::get_rx_stream ( const stream_args_t args)
pure virtual

Convenience method to get a RX streamer. See also uhd::device::get_rx_stream().

◆ get_rx_subdev_name()

virtual std::string uhd::usrp::multi_usrp::get_rx_subdev_name ( size_t  chan = 0)
pure virtual

Get the name of the RX frontend.

Parameters
chanthe channel index 0 to N-1
Returns
the frontend name

◆ get_rx_subdev_spec()

virtual uhd::usrp::subdev_spec_t uhd::usrp::multi_usrp::get_rx_subdev_spec ( size_t  mboard = 0)
pure virtual

Get the RX frontend specification.

Parameters
mboardthe motherboard index 0 to M-1
Returns
the frontend specification in use

◆ get_time_last_pps()

virtual time_spec_t uhd::usrp::multi_usrp::get_time_last_pps ( size_t  mboard = 0)
pure virtual

Get the time when the last pps pulse occurred.

Parameters
mboardwhich motherboard to query
Returns
a timespec representing the last pps

◆ get_time_now()

virtual time_spec_t uhd::usrp::multi_usrp::get_time_now ( size_t  mboard = 0)
pure virtual

Get the current time in the usrp time registers.

Parameters
mboardwhich motherboard to query
Returns
a timespec representing current usrp time

◆ get_time_source()

virtual std::string uhd::usrp::multi_usrp::get_time_source ( const size_t  mboard)
pure virtual

Get the currently set time source.

Parameters
mboardwhich motherboard to get the config
Returns
the string representing the time source

◆ get_time_sources()

virtual std::vector<std::string> uhd::usrp::multi_usrp::get_time_sources ( const size_t  mboard)
pure virtual

Get a list of possible time sources.

Parameters
mboardwhich motherboard to get the list
Returns
a vector of strings for possible settings

◆ get_time_synchronized()

virtual bool uhd::usrp::multi_usrp::get_time_synchronized ( void  )
pure virtual

Are the times across all motherboards in this configuration synchronized? Checks that all time registers are approximately close but not exact, given that the RTT may varying for a control packet transaction.

Returns
true when all motherboards time registers are in sync

◆ get_tx_antenna()

virtual std::string uhd::usrp::multi_usrp::get_tx_antenna ( size_t  chan = 0)
pure virtual

Get the selected TX antenna on the frontend.

Parameters
chanthe channel index 0 to N-1
Returns
the antenna name

◆ get_tx_antennas()

virtual std::vector<std::string> uhd::usrp::multi_usrp::get_tx_antennas ( size_t  chan = 0)
pure virtual

Get a list of possible TX antennas on the frontend.

Parameters
chanthe channel index 0 to N-1
Returns
a vector of antenna names

◆ get_tx_bandwidth()

virtual double uhd::usrp::multi_usrp::get_tx_bandwidth ( size_t  chan = 0)
pure virtual

Get the TX bandwidth on the frontend.

Parameters
chanthe channel index 0 to N-1
Returns
the bandwidth in Hz

◆ get_tx_bandwidth_range()

virtual meta_range_t uhd::usrp::multi_usrp::get_tx_bandwidth_range ( size_t  chan = 0)
pure virtual

Get the range of the possible TX bandwidth settings.

Parameters
chanthe channel index 0 to N-1
Returns
a range of bandwidths in Hz

◆ get_tx_dboard_iface()

virtual dboard_iface::sptr uhd::usrp::multi_usrp::get_tx_dboard_iface ( size_t  chan = 0)
pure virtual

Get the dboard interface object for the TX frontend. The dboard interface gives access to GPIOs, SPI, I2C, low-speed ADC and DAC. Use at your own risk!

Parameters
chanthe channel index 0 to N-1
Returns
the dboard interface sptr

◆ get_tx_dc_offset_range()

virtual meta_range_t uhd::usrp::multi_usrp::get_tx_dc_offset_range ( size_t  chan = ALL_CHANS)
pure virtual

Get the valid range for TX DC offset values.

Parameters
chanthe channel index 0 to N-1

◆ get_tx_freq()

virtual double uhd::usrp::multi_usrp::get_tx_freq ( size_t  chan = 0)
pure virtual

Get the TX center frequency.

Parameters
chanthe channel index 0 to N-1
Returns
the frequency in Hz

◆ get_tx_freq_range()

virtual freq_range_t uhd::usrp::multi_usrp::get_tx_freq_range ( size_t  chan = 0)
pure virtual

Get the TX center frequency range. This range includes the overall tunable range of the TX chain, including frontend chain and digital up conversion chain. This tunable limit does not include the baseband bandwidth; users should assume that the actual range is +/- samp_rate/2.

Parameters
chanthe channel index 0 to N-1
Returns
a frequency range object

◆ get_tx_gain() [1/2]

virtual double uhd::usrp::multi_usrp::get_tx_gain ( const std::string &  name,
size_t  chan = 0 
)
pure virtual

Get the TX gain value for the specified gain element. For an empty name, sum across all gain elements.

Parameters
namethe name of the gain element
chanthe channel index 0 to N-1
Returns
the gain in dB

◆ get_tx_gain() [2/2]

double uhd::usrp::multi_usrp::get_tx_gain ( size_t  chan = 0)
inline

A convenience wrapper for getting overall TX gain.

◆ get_tx_gain_names()

virtual std::vector<std::string> uhd::usrp::multi_usrp::get_tx_gain_names ( size_t  chan = 0)
pure virtual

Get the names of the gain elements in the TX chain. Gain elements are ordered from antenna to FPGA.

Parameters
chanthe channel index 0 to N-1
Returns
a vector of gain element names

◆ get_tx_gain_profile()

virtual std::string uhd::usrp::multi_usrp::get_tx_gain_profile ( const size_t  chan = 0)
pure virtual

Get the TX gain profile.

Parameters
chanthe channel index 0 to N-1
Returns
a string of current TX gain profile of corresponding channel.

◆ get_tx_gain_profile_names()

virtual std::vector<std::string> uhd::usrp::multi_usrp::get_tx_gain_profile_names ( const size_t  chan = 0)
pure virtual

Get a list of possible TX gain profile options

Example: On the N310, this will return "manual" or "default". These names can be used in gain related API called. An empty return value doesn't mean there are no profile options, it means that this radio does not have any gain profiles implemented, and typically means there is only one default profile of set gain

Parameters
chanthe channel index 0 to N-1
Returns
a vector of strings for possible gain profile options, or an empty list of this doesn't apply.

◆ get_tx_gain_range() [1/2]

virtual gain_range_t uhd::usrp::multi_usrp::get_tx_gain_range ( const std::string &  name,
size_t  chan = 0 
)
pure virtual

Get the TX gain range for the specified gain element. For an empty name, calculate the overall gain range.

Parameters
namethe name of the gain element
chanthe channel index 0 to N-1
Returns
a gain range object

◆ get_tx_gain_range() [2/2]

gain_range_t uhd::usrp::multi_usrp::get_tx_gain_range ( size_t  chan = 0)
inline

A convenience wrapper for getting overall TX gain range.

◆ get_tx_lo_export_enabled()

virtual bool uhd::usrp::multi_usrp::get_tx_lo_export_enabled ( const std::string &  name = ALL_LOS,
const size_t  chan = 0 
)
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::usrp::multi_usrp::get_tx_lo_freq ( const std::string &  name,
const size_t  chan = 0 
)
pure virtual

Get the current TX LO frequency (Advanced).

If the channel does not have independently configurable LOs the current rf frequency will be returned. See also set_tx_lo_freq() for more information.

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::usrp::multi_usrp::get_tx_lo_freq_range ( const std::string &  name,
const size_t  chan = 0 
)
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::usrp::multi_usrp::get_tx_lo_names ( size_t  chan = 0)
pure virtual

Get a list of possible TX LO stage names

See also get_rx_lo_names().

An empty return value doesn't mean there are no LOs, it means that this radio does not have an LO API implemented, and typically means the LOs have no direct way of being controlled other than setting the frequency.

Parameters
chanthe channel index 0 to N-1
Returns
a vector of strings for possible LO names, or an empty list of this doesn't apply (i.e. there are no controllable LO stages)

◆ get_tx_lo_source()

virtual const std::string uhd::usrp::multi_usrp::get_tx_lo_source ( const std::string &  name = ALL_LOS,
const size_t  chan = 0 
)
pure virtual

Get the currently selected TX LO source.

Channels without controllable LO sources will always 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::usrp::multi_usrp::get_tx_lo_sources ( const std::string &  name = ALL_LOS,
const size_t  chan = 0 
)
pure virtual

Get a list of possible LO sources.

Channels which do not have controllable LO sources will return "internal". Typical values are "internal" and "external". These options are device-specific.

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_tx_num_channels()

virtual size_t uhd::usrp::multi_usrp::get_tx_num_channels ( void  )
pure virtual

Get the number of TX channels in this configuration. This is the number of USRPs times the number of TX channels per board, where the number of TX channels per board is homogeneous among all USRPs.

◆ get_tx_rate()

virtual double uhd::usrp::multi_usrp::get_tx_rate ( size_t  chan = 0)
pure virtual

Gets the TX sample rate.

Parameters
chanthe channel index 0 to N-1
Returns
the rate in Sps

◆ get_tx_rates()

virtual meta_range_t uhd::usrp::multi_usrp::get_tx_rates ( size_t  chan = 0)
pure virtual

Get a range of possible TX rates.

Parameters
chanthe channel index 0 to N-1
Returns
the meta range of rates

◆ get_tx_sensor()

virtual sensor_value_t uhd::usrp::multi_usrp::get_tx_sensor ( const std::string &  name,
size_t  chan = 0 
)
pure virtual

Get an TX frontend sensor value.

Parameters
namethe name of the sensor
chanthe channel index 0 to N-1
Returns
a sensor value object

◆ get_tx_sensor_names()

virtual std::vector<std::string> uhd::usrp::multi_usrp::get_tx_sensor_names ( size_t  chan = 0)
pure virtual

Get a list of possible TX frontend sensor names.

Parameters
chanthe channel index 0 to N-1
Returns
a vector of sensor names

◆ get_tx_stream()

virtual tx_streamer::sptr uhd::usrp::multi_usrp::get_tx_stream ( const stream_args_t args)
pure virtual

Convenience method to get a TX streamer. See also uhd::device::get_rx_stream().

◆ get_tx_subdev_name()

virtual std::string uhd::usrp::multi_usrp::get_tx_subdev_name ( size_t  chan = 0)
pure virtual

Get the name of the TX frontend.

Parameters
chanthe channel index 0 to N-1
Returns
the frontend name

◆ get_tx_subdev_spec()

virtual uhd::usrp::subdev_spec_t uhd::usrp::multi_usrp::get_tx_subdev_spec ( size_t  mboard = 0)
pure virtual

Get the TX frontend specification.

Parameters
mboardthe motherboard index 0 to M-1
Returns
the frontend specification in use

◆ get_usrp_rx_info()

virtual dict<std::string, std::string> uhd::usrp::multi_usrp::get_usrp_rx_info ( size_t  chan = 0)
pure virtual

Returns identifying information about this USRP's configuration. Returns motherboard ID, name, and serial. Returns daughterboard RX ID, subdev name and spec, serial, and antenna.

Parameters
chanchannel index 0 to N-1
Returns
RX info

◆ get_usrp_tx_info()

virtual dict<std::string, std::string> uhd::usrp::multi_usrp::get_usrp_tx_info ( size_t  chan = 0)
pure virtual

Returns identifying information about this USRP's configuration. Returns motherboard ID, name, and serial. Returns daughterboard TX ID, subdev name and spec, serial, and antenna.

Parameters
chanchannel index 0 to N-1
Returns
TX info

◆ is_device3()

virtual bool uhd::usrp::multi_usrp::is_device3 ( void  )
pure virtual

Returns true if this is a generation-3 device.

◆ issue_stream_cmd()

virtual void uhd::usrp::multi_usrp::issue_stream_cmd ( const stream_cmd_t stream_cmd,
size_t  chan = ALL_CHANS 
)
pure virtual

Issue a stream command to the usrp device. This tells the usrp to send samples into the host. See the documentation for stream_cmd_t for more info.

With multiple devices, the first stream command in a chain of commands should have a time spec in the near future and stream_now = false; to ensure that the packets can be aligned by their time specs.

Parameters
stream_cmdthe stream command to issue
chanthe channel index 0 to N-1

◆ make()

static sptr uhd::usrp::multi_usrp::make ( const device_addr_t dev_addr)
static

Make a new multi usrp from the device address.

Parameters
dev_addrthe device address
Returns
a new single usrp object
Exceptions
uhd::key_errorno device found
uhd::index_errorfewer devices found than expected

◆ read_register()

virtual uint64_t uhd::usrp::multi_usrp::read_register ( const std::string &  path,
const uint32_t  field,
const size_t  mboard = 0 
)
pure virtual

Read a low-level register field from a register in the USRP hardware

Parameters
paththe full path to the register
fieldthe identifier of bitfield to be read
mboardthe motherboard index 0 to M-1
Returns
the value of the register field

◆ set_clock_config()

virtual void uhd::usrp::multi_usrp::set_clock_config ( const clock_config_t clock_config,
size_t  mboard = ALL_MBOARDS 
)
pure virtual

Set the clock configuration for the usrp device. DEPRECATED in favor of set time and clock source calls. This tells the usrp how to get a 10MHz reference and PPS clock. See the documentation for clock_config_t for more info.

Parameters
clock_configthe clock configuration to set
mboardwhich motherboard to set the config

◆ set_clock_source()

virtual void uhd::usrp::multi_usrp::set_clock_source ( const std::string &  source,
const size_t  mboard = ALL_MBOARDS 
)
pure virtual

Set the clock source for the usrp device. This sets the source for a 10 MHz reference clock. Typical options for source: internal, external, MIMO.

Parameters
sourcea string representing the clock source
mboardwhich motherboard to set the config

◆ set_clock_source_out()

virtual void uhd::usrp::multi_usrp::set_clock_source_out ( const bool  enb,
const size_t  mboard = ALL_MBOARDS 
)
pure virtual

Send the clock source to an output connector. This call is only applicable on devices with reference outputs. By default, the reference output will be enabled for ease of use. This call may be used to enable or disable the output.

Parameters
enbtrue to output the clock source.
mboardwhich motherboard to set

◆ set_command_time()

virtual void uhd::usrp::multi_usrp::set_command_time ( const uhd::time_spec_t time_spec,
size_t  mboard = ALL_MBOARDS 
)
pure virtual

Set the time at which the control commands will take effect.

A timed command will back-pressure all subsequent timed commands, assuming that the subsequent commands occur within the time-window. If the time spec is late, the command will be activated upon arrival.

Parameters
time_specthe time at which the next command will activate
mboardwhich motherboard to set the config

◆ set_filter()

virtual void uhd::usrp::multi_usrp::set_filter ( const std::string &  path,
filter_info_base::sptr  filter 
)
pure virtual

Write back a filter obtained by get_filter() to the signal path. This filter can be a modified version of the originally returned one. The information about Rx or Tx is contained in the path parameter.

Parameters
paththe name of the filter as returned from get_filter_names().
filterthe filter_info_base::sptr of the filter object to be written

◆ set_gpio_attr() [1/2]

virtual void uhd::usrp::multi_usrp::set_gpio_attr ( const std::string &  bank,
const std::string &  attr,
const uint32_t  value,
const uint32_t  mask = 0xffffffff,
const size_t  mboard = 0 
)
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
    attrthe name of a GPIO attribute
    valuethe new value for this GPIO bank
    maskthe bit mask to effect which pins are changed
    mboardthe motherboard index 0 to M-1

◆ set_gpio_attr() [2/2]

virtual void uhd::usrp::multi_usrp::set_gpio_attr ( const std::string &  bank,
const std::string &  attr,
const std::string &  value,
const uint32_t  mask = 0xffffffff,
const size_t  mboard = 0 
)
pure virtual

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

  • SRC - "PS" for handling by processing system
    • "RADIO_N/M" for handling by radio block with N is in [0..Number of Radio]; M is in [0..Number of port per Radio]
  • CTRL - "ATR" for ATR mode
    • "GPIO" for GPIO mode
  • DDR - "OUT" for output
    • "IN" for input
  • OUT - a string of numbers representing GPIO output level (not ATR mode)
    • "HIGH"or "LOW" as GPIO output level that apply for each bit mask that is 1
  • ATR_0X - a string of numbers representing a value of the ATR idle state register
    • "HIGH" or "LOW" as a value set on each bit on of the ATR idle state register
  • ATR_RX - a string of numbers representing a value of a ATR receive only state register
    • "HIGH" or "LOW" as a value set on each bit on of the ATR receive only state register
  • ATR_TX - a string of numbers representing a value of the ATR transmit only state register
    • "HIGH" or "LOW" as a value set on each bit on of the ATR transmit only state register
  • ATR_XX - a string of numbers representing a value of the ATR full duplex state register
    • "HIGH" or "LOW" as a value set on each bit on of the ATR full duplex state register
      Parameters
      bankthe name of a GPIO bank
      attrthe name of a GPIO attribute
      valuethe new value for this GPIO bank
      maskthe bit mask to effect which pins are changed
      mboardthe motherboard index 0 to M-1

◆ set_master_clock_rate()

virtual void uhd::usrp::multi_usrp::set_master_clock_rate ( double  rate,
size_t  mboard = ALL_MBOARDS 
)
pure virtual

Set the master clock rate.

What exactly this changes is device-dependent, but it will always affect the rate at which the ADC/DAC is running.

Like tuning receive or transmit frequencies, this call will do a best effort to change the master clock rate. The device will coerce to the closest clock rate available, and on many devices won't actually change anything at all. Call get_master_clock_rate() to see which rate was actually applied.

Note that changing this value during streaming is not recommended and can have random side effects.

If the device has an 'auto clock rate' setting (e.g. B200, see also Automatic Clock Rate Setting), calling this function will disable the automatic clock rate selection, and the clock rate will be fixed to rate.

Parameters
ratethe new master clock rate in Hz
mboardthe motherboard index 0 to M-1

◆ set_normalized_rx_gain()

virtual void uhd::usrp::multi_usrp::set_normalized_rx_gain ( double  gain,
size_t  chan = 0 
)
pure virtual

Set the normalized RX gain value.

The normalized gain is a value in [0, 1], where 0 is the smallest gain value available, and 1 is the largest, independent of the device. In between, gains are linearly interpolated.

Check the individual device manual for notes on the gain range.

Note that it is not possible to specify a gain name for this function, it will always set the overall gain.

Parameters
gainthe normalized gain value
chanthe channel index 0 to N-1
Exceptions
Auhd::runtime_error if the gain value is outside [0, 1].

◆ set_normalized_tx_gain()

virtual void uhd::usrp::multi_usrp::set_normalized_tx_gain ( double  gain,
size_t  chan = 0 
)
pure virtual

Set the normalized TX gain value.

See set_normalized_rx_gain() for a discussion on normalized gains.

Parameters
gainthe normalized gain value
chanthe channel index 0 to N-1
Exceptions
Auhd::runtime_error if the gain value is outside [0, 1].

◆ set_rx_agc()

virtual void uhd::usrp::multi_usrp::set_rx_agc ( bool  enable,
size_t  chan = 0 
)
pure virtual

Enable or disable the RX AGC module. Once this module is enabled manual gain settings will be ignored. The AGC will start in a default configuration which should be good for most use cases. Device specific configuration parameters can be found in the property tree.

Parameters
enableEnable or Disable the AGC
chanthe channel index 0 to N-1

◆ set_rx_antenna()

virtual void uhd::usrp::multi_usrp::set_rx_antenna ( const std::string &  ant,
size_t  chan = 0 
)
pure virtual

Select the RX antenna on the frontend.

Parameters
antthe antenna name
chanthe channel index 0 to N-1

◆ set_rx_bandwidth()

virtual void uhd::usrp::multi_usrp::set_rx_bandwidth ( double  bandwidth,
size_t  chan = 0 
)
pure virtual

Set the RX bandwidth on the frontend.

Parameters
bandwidththe bandwidth in Hz
chanthe channel index 0 to N-1

◆ set_rx_dc_offset() [1/2]

virtual void uhd::usrp::multi_usrp::set_rx_dc_offset ( const bool  enb,
size_t  chan = ALL_CHANS 
)
pure virtual

Enable/disable the automatic RX DC offset correction. The automatic correction subtracts out the long-run average.

When disabled, the averaging option operation is halted. Once halted, the average value will be held constant until the user re-enables the automatic correction or overrides the value by manually setting the offset.

Parameters
enbtrue to enable automatic DC offset correction
chanthe channel index 0 to N-1

◆ set_rx_dc_offset() [2/2]

virtual void uhd::usrp::multi_usrp::set_rx_dc_offset ( const std::complex< double > &  offset,
size_t  chan = ALL_CHANS 
)
pure virtual

Set a constant RX DC offset value. The value is complex to control both I and Q. Only set this when automatic correction is disabled.

Parameters
offsetthe dc offset (1.0 is full-scale)
chanthe channel index 0 to N-1

◆ set_rx_freq()

virtual tune_result_t uhd::usrp::multi_usrp::set_rx_freq ( const tune_request_t tune_request,
size_t  chan = 0 
)
pure virtual

Set the RX center frequency.

Parameters
tune_requesttune request instructions
chanthe channel index 0 to N-1
Returns
a tune result object

◆ set_rx_gain() [1/2]

virtual void uhd::usrp::multi_usrp::set_rx_gain ( double  gain,
const std::string &  name,
size_t  chan = 0 
)
pure virtual

Set the RX gain value for the specified gain element. For an empty name, distribute across all gain elements.

Parameters
gainthe gain in dB
namethe name of the gain element
chanthe channel index 0 to N-1

◆ set_rx_gain() [2/2]

void uhd::usrp::multi_usrp::set_rx_gain ( double  gain,
size_t  chan = 0 
)
inline

A convenience wrapper for setting overall RX gain.

◆ set_rx_gain_profile()

virtual void uhd::usrp::multi_usrp::set_rx_gain_profile ( const std::string &  profile,
const size_t  chan = 0 
)
pure virtual

Set the RX gain profile.

Parameters
profilethe profile string option
chanthe channel index 0 to N-1

◆ set_rx_iq_balance() [1/2]

virtual void uhd::usrp::multi_usrp::set_rx_iq_balance ( const bool  enb,
size_t  chan 
)
pure virtual

Enable/disable the automatic IQ imbalance correction.

Parameters
enbtrue to enable automatic IQ balance correction
chanthe channel index 0 to N-1

◆ set_rx_iq_balance() [2/2]

virtual void uhd::usrp::multi_usrp::set_rx_iq_balance ( const std::complex< double > &  correction,
size_t  chan = ALL_CHANS 
)
pure virtual

Set the RX frontend IQ imbalance correction. Use this to adjust the magnitude and phase of I and Q.

Parameters
correctionthe complex correction (1.0 is full-scale)
chanthe channel index 0 to N-1

◆ set_rx_lo_export_enabled()

virtual void uhd::usrp::multi_usrp::set_rx_lo_export_enabled ( bool  enabled,
const std::string &  name = ALL_LOS,
size_t  chan = 0 
)
pure virtual

Set whether the LO used by the 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
Exceptions
uhd::runtime_errorif LO exporting is not enabled

◆ set_rx_lo_freq()

virtual double uhd::usrp::multi_usrp::set_rx_lo_freq ( double  freq,
const std::string &  name,
size_t  chan = 0 
)
pure virtual

Set the RX LO frequency (Advanced).

The actual behaviour is device-specific. However, as a rule of thumb, this will coerce the underlying driver into some state. Typical situations include:

  • LOs are internal, and this function is called to pin an LO to a certain value. This can force the driver to pick different IFs for different stages, and there may be situations where this behaviour can be used to reduce spurs in specific bands.
  • LOs are external. In this case, this function is used to notify UHD what the actual value of an externally provided LO is. The only time when calling this function is necessary is when the LO source is set to external, but the external LO can't be tuned to the exact value required by UHD to achieve a certain center frequency. In this case, calling set_rx_lo_freq() will let UHD know that the LO is not the expected value, and it's possible that UHD will find other ways to compensate for the LO offset.
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::usrp::multi_usrp::set_rx_lo_source ( const std::string &  src,
const std::string &  name = ALL_LOS,
size_t  chan = 0 
)
pure virtual

Set the LO source for the USRP device.

For USRPs that support selectable LO sources, 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. If the wildcard value ALL_LOS is used, the setting will be applied to all LOs on this channel.
chanthe channel index 0 to N-1

◆ set_rx_rate()

virtual void uhd::usrp::multi_usrp::set_rx_rate ( double  rate,
size_t  chan = ALL_CHANS 
)
pure virtual

Set the RX sample rate.

Parameters
ratethe rate in Sps
chanthe channel index 0 to N-1

◆ set_rx_subdev_spec()

virtual void uhd::usrp::multi_usrp::set_rx_subdev_spec ( const uhd::usrp::subdev_spec_t spec,
size_t  mboard = ALL_MBOARDS 
)
pure virtual

Set the RX frontend specification: The subdev spec maps a physical part of a daughter-board to a channel number. Set the subdev spec before calling into any methods with a channel number. The subdev spec must be the same size across all motherboards.

Parameters
specthe new frontend specification
mboardthe motherboard index 0 to M-1

◆ set_time_next_pps()

virtual void uhd::usrp::multi_usrp::set_time_next_pps ( const time_spec_t time_spec,
size_t  mboard = ALL_MBOARDS 
)
pure virtual

Set the time registers on the usrp 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 usrp device
mboardthe motherboard index 0 to M-1

◆ set_time_now()

virtual void uhd::usrp::multi_usrp::set_time_now ( const time_spec_t time_spec,
size_t  mboard = ALL_MBOARDS 
)
pure virtual

Sets the time registers on the usrp immediately.

If only one MIMO master is present in your configuration, set_time_now is safe to use because the slave's time automatically follows the master's time. Otherwise, this call cannot set the time synchronously across multiple devices. Please use the set_time_next_pps or set_time_unknown_pps calls with a PPS signal.

Parameters
time_specthe time to latch into the usrp device
mboardthe motherboard index 0 to M-1

◆ set_time_source()

virtual void uhd::usrp::multi_usrp::set_time_source ( const std::string &  source,
const size_t  mboard = ALL_MBOARDS 
)
pure virtual

Set the time source for the usrp device. This sets the method of time synchronization, typically a pulse per second or an encoded time. Typical options for source: external, MIMO.

Parameters
sourcea string representing the time source
mboardwhich motherboard to set the config

◆ set_time_source_out()

virtual void uhd::usrp::multi_usrp::set_time_source_out ( const bool  enb,
const size_t  mboard = ALL_MBOARDS 
)
pure virtual

Send the time source to an output connector. This call is only applicable on devices with PPS outputs. By default, the PPS output will be enabled for ease of use. This call may be used to enable or disable the output.

Parameters
enbtrue to output the time source.
mboardwhich motherboard to set

◆ set_time_unknown_pps()

virtual void uhd::usrp::multi_usrp::set_time_unknown_pps ( const time_spec_t time_spec)
pure virtual

Synchronize the times across all motherboards in this configuration. Use this method to sync the times when the edge of the PPS is unknown.

Ex: Host machine is not attached to serial port of GPSDO and can therefore not query the GPSDO for the PPS edge.

This is a 2-step process, and will take at most 2 seconds to complete. Upon completion, the times will be synchronized to the time provided.

  • Step1: wait for the last pps time to transition to catch the edge
  • Step2: set the time at the next pps (synchronous for all boards)
Parameters
time_specthe time to latch at the next pps after catching the edge

◆ set_tx_antenna()

virtual void uhd::usrp::multi_usrp::set_tx_antenna ( const std::string &  ant,
size_t  chan = 0 
)
pure virtual

Select the TX antenna on the frontend.

Parameters
antthe antenna name
chanthe channel index 0 to N-1

◆ set_tx_bandwidth()

virtual void uhd::usrp::multi_usrp::set_tx_bandwidth ( double  bandwidth,
size_t  chan = 0 
)
pure virtual

Set the TX bandwidth on the frontend.

Parameters
bandwidththe bandwidth in Hz
chanthe channel index 0 to N-1

◆ set_tx_dc_offset()

virtual void uhd::usrp::multi_usrp::set_tx_dc_offset ( const std::complex< double > &  offset,
size_t  chan = ALL_CHANS 
)
pure virtual

Set a constant TX DC offset value. The value is complex to control both I and Q.

Parameters
offsetthe dc offset (1.0 is full-scale)
chanthe channel index 0 to N-1

◆ set_tx_freq()

virtual tune_result_t uhd::usrp::multi_usrp::set_tx_freq ( const tune_request_t tune_request,
size_t  chan = 0 
)
pure virtual

Set the TX center frequency.

Parameters
tune_requesttune request instructions
chanthe channel index 0 to N-1
Returns
a tune result object

◆ set_tx_gain() [1/2]

virtual void uhd::usrp::multi_usrp::set_tx_gain ( double  gain,
const std::string &  name,
size_t  chan = 0 
)
pure virtual

Set the TX gain value for the specified gain element. For an empty name, distribute across all gain elements.

Parameters
gainthe gain in dB
namethe name of the gain element
chanthe channel index 0 to N-1

◆ set_tx_gain() [2/2]

void uhd::usrp::multi_usrp::set_tx_gain ( double  gain,
size_t  chan = 0 
)
inline

A convenience wrapper for setting overall TX gain.

◆ set_tx_gain_profile()

virtual void uhd::usrp::multi_usrp::set_tx_gain_profile ( const std::string &  profile,
const size_t  chan = 0 
)
pure virtual

Set the TX gain profile.

Parameters
profilethe profile string option
chanthe channel index 0 to N-1

◆ set_tx_iq_balance()

virtual void uhd::usrp::multi_usrp::set_tx_iq_balance ( const std::complex< double > &  correction,
size_t  chan = ALL_CHANS 
)
pure virtual

Set the TX frontend IQ imbalance correction. Use this to adjust the magnitude and phase of I and Q.

Parameters
correctionthe complex correction (1.0 is full-scale)
chanthe channel index 0 to N-1

◆ set_tx_lo_export_enabled()

virtual void uhd::usrp::multi_usrp::set_tx_lo_export_enabled ( const bool  enabled,
const std::string &  name = ALL_LOS,
const size_t  chan = 0 
)
pure virtual

Set whether the TX LO used by the 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
Exceptions
uhd::runtime_errorif LO exporting is not enabled

◆ set_tx_lo_freq()

virtual double uhd::usrp::multi_usrp::set_tx_lo_freq ( const double  freq,
const std::string &  name,
const size_t  chan = 0 
)
pure virtual

Set the TX LO frequency (Advanced).

The actual behaviour is device-specific. However, as a rule of thumb, this will coerce the underlying driver into some state. Typical situations include:

  • LOs are internal, and this function is called to pin an LO to a certain value. This can force the driver to pick different IFs for different stages, and there may be situations where this behaviour can be used to reduce spurs in specific bands.
  • LOs are external. In this case, this function is used to notify UHD what the actual value of an externally provided LO is. The only time when calling this function is necessary is when the LO source is set to external, but the external LO can't be tuned to the exact value required by UHD to achieve a certain center frequency. In this case, calling set_tx_lo_freq() will let UHD know that the LO is not the expected value, and it's possible that UHD will find other ways to compensate for the LO offset.
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::usrp::multi_usrp::set_tx_lo_source ( const std::string &  src,
const std::string &  name = ALL_LOS,
const size_t  chan = 0 
)
pure virtual

Set the TX LO source for the USRP device.

For USRPs that support selectable LO sources, 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. If the wildcard value ALL_LOS is used, the setting will be applied to all LOs on this channel.
chanthe channel index 0 to N-1

◆ set_tx_rate()

virtual void uhd::usrp::multi_usrp::set_tx_rate ( double  rate,
size_t  chan = ALL_CHANS 
)
pure virtual

Set the TX sample rate.

Parameters
ratethe rate in Sps
chanthe channel index 0 to N-1

◆ set_tx_subdev_spec()

virtual void uhd::usrp::multi_usrp::set_tx_subdev_spec ( const uhd::usrp::subdev_spec_t spec,
size_t  mboard = ALL_MBOARDS 
)
pure virtual

Set the TX frontend specification: The subdev spec maps a physical part of a daughter-board to a channel number. Set the subdev spec before calling into any methods with a channel number. The subdev spec must be the same size across all motherboards.

Parameters
specthe new frontend specification
mboardthe motherboard index 0 to M-1

◆ set_user_register()

virtual void uhd::usrp::multi_usrp::set_user_register ( const uint8_t  addr,
const uint32_t  data,
size_t  mboard = ALL_MBOARDS 
)
pure virtual

Perform write on the user configuration register bus. These only exist if the user has implemented custom setting registers in the device FPGA.

Parameters
addr8-bit register address
data32-bit register value
mboardwhich motherboard to set the user register

◆ write_register()

virtual void uhd::usrp::multi_usrp::write_register ( const std::string &  path,
const uint32_t  field,
const uint64_t  value,
const size_t  mboard = 0 
)
pure virtual

Write a low-level register field for a register in the USRP hardware

Parameters
paththe full path to the register
fieldthe identifier of bitfield to be written (all other bits remain unchanged)
valuethe value to write to the register field
mboardthe motherboard index 0 to M-1

Member Data Documentation

◆ ALL_CHANS

const size_t uhd::usrp::multi_usrp::ALL_CHANS = size_t(~0)
static

A wildcard channel index.

◆ ALL_GAINS

const std::string uhd::usrp::multi_usrp::ALL_GAINS
static

A wildcard gain element name.

◆ ALL_LOS

const std::string uhd::usrp::multi_usrp::ALL_LOS
static

A wildcard LO stage name.

◆ ALL_MBOARDS

const size_t uhd::usrp::multi_usrp::ALL_MBOARDS = size_t(~0)
static

A wildcard motherboard index.


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