TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/EttusResearch/uhd/llms.txt
Use this file to discover all available pages before exploring further.
multi_usrp class is the primary high-level C++ interface to USRP hardware. It abstracts a single USRP with one or more channels, or multiple USRPs in a homogeneous configuration, into a unified control surface. Every RF parameter — frequency, gain, sample rate, bandwidth, clocking, and synchronization — is accessible through this class. For most applications, multi_usrp is the only object you need to configure hardware before calling get_rx_stream() or get_tx_stream() to begin sample transfers.
For Generation-3 USRPs and above (X3xx, X4xx, N3xx), the
multi_usrp interface is internally backed by the RFNoC graph. Advanced users requiring per-block control should consider using rfnoc_graph directly.Factory
Device address arguments. Pass an empty string to find and connect to the first available USRP, or specify keys such as
"addr=192.168.10.2", "type=b200", or "serial=30C419A" to target a specific device.uhd::usrp::multi_usrp::sptr (a std::shared_ptr<multi_usrp>)
Throws: uhd::key_error if no device is found; uhd::index_error if fewer devices are found than expected.
Streamers
Streamers are the objects used to actually move samples between the host and the device. Call these after all hardware parameters have been configured.get_rx_stream()
args. See rx_streamer for the full receive API.
get_tx_stream()
args. See tx_streamer for the full transmit API.
Frequency Control
Tuning moves the hardware LO and DSP chain so that the specified center frequency falls in-band. The actual tuned frequency may differ slightly from the requested value due to hardware coercion — always call theget_*_freq() accessor after tuning.
set_rx_freq()
Frequency tuning request. The simplest form is
uhd::tune_request_t(freq_hz), which uses automatic LO and DSP placement. For manual control, set rf_freq_policy and dsp_freq_policy to POLICY_MANUAL and provide explicit rf_freq and dsp_freq values. See tune_request_t.Channel index (0-based). Use
multi_usrp::ALL_CHANS to apply to all channels simultaneously.set_tx_freq()
set_rx_freq(), applied to the transmit chain.
get_rx_freq() / get_tx_freq()
Gain Control
Gain values are in dB. The device will coerce the requested gain to the nearest valid value. Normalized gain maps the full hardware range to [0.0, 1.0].set_rx_gain() / set_tx_gain()
Gain in dB. Will be coerced to the valid range; call
get_rx_gain_range() or get_tx_gain_range() to query limits.Name of a specific gain stage (e.g.,
"PGA", "LNA"). Defaults to multi_usrp::ALL_GAINS which applies the gain across all stages.Channel index.
get_rx_gain() / get_tx_gain()
Normalized Gain
Sample Rate
All channels on a device share a single RX sample rate and a single TX sample rate.set_rx_rate() / set_tx_rate()
Sample rate in samples per second (Sps). The device will coerce to the nearest valid rate. Call
get_rx_rate() or get_tx_rate() after setting to read back the actual coerced value.get_rx_rate() / get_tx_rate()
Bandwidth
Frontend analog bandwidth controls the receive or transmit filter width on the daughterboard.set_rx_bandwidth() / set_tx_bandwidth()
Analog bandwidth in Hz. The device coerces to the nearest supported value.
Clocking and Synchronization
Proper clocking setup is essential for timed operations and multi-device synchronization.set_clock_source()
Clock source name. Common values:
"internal" (default), "external" (REF IN SMA), "gpsdo". Available sources are device-dependent; query with get_clock_sources().set_time_source()
Time/PPS source. Common values:
"internal", "external", "gpsdo". Controls which signal is used as the 1 PPS reference for time alignment.set_time_now()
set_time_next_pps() instead.
set_time_next_pps()
Sensors
Sensors report hardware-measured quantities such as lock status, temperature, and RSSI.get_rx_sensor()
get_rx_sensor_names(chan).
get_tx_sensor()
get_mboard_sensor()
"ref_locked", "gps_locked", "temp").
Subdev Specification
Subdev specs map logical channels to physical daughterboard frontends. The format is"Slot:Name", for example "A:A" (slot A, frontend A).
set_rx_subdev_spec()
set_tx_subdev_spec()
Complete RX Streaming Example
Constants
| Constant | Description |
|---|---|
multi_usrp::ALL_MBOARDS | Wildcard: apply to all motherboards |
multi_usrp::ALL_CHANS | Wildcard: apply to all channels |
multi_usrp::ALL_GAINS | Wildcard: apply gain across all gain stages |
multi_usrp::ALL_LOS | Wildcard: apply LO setting to all LO stages |
