#include <uhd/usrp/multi_usrp.hpp>
Public Types | |
typedef std::shared_ptr< multi_usrp > | sptr |
Public Member Functions | |
virtual | ~multi_usrp (void)=0 |
virtual device::sptr | get_device (void)=0 |
virtual uhd::property_tree::sptr | get_tree (void) const =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_tx_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_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_sync_source (const std::string &clock_source, const std::string &time_source, const size_t mboard=ALL_MBOARDS)=0 |
virtual void | set_sync_source (const device_addr_t &sync_source, const size_t mboard=ALL_MBOARDS)=0 |
virtual device_addr_t | get_sync_source (const size_t mboard)=0 |
virtual std::vector< device_addr_t > | get_sync_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 uhd::wb_iface::sptr | get_user_settings_iface (const size_t chan=0)=0 |
virtual uhd::rfnoc::radio_control & | get_radio_control (const size_t chan=0)=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 void | set_rx_spp (const size_t spp, const 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=0)=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 bool | has_rx_power_reference (const size_t chan=0)=0 |
virtual void | set_rx_power_reference (const double power_dbm, const size_t chan=0)=0 |
virtual double | get_rx_power_reference (const size_t chan=0)=0 |
virtual meta_range_t | get_rx_power_range (const size_t chan)=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 bool | has_tx_power_reference (const size_t chan=0)=0 |
virtual void | set_tx_power_reference (const double power_dbm, const size_t chan=0)=0 |
virtual double | get_tx_power_reference (const size_t chan=0)=0 |
virtual meta_range_t | get_tx_power_range (const size_t chan)=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=0)=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 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_src_banks (const size_t mboard=0)=0 |
virtual std::vector< std::string > | get_gpio_srcs (const std::string &bank, const size_t mboard=0)=0 |
virtual std::vector< std::string > | get_gpio_src (const std::string &bank, const size_t mboard=0)=0 |
virtual void | set_gpio_src (const std::string &bank, const std::vector< std::string > &src, const size_t mboard=0)=0 |
virtual std::vector< std::string > | get_rx_filter_names (const size_t chan)=0 |
virtual uhd::filter_info_base::sptr | get_rx_filter (const std::string &name, const size_t chan)=0 |
virtual void | set_rx_filter (const std::string &name, uhd::filter_info_base::sptr filter, const size_t chan)=0 |
virtual std::vector< std::string > | get_tx_filter_names (const size_t chan)=0 |
virtual uhd::filter_info_base::sptr | get_tx_filter (const std::string &name, const size_t chan)=0 |
virtual void | set_tx_filter (const std::string &name, uhd::filter_info_base::sptr filter, const size_t chan)=0 |
virtual uhd::rfnoc::mb_controller & | get_mb_controller (const size_t mboard=0)=0 |
Static Public Member Functions | |
static sptr | make (const device_addr_t &dev_addr) |
Static Public Attributes | |
static const size_t | ALL_MBOARDS |
A wildcard motherboard index. More... | |
static const size_t | ALL_CHANS |
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... | |
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:
When using multiple devices in a configuration:
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...
typedef std::shared_ptr<multi_usrp> uhd::usrp::multi_usrp::sptr |
|
pure virtual |
|
pure virtual |
Clear the command time so future commands are sent ASAP.
mboard | which motherboard to set the config |
|
pure virtual |
Get the currently set clock source.
mboard | which motherboard to get the config |
|
pure virtual |
Get a list of possible clock sources.
mboard | which motherboard to get the list |
|
pure virtual |
Get the underlying device object
Note that it is not recommended to use this method. The property tree can be accessed by calling get_tree() on this object, and the streamers own all the streaming-related functionality. get_tx_stream() and get_rx_stream() can also be called on this object.
For RFNoC devices, this won't return a true uhd::device anyway, because direct device access is locked for those. The returned pointer will still point to a valid device object, however, it has reduced functionality.
|
pure virtual |
Get the center frequency range of the RF frontend.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the center frequency range of the TX frontend.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get a GPIO attribute on a particular GPIO bank. Possible attribute names:
bank | the name of a GPIO bank |
attr | the name of a GPIO attribute |
mboard | the motherboard index 0 to M-1 |
|
pure virtual |
Enumerate gpio banks on the specified device.
mboard | the motherboard index 0 to M-1 |
|
pure virtual |
Get the current source for each pin in a GPIO bank.
bank | the name of a GPIO bank. Valid values can be obtained by calling get_gpio_src_banks(). |
mboard | the motherboard index 0 to M-1 |
|
pure virtual |
Return a list of GPIO banks that can be source-controlled on this motherboard
This is a different set of banks than those returned from get_gpio_banks(). Here, we return a list of banks that can be used as arguments for get_gpio_src(), get_gpio_srcs(), and set_gpio_src().
Some motherboards have GPIO banks that can be driven from different sources, e.g., the N310 can have any radio channel drive the FP-GPIOs, or the PS.
mboard | the motherboard index 0 to M-1 |
|
pure virtual |
Enumerate sources for a gpio bank on the specified device.
Each of the pins in the chosen bank can be driven from one of the returned sources.
bank | the name of a GPIO bank. Valid values can be obtained by calling get_gpio_src_banks(). |
mboard | the motherboard index 0 to M-1 |
|
pure virtual |
Get the master clock rate.
mboard | the motherboard index 0 to M-1 |
|
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:
|
pure virtual |
Get direct access to the underlying mb_controller object.
Note: This is an advanced API, created for corner cases where the application is using multi_usrp, but some special features from mb_controller need to be used that are not exposed by multi_usrp. Note that it is possible to put the mb_controller and multi_usrp into a broken state by directly accessing the mb_controller. For typical mb_controller operations it is therefore highly recommended to not use this API call, but use the native multi_usrp API calls.
The lifetime of the mb_controller is linked to the lifetime of the device object, so storing a reference from this function is not allowed.
mboard | The motherboard index |
uhd::not_implemented_error | if not on an RFNoC device. |
|
pure virtual |
Get canonical name for this USRP motherboard.
mboard | which motherboard to query |
|
pure virtual |
Get a motherboard sensor value.
name | the name of the sensor |
mboard | the motherboard index 0 to M-1 |
|
pure virtual |
Get a list of possible motherboard sensor names.
mboard | the motherboard index 0 to M-1 |
|
pure virtual |
Return the normalized RX gain value.
See set_normalized_rx_gain() for a discussion of normalized gains.
chan | the channel index 0 to N-1 |
A | uhd::runtime_error if the gain value is outside [0, 1]. |
|
pure virtual |
Return the normalized TX gain value.
See set_normalized_rx_gain() for a discussion of normalized gains.
chan | the channel index 0 to N-1 |
A | uhd::runtime_error if the gain value is outside [0, 1]. |
|
pure virtual |
Get the number of USRP motherboards in this configuration.
|
pure virtual |
Get a printable summary for this USRP configuration.
|
pure virtual |
Get direct access to the underlying RFNoC radio object.
Note: This is an advanced API, created for corner cases where the application is using multi_usrp, but some special features from radio_control need to be used that are not exposed by multi_usrp. Note that it is possible to put the radio and multi_usrp into a broken state by directly accessing the radio. For typical radio operations (such as tuning, setting gain or antenna, etc.) it is therefore highly recommended to not use this API call, but use the native multi_usrp API calls.
The lifetime of the radio is linked to the lifetime of the device object, so storing a reference from this function is not allowed.
chan | The channel index |
uhd::not_implemented_error | if not on an RFNoC device. |
|
pure virtual |
Get the selected RX antenna on the frontend.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get a list of possible RX antennas on the frontend.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the RX bandwidth on the frontend
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the range of the possible RX bandwidth settings.
chan | the channel index 0 to N-1 |
|
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!
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the valid range for RX DC offset values.
chan | the channel index 0 to N-1 |
|
pure virtual |
Return the filter object for the given RX filter name.
name | the name of the filter as returned from get_rx_filter_names(). |
chan | RX channel index 0 to N-1 |
|
pure virtual |
Enumerate the available filters in the RX signal path.
chan | RX channel index 0 to N-1 |
|
pure virtual |
Get the RX center frequency.
chan | the channel index 0 to N-1 |
|
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.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the RX gain value for the specified gain element. For an empty name, sum across all gain elements.
name | the name of the gain element |
chan | the channel index 0 to N-1 |
|
inline |
A convenience wrapper for getting overall RX gain.
|
pure virtual |
Get the names of the gain elements in the RX chain. Gain elements are ordered from antenna to FPGA.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the RX gain profile.
chan | the channel index 0 to N-1 |
|
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
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the RX gain range for the specified gain element. For an empty name, calculate the overall gain range.
name | the name of the gain element |
chan | the channel index 0 to N-1 |
|
inline |
A convenience wrapper for getting overall RX gain range.
|
pure virtual |
Returns true if the currently selected LO is being exported.
name | the name of the LO stage to query |
chan | the channel index 0 to N-1 |
|
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.
name | the name of the LO stage to query |
chan | the channel index 0 to N-1 |
|
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.
name | the name of the LO stage to query |
chan | the channel index 0 to N-1 |
|
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.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the currently selected LO source.
Channels without controllable LO sources will always return "internal".
name | the name of the LO stage to query |
chan | the channel index 0 to N-1 |
|
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, for example, has more options, such as "companion". These options are device-specific, so consult the individual device manual pages for details.
name | the name of the LO stage to query |
chan | the channel index 0 to N-1 |
|
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.
|
pure virtual |
Return the available RX power range given the current configuration
This will return the range of available power levels given the current frequency, gain profile, antenna, and whatever other settings may affect the available power ranges. Note that the available power range may change frequently, so don't assume an immutable range.
chan | The channel index |
|
pure virtual |
Return the actual reference RX power level.
Note: This functionality is not supported for most devices, and will cause a uhd::not_implemented_error exception to be thrown on devices that do not have this functionality.
For more information on how to use this API, see Power Level Controls.
chan | The channel for which this setting is queried |
uhd::not_implemented_error | if this functionality does not exist for this device |
|
pure virtual |
Gets the RX sample rate.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get a range of possible RX rates.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get an RX frontend sensor value.
name | the name of the sensor |
chan | the channel index 0 to N-1 |
|
pure virtual |
Get a list of possible RX frontend sensor names.
chan | the channel index 0 to N-1 |
|
pure virtual |
Convenience method to get a RX streamer. See also uhd::device::get_rx_stream().
|
pure virtual |
Get the name of the RX frontend.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the RX frontend specification.
mboard | the motherboard index 0 to M-1 |
|
pure virtual |
Get the currently set sync source.
mboard | which motherboard to get the config |
|
pure virtual |
Get a list of available sync sources
mboard | which motherboard to get the config |
|
pure virtual |
Get the time when the last pps pulse occurred.
mboard | which motherboard to query |
|
pure virtual |
Get the current time in the usrp time registers.
mboard | which motherboard to query |
|
pure virtual |
Get the currently set time source.
mboard | which motherboard to get the config |
|
pure virtual |
Get a list of possible time sources.
mboard | which motherboard to get the list |
|
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.
|
pure virtual |
Return a reference to the property tree
|
pure virtual |
Get the selected TX antenna on the frontend.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get a list of possible TX antennas on the frontend.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the TX bandwidth on the frontend.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the range of the possible TX bandwidth settings.
chan | the channel index 0 to N-1 |
|
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!
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the valid range for TX DC offset values.
chan | the channel index 0 to N-1 |
|
pure virtual |
Return the filter object for the given TX filter name.
name | the name of the filter as returned from get_tx_filter_names(). |
chan | TX channel index 0 to N-1 |
|
pure virtual |
Enumerate the available filters in the TX signal path.
chan | TX channel index 0 to N-1 |
|
pure virtual |
Get the TX center frequency.
chan | the channel index 0 to N-1 |
|
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.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the TX gain value for the specified gain element. For an empty name, sum across all gain elements.
name | the name of the gain element |
chan | the channel index 0 to N-1 |
|
inline |
A convenience wrapper for getting overall TX gain.
|
pure virtual |
Get the names of the gain elements in the TX chain. Gain elements are ordered from antenna to FPGA.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the TX gain profile.
chan | the channel index 0 to N-1 |
|
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
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the TX gain range for the specified gain element. For an empty name, calculate the overall gain range.
name | the name of the gain element |
chan | the channel index 0 to N-1 |
|
inline |
A convenience wrapper for getting overall TX gain range.
|
pure virtual |
Returns true if the currently selected LO is being exported.
name | the name of the LO stage to query |
chan | the channel index 0 to N-1 |
|
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.
name | the name of the LO stage to query |
chan | the channel index 0 to N-1 |
|
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.
name | the name of the LO stage to query |
chan | the channel index 0 to N-1 |
|
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.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the currently selected TX LO source.
Channels without controllable LO sources will always return "internal".
name | the name of the LO stage to query |
chan | the channel index 0 to N-1 |
|
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.
name | the name of the LO stage to query |
chan | the channel index 0 to N-1 |
|
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.
|
pure virtual |
Return the available TX power range given the current configuration
This will return the range of available power levels given the current frequency, gain profile, antenna, and whatever other settings may affect the available power ranges. Note that the available power range may change frequently, so don't assume an immutable range.
chan | The channel index |
|
pure virtual |
Return the actual reference TX power level.
Note: This functionality is not supported for most devices, and will cause a uhd::not_implemented_error exception to be thrown on devices that do not have this functionality.
For more information on how to use this API, see Power Level Controls.
chan | The channel for which this setting is queried |
uhd::not_implemented_error | if this functionality does not exist for this device |
|
pure virtual |
Gets the TX sample rate.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get a range of possible TX rates.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get an TX frontend sensor value.
name | the name of the sensor |
chan | the channel index 0 to N-1 |
|
pure virtual |
Get a list of possible TX frontend sensor names.
chan | the channel index 0 to N-1 |
|
pure virtual |
Convenience method to get a TX streamer. See also uhd::device::get_tx_stream().
|
pure virtual |
Get the name of the TX frontend.
chan | the channel index 0 to N-1 |
|
pure virtual |
Get the TX frontend specification.
mboard | the motherboard index 0 to M-1 |
|
pure virtual |
Return a user settings interface object
This is only supported by the B2xx series. It will return an object that will allow to peek and poke user settings, which typically are implemented by custom FPGA images. If the device does not support such an interface, it will return a null pointer. This allows to probe this functionality, but can lead to dereferencing errors if no checks are performed.
A typical way to use this is as follows:
|
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.
chan | channel index 0 to N-1 |
|
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.
chan | channel index 0 to N-1 |
|
pure virtual |
Return true if this channel has a reference power API enabled
Many devices either don't have a built-in reference power API, or they require calibration data for it to work. This means that it is not clear, even when the device type is known, if a device supports setting a power reference level. Use this method to query the availability of set_rx_power_reference() and get_rx_power_reference(), which will throw a uhd::not_implemented_error or uhd::runtime_error if they cannot be used.
See Power Level Controls for more information, or query the specific device's manual page to see if a power API is available, and how to enable it.
chan | The channel for which this feature is queried |
|
pure virtual |
Return true if this channel has a reference power API enabled
Many devices either don't have a built-in reference power API, or they require calibration data for it to work. This means that it is not clear, even when the device type is known, if a device supports setting a power reference level. Use this method to query the availability of set_tx_power_reference() and get_tx_power_reference(), which will throw a uhd::not_implemented_error or uhd::runtime_error if they cannot be used.
See Power Level Controls for more information, or query the specific device's manual page to see if a power API is available, and how to enable it.
chan | The channel for which this feature is queried |
|
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.
stream_cmd | the stream command to issue |
chan | the channel index 0 to N-1 |
|
static |
Make a new multi usrp from the device address.
dev_addr | the device address |
uhd::key_error | no device found |
uhd::index_error | fewer devices found than expected |
|
pure virtual |
Set the clock source for the USRP device
This sets the source of the frequency reference, typically a 10 MHz signal. In order to frequency-align multiple USRPs, it is necessary to connect all of them to a common reference and provide them with the same clock source. Typical values for source
are 'internal', 'external'. Refer to the specific device manual for a full list of options.
If the value for for source
is not available for this device, it will throw an exception. Calling get_clock_sources() will return a valid list of options for this method.
Side effects: Some devices only support certain combinations of time and clock source. It is possible that the underlying device implementation will change the time source when the clock source changes and vice versa. Reading back the current values of clock and time source using get_clock_source() and get_time_source() is the only certain way of knowing which clock and time source are currently selected.
This function does not force a re-initialization of the underlying hardware when the value does not change. Consider the following snippet:
See also:
source | a string representing the time source |
mboard | which motherboard to set the config |
if | source is an invalid option |
|
pure virtual |
Send the clock signal 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.
If the device does not support this operation, calling this method will throw a uhd::runtime_error.
enb | true to output the clock source. |
mboard | which motherboard to set |
if | the device is incapable of exporting the clock signal. |
|
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.
time_spec | the time at which the next command will activate |
mboard | which motherboard to set the config |
|
pure virtual |
Set a GPIO attribute on a particular GPIO bank.
Possible attribute names:
bank | the name of a GPIO bank |
attr | the name of a GPIO attribute |
value | the new value for this GPIO bank |
mask | the bit mask to effect which pins are changed |
mboard | the motherboard index 0 to M-1 |
an | exception if either bank or attr are invalid values. |
|
pure virtual |
Set the current source for each pin in a GPIO bank.
Note: The length of the vector must be identical to the number of programmable GPIO pins.
bank | the name of a GPIO bank. Valid values can be obtained by calling get_gpio_src_banks(). |
src | a list of strings specifying the source of each pin in a GPIO bank |
mboard | the motherboard index 0 to M-1 |
uhd::key_error | if the bank does not exist |
uhd::value_error | if the source does not exist |
uhd::not_implemented_error | if the current motherboard does not support this feature |
|
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
.
rate | the new master clock rate in Hz |
mboard | the motherboard index 0 to M-1 |
|
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. If the requested normalized gain is outside of this range, an exception is thrown.
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.
gain | the normalized gain value |
chan | the channel index 0 to N-1 |
A | uhd::runtime_error if the gain value is outside [0, 1]. |
|
pure virtual |
Set the normalized TX gain value.
See set_normalized_rx_gain() for a discussion on normalized gains. If the requested normalized gain is outside of this range, an exception is thrown.
gain | the normalized gain value |
chan | the channel index 0 to N-1 |
A | uhd::runtime_error if the gain value is outside [0, 1]. |
|
pure virtual |
Enable or disable the RX AGC module.
Only some devices implement an AGC, including all USRPs from the B200 series, the E310, and the E320. When called on a device that does not implement an AGC, an exception will be thrown.
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.
enable | Enable or Disable the AGC |
chan | the channel index 0 to N-1 |
if | the underlying device does not implement an AGC. |
|
pure virtual |
Select the RX antenna on the frontend.
ant | the antenna name. If an invalid name is provided, an exception is thrown. Call get_rx_antennas() to return a valid list of antenna names. |
chan | the channel index 0 to N-1 |
if | an invalid antenna name is provided |
|
pure virtual |
Set the RX bandwidth on the frontend.
If a bandwidth is provided that is outside the valid range, it is coerced to the nearest valid value. Call get_rx_bandwidth_range() to identify the valid range of bandwidth values.
bandwidth | the bandwidth in Hz |
chan | the channel index 0 to N-1 |
|
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.
enb | true to enable automatic DC offset correction |
chan | the channel index 0 to N-1 |
|
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.
offset | the dc offset (1.0 is full-scale) |
chan | the channel index 0 to N-1 |
|
pure virtual |
Write back a filter obtained by get_rx_filter() to the signal path. This filter can be a modified version of the originally returned one.
name | the name of the filter as returned from get_rx_filter_names(). |
filter | the filter_info_base::sptr of the filter object to be written |
chan | RX channel index 0 to N-1 |
|
pure virtual |
Set the RX center frequency.
If the requested frequency is outside of the valid frequency range, it will be coerced to the nearest valid frequency. Check the return value or call get_rx_freq() to get the actual center frequency.
tune_request | tune request instructions |
chan | the channel index 0 to N-1 |
|
pure virtual |
Set the RX gain value for the specified gain element.
If the requested gain value is outside the valid range, it will be coerced to a valid gain value. Call get_rx_gain_range() to return the currently valid gain range, and call get_rx_gain() after calling this function to return the actual current gain value after coercion.
For an empty name, distribute across all gain elements.
gain | the gain in dB |
name | the name of the gain element |
chan | the channel index 0 to N-1 |
|
inline |
A convenience wrapper for setting overall RX gain.
|
pure virtual |
Set the RX gain profile.
Call get_rx_gain_profile_names() for valid names.
profile | the profile string option |
chan | the channel index 0 to N-1 |
if | the requested gain profile name is not valid. |
|
pure virtual |
Enable/disable the automatic IQ imbalance correction.
enb | true to enable automatic IQ balance correction |
chan | the channel index 0 to N-1 |
|
pure virtual |
Set the RX frontend IQ imbalance correction. Use this to adjust the magnitude and phase of I and Q.
correction | the complex correction (1.0 is full-scale) |
chan | the channel index 0 to N-1 |
|
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.
enabled | if true then export the LO |
name | the name of the LO stage to update |
chan | the channel index 0 to N-1 for the source channel |
uhd::runtime_error | if LO exporting is not enabled |
|
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:
freq | the frequency to set the LO to |
name | the name of the LO stage to update |
chan | the channel index 0 to N-1 |
if | the LO name is not valid. |
|
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. Call get_rx_lo_sources() to enumerate the list of valid options. Calling this function with an invalid argument will cause an exception to be thrown.
src | a string representing the LO source |
name | the 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. Call get_tx_lo_names() for a list of valid argument values. |
chan | the channel index 0 to N-1 |
uhd::not_implemented_error | if the device cannot set the LO source |
uhd::value_error | if the device can set the LO source, but the LO name is invalid. |
|
pure virtual |
Set the reference RX power level for a given channel
Note: This functionality is not supported for most devices, and will cause a uhd::not_implemented_error exception to be thrown on devices that do not have this functionality.
For more information on how to use this API, see Power Level Controls.
power_dbm | The reference power level in dBm |
chan | The channel for which this setting applies |
uhd::not_implemented_error | if this functionality does not exist for this device |
|
pure virtual |
Set the RX sample rate
This function will coerce the requested rate to a rate that the device can handle. A warning may be logged during coercion. Call get_rx_rate() to identify the actual rate.
rate | the rate in Sps |
chan | the channel index 0 to N-1 |
|
pure virtual |
Set the number of samples sent per packet (spp) for RX streaming
On RFNoC devices, this will set the spp value on the radio itself. For older devices, it will inject the spp value into a later get_rx_stream() call, but it won't change anything in existing streamers.
spp | the new spp value |
chan | the channel index 0 to N-1 |
|
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.
spec | the new frontend specification |
mboard | the motherboard index 0 to M-1 |
if | an invalid spec is provided. |
|
pure virtual |
Set the reference/synchronization sources for the USRP device
Typically, this will set both clock and time source in a single call. For some USRPs, this may be significantly faster than calling set_time_source() and set_clock_source() individually.
Example:
This function does not force a re-initialization of the underlying hardware when the value does not change. See also set_time_source() and set_clock_source() for more details.
sync_source | A dictionary representing the various source settings. |
mboard | which motherboard to set the config |
uhd::value_error | if the sources don't actually exist or if the combination of clock and time source is invalid. |
|
pure virtual |
Set the reference/synchronization sources for the USRP device
This is a shorthand for calling set_sync_source(device_addr_t("clock_source=$CLOCK_SOURCE,time_source=$TIME_SOURCE"))
clock_source | A string representing the clock source |
time_source | A string representing the time source |
mboard | which motherboard to set the config |
uhd::value_error | if the sources don't actually exist |
|
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.
time_spec | the time to latch into the usrp device |
mboard | the motherboard index 0 to M-1 |
|
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.
time_spec | the time to latch into the usrp device |
mboard | the motherboard index 0 to M-1 |
|
pure virtual |
Set the time source for the USRP device
This sets the method of time synchronization, typically a pulse per second signal. In order to time-align multiple USRPs, it is necessary to connect all of them to a common reference and provide them with the same time source. Typical values for source
are 'internal', 'external'. Refer to the specific device manual for a full list of options.
If the value for for source
is not available for this device, it will throw an exception. Calling get_time_sources() will return a valid list of options for this method.
Side effects: Some devices only support certain combinations of time and clock source. It is possible that the underlying device implementation will change the clock source when the time source changes and vice versa. Reading back the current values of clock and time source using get_clock_source() and get_time_source() is the only certain way of knowing which clock and time source are currently selected.
This function does not force a re-initialization of the underlying hardware when the value does not change. Consider the following snippet:
See also:
source | a string representing the time source |
mboard | which motherboard to set the config |
if | source is an invalid option |
|
pure virtual |
Send the time signal (PPS) 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.
If the device does not support this operation, calling this method will throw a uhd::runtime_error.
enb | true to output the time source. |
mboard | which motherboard to set |
if | the device is incapable of exporting the clock signal. |
|
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.
time_spec | the time to latch at the next pps after catching the edge |
|
pure virtual |
Select the TX antenna on the frontend.
ant | the antenna name. If an invalid name is provided, an exception is thrown. Call get_tx_antennas() to return a valid list of antenna names. |
chan | the channel index 0 to N-1 |
if | an invalid antenna name is provided |
|
pure virtual |
Set the TX bandwidth on the frontend.
If a bandwidth is provided that is outside the valid range, it is coerced to the nearest valid value. Call get_tx_bandwidth_range() to identify the valid range of bandwidth values.
bandwidth | the bandwidth in Hz |
chan | the channel index 0 to N-1 |
|
pure virtual |
Set a constant TX DC offset value. The value is complex to control both I and Q.
offset | the dc offset (1.0 is full-scale) |
chan | the channel index 0 to N-1 |
|
pure virtual |
Write back a filter obtained by get_tx_filter() to the signal path. This filter can be a modified version of the originally returned one.
name | the name of the filter as returned from get_tx_filter_names(). |
filter | the filter_info_base::sptr of the filter object to be written |
chan | TX channel index 0 to N-1 |
|
pure virtual |
Set the TX center frequency.
If the requested frequency is outside of the valid frequency range, it will be coerced to the nearest valid frequency. Check the return value or call get_tx_freq() to get the actual center frequency.
tune_request | tune request instructions |
chan | the channel index 0 to N-1 |
|
pure virtual |
Set the TX gain value for the specified gain element.
If the requested gain value is outside the valid range, it will be coerced to a valid gain value. Call get_rx_gain_range() to return the currently valid gain range, and call get_rx_gain() after calling this function to return the actual current gain value after coercion.
For an empty name, distribute across all gain elements.
gain | the gain in dB |
name | the name of the gain element |
chan | the channel index 0 to N-1 |
|
inline |
A convenience wrapper for setting overall TX gain.
|
pure virtual |
Set the TX gain profile.
Call get_tx_gain_profile_names() for valid names.
profile | the profile string option. |
chan | the channel index 0 to N-1 |
if | the requested gain profile name is not valid. |
|
pure virtual |
Set the TX frontend IQ imbalance correction. Use this to adjust the magnitude and phase of I and Q.
correction | the complex correction (1.0 is full-scale) |
chan | the channel index 0 to N-1 |
|
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.
enabled | if true then export the LO |
name | the name of the LO stage to update |
chan | the channel index 0 to N-1 for the source channel |
uhd::runtime_error | if LO exporting is not enabled |
|
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:
freq | the frequency to set the LO to |
name | the name of the LO stage to update |
chan | the channel index 0 to N-1 |
if | the LO name is not valid. |
|
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. Call get_tx_lo_sources() to enumerate the list of valid options. Calling this function with an invalid argument will cause an exception to be thrown.
src | a string representing the LO source |
name | the 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. Call get_tx_lo_names() for a list of valid argument values. |
chan | the channel index 0 to N-1 |
|
pure virtual |
Set the reference TX power level for a given channel
Note: This functionality is not supported for most devices, and will cause a uhd::not_implemented_error exception to be thrown on devices that do not have this functionality.
For more information on how to use this API, see Power Level Controls.
power_dbm | The reference power level in dBm |
chan | The channel for which this setting applies |
uhd::not_implemented_error | if this functionality does not exist for this device |
|
pure virtual |
Set the TX sample rate.
This function will coerce the requested rate to a rate that the device can handle. A warning may be logged during coercion. Call get_rx_rate() to identify the actual rate.
rate | the rate in Sps |
chan | the channel index 0 to N-1 |
|
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.
spec | the new frontend specification |
mboard | the motherboard index 0 to M-1 |
if | an invalid spec is provided. |
|
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.
addr | 8-bit register address |
data | 32-bit register value |
mboard | which motherboard to set the user register |
uhd::not_implemented_error | on RFNoC devices, uhd::lookup_error on other devices if this API is not implemented. |
|
static |
A wildcard channel index.
|
static |
A wildcard gain element name.
|
static |
A wildcard LO stage name.
|
static |
A wildcard motherboard index.