USRP Hardware Driver and USRP Manual  Version: 003.009.006-0-g122d5f8e
UHD and USRP Manual
usrp.h File Reference
#include <uhd/config.h>
#include <uhd/error.h>
#include <uhd/types/metadata.h>
#include <uhd/types/ranges.h>
#include <uhd/types/sensors.h>
#include <uhd/types/string_vector.h>
#include <uhd/types/tune_request.h>
#include <uhd/types/tune_result.h>
#include <uhd/types/usrp_info.h>
#include <uhd/usrp/mboard_eeprom.h>
#include <uhd/usrp/dboard_eeprom.h>
#include <uhd/usrp/subdev_spec.h>
#include <uhd/version.hpp>
#include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
#include <time.h>

Go to the source code of this file.

Classes

struct  uhd_usrp_register_info_t
 Register info. More...
 
struct  uhd_stream_args_t
 A struct of parameters to construct a stream. More...
 
struct  uhd_stream_cmd_t
 Define how device streams to host. More...
 

Typedefs

typedef struct uhd_rx_streamer * uhd_rx_streamer_handle
 C-level interface for working with an RX streamer. More...
 
typedef struct uhd_tx_streamer * uhd_tx_streamer_handle
 C-level interface for working with a TX streamer. More...
 
typedef struct uhd_usrp * uhd_usrp_handle
 C-level interface for working with a USRP device. More...
 

Enumerations

enum  uhd_stream_mode_t { UHD_STREAM_MODE_START_CONTINUOUS = 97, UHD_STREAM_MODE_STOP_CONTINUOUS = 111, UHD_STREAM_MODE_NUM_SAMPS_AND_DONE = 100, UHD_STREAM_MODE_NUM_SAMPS_AND_MORE = 109 }
 How streaming is issued to the device. More...
 

Functions

UHD_API uhd_error uhd_rx_streamer_make (uhd_rx_streamer_handle *h)
 Create an RX streamer handle. More...
 
UHD_API uhd_error uhd_rx_streamer_free (uhd_rx_streamer_handle *h)
 Free an RX streamer handle. More...
 
UHD_API uhd_error uhd_rx_streamer_num_channels (uhd_rx_streamer_handle h, size_t *num_channels_out)
 Get the number of channels associated with this streamer. More...
 
UHD_API uhd_error uhd_rx_streamer_max_num_samps (uhd_rx_streamer_handle h, size_t *max_num_samps_out)
 Get the max number of samples per buffer per packet. More...
 
UHD_API uhd_error uhd_rx_streamer_recv (uhd_rx_streamer_handle h, void **buffs, size_t samps_per_buff, uhd_rx_metadata_handle *md, double timeout, bool one_packet, size_t *items_recvd)
 Receive buffers containing samples into the given RX streamer. More...
 
UHD_API uhd_error uhd_rx_streamer_issue_stream_cmd (uhd_rx_streamer_handle h, const uhd_stream_cmd_t *stream_cmd)
 Issue the given stream command. More...
 
UHD_API uhd_error uhd_rx_streamer_last_error (uhd_rx_streamer_handle h, char *error_out, size_t strbuffer_len)
 Get the last error reported by the RX streamer. More...
 
UHD_API uhd_error uhd_tx_streamer_make (uhd_tx_streamer_handle *h)
 Create an TX streamer handle. More...
 
UHD_API uhd_error uhd_tx_streamer_free (uhd_tx_streamer_handle *h)
 Free an TX streamer handle. More...
 
UHD_API uhd_error uhd_tx_streamer_num_channels (uhd_tx_streamer_handle h, size_t *num_channels_out)
 Get the number of channels associated with this streamer. More...
 
UHD_API uhd_error uhd_tx_streamer_max_num_samps (uhd_tx_streamer_handle h, size_t *max_num_samps_out)
 Get the max number of samples per buffer per packet. More...
 
UHD_API uhd_error uhd_tx_streamer_send (uhd_tx_streamer_handle h, const void **buffs, size_t samps_per_buff, uhd_tx_metadata_handle *md, double timeout, size_t *items_sent)
 Send buffers containing samples described by the metadata. More...
 
UHD_API uhd_error uhd_tx_streamer_recv_async_msg (uhd_tx_streamer_handle h, uhd_async_metadata_handle *md, double timeout, bool *valid)
 Receive an asynchronous message from this streamer. More...
 
UHD_API uhd_error uhd_tx_streamer_last_error (uhd_tx_streamer_handle h, char *error_out, size_t strbuffer_len)
 Get the last error reported by the TX streamer. More...
 
UHD_API uhd_error uhd_usrp_find (const char *args, uhd_string_vector_handle *strings_out)
 Find all connected USRP devices. More...
 
UHD_API uhd_error uhd_usrp_make (uhd_usrp_handle *h, const char *args)
 Create a USRP handle. More...
 
UHD_API uhd_error uhd_usrp_free (uhd_usrp_handle *h)
 Safely destroy the USRP object underlying the handle. More...
 
UHD_API uhd_error uhd_usrp_last_error (uhd_usrp_handle h, char *error_out, size_t strbuffer_len)
 Get the last error reported by the USRP handle. More...
 
UHD_API uhd_error uhd_usrp_get_rx_stream (uhd_usrp_handle h, uhd_stream_args_t *stream_args, uhd_rx_streamer_handle h_out)
 Create RX streamer from a USRP handle and given stream args. More...
 
UHD_API uhd_error uhd_usrp_get_tx_stream (uhd_usrp_handle h, uhd_stream_args_t *stream_args, uhd_tx_streamer_handle h_out)
 Create TX streamer from a USRP handle and given stream args. More...
 
UHD_API uhd_error uhd_usrp_get_rx_info (uhd_usrp_handle h, size_t chan, uhd_usrp_rx_info_t *info_out)
 Get RX info from the USRP device. More...
 
UHD_API uhd_error uhd_usrp_get_tx_info (uhd_usrp_handle h, size_t chan, uhd_usrp_tx_info_t *info_out)
 Get TX info from the USRP device. More...
 
UHD_API uhd_error uhd_usrp_set_master_clock_rate (uhd_usrp_handle h, double rate, size_t mboard)
 Set the master clock rate. More...
 
UHD_API uhd_error uhd_usrp_get_master_clock_rate (uhd_usrp_handle h, size_t mboard, double *clock_rate_out)
 Get the master clock rate. More...
 
UHD_API uhd_error uhd_usrp_get_pp_string (uhd_usrp_handle h, char *pp_string_out, size_t strbuffer_len)
 Get a pretty-print representation of the USRP device. More...
 
UHD_API uhd_error uhd_usrp_get_mboard_name (uhd_usrp_handle h, size_t mboard, char *mboard_name_out, size_t strbuffer_len)
 Get the motherboard name for the given device. More...
 
UHD_API uhd_error uhd_usrp_get_time_now (uhd_usrp_handle h, size_t mboard, time_t *full_secs_out, double *frac_secs_out)
 Get the USRP device's current internal time. More...
 
UHD_API uhd_error uhd_usrp_get_time_last_pps (uhd_usrp_handle h, size_t mboard, time_t *full_secs_out, double *frac_secs_out)
 Get the time when this device's last PPS pulse occurred. More...
 
UHD_API uhd_error uhd_usrp_set_time_now (uhd_usrp_handle h, time_t full_secs, double frac_secs, size_t mboard)
 Set the USRP device's time. More...
 
UHD_API uhd_error uhd_usrp_set_time_next_pps (uhd_usrp_handle h, time_t full_secs, double frac_secs, size_t mboard)
 Set the USRP device's time to the given value upon the next PPS detection. More...
 
UHD_API uhd_error uhd_usrp_set_time_unknown_pps (uhd_usrp_handle h, time_t full_secs, double frac_secs)
 Synchronize the time across all motherboards. More...
 
UHD_API uhd_error uhd_usrp_get_time_synchronized (uhd_usrp_handle h, bool *result_out)
 Are all motherboard times synchronized? More...
 
UHD_API uhd_error uhd_usrp_set_command_time (uhd_usrp_handle h, time_t full_secs, double frac_secs, size_t mboard)
 Set the time at which timed commands will take place. More...
 
UHD_API uhd_error uhd_usrp_clear_command_time (uhd_usrp_handle h, size_t mboard)
 Clear the command time so that commands are sent ASAP. More...
 
UHD_API uhd_error uhd_usrp_set_time_source (uhd_usrp_handle h, const char *time_source, size_t mboard)
 Set the time source for the given device. More...
 
UHD_API uhd_error uhd_usrp_get_time_source (uhd_usrp_handle h, size_t mboard, char *time_source_out, size_t strbuffer_len)
 Get the time source for the given device. More...
 
UHD_API uhd_error uhd_usrp_get_time_sources (uhd_usrp_handle h, size_t mboard, uhd_string_vector_handle *time_sources_out)
 Get a list of time sources for the given device. More...
 
UHD_API uhd_error uhd_usrp_set_clock_source (uhd_usrp_handle h, const char *clock_source, size_t mboard)
 Set the given device's clock source. More...
 
UHD_API uhd_error uhd_usrp_get_clock_source (uhd_usrp_handle h, size_t mboard, char *clock_source_out, size_t strbuffer_len)
 Get the given device's clock source. More...
 
UHD_API uhd_error uhd_usrp_get_clock_sources (uhd_usrp_handle h, size_t mboard, uhd_string_vector_handle *clock_sources_out)
 Get a list of clock sources for the given device. More...
 
UHD_API uhd_error uhd_usrp_set_clock_source_out (uhd_usrp_handle h, bool enb, size_t mboard)
 Enable or disable sending the clock source to an output connector. More...
 
UHD_API uhd_error uhd_usrp_set_time_source_out (uhd_usrp_handle h, bool enb, size_t mboard)
 Enable or disable sending the time source to an output connector. More...
 
UHD_API uhd_error uhd_usrp_get_num_mboards (uhd_usrp_handle h, size_t *num_mboards_out)
 Get the number of devices associated with the given USRP handle. More...
 
UHD_API uhd_error uhd_usrp_get_mboard_sensor (uhd_usrp_handle h, const char *name, size_t mboard, uhd_sensor_value_handle *sensor_value_out)
 Get the value associated with the given sensor name. More...
 
UHD_API uhd_error uhd_usrp_get_mboard_sensor_names (uhd_usrp_handle h, size_t mboard, uhd_string_vector_handle *mboard_sensor_names_out)
 Get a list of motherboard sensors for the given device. More...
 
UHD_API uhd_error uhd_usrp_set_user_register (uhd_usrp_handle h, uint8_t addr, uint32_t data, size_t mboard)
 Perform a write on a user configuration register bus. More...
 
UHD_API uhd_error uhd_usrp_get_mboard_eeprom (uhd_usrp_handle h, uhd_mboard_eeprom_handle mb_eeprom, size_t mboard)
 Get a handle for the given motherboard's EEPROM. More...
 
UHD_API uhd_error uhd_usrp_set_mboard_eeprom (uhd_usrp_handle h, uhd_mboard_eeprom_handle mb_eeprom, size_t mboard)
 Set values in the given motherboard's EEPROM. More...
 
UHD_API uhd_error uhd_usrp_get_dboard_eeprom (uhd_usrp_handle h, uhd_dboard_eeprom_handle db_eeprom, const char *unit, const char *slot, size_t mboard)
 Get a handle for the given device's daughterboard EEPROM. More...
 
UHD_API uhd_error uhd_usrp_set_dboard_eeprom (uhd_usrp_handle h, uhd_dboard_eeprom_handle db_eeprom, const char *unit, const char *slot, size_t mboard)
 Set values in the given daughterboard's EEPROM. More...
 
UHD_API uhd_error uhd_usrp_set_rx_subdev_spec (uhd_usrp_handle h, uhd_subdev_spec_handle subdev_spec, size_t mboard)
 Map the given device's RX frontend to a channel. More...
 
UHD_API uhd_error uhd_usrp_get_rx_subdev_spec (uhd_usrp_handle h, size_t mboard, uhd_subdev_spec_handle subdev_spec_out)
 Get the RX frontend specification for the given device. More...
 
UHD_API uhd_error uhd_usrp_get_rx_num_channels (uhd_usrp_handle h, size_t *num_channels_out)
 Get the number of RX channels for the given handle. More...
 
UHD_API uhd_error uhd_usrp_get_rx_subdev_name (uhd_usrp_handle h, size_t chan, char *rx_subdev_name_out, size_t strbuffer_len)
 Get the name for the RX frontend. More...
 
UHD_API uhd_error uhd_usrp_set_rx_rate (uhd_usrp_handle h, double rate, size_t chan)
 Set the given RX channel's sample rate (in Sps) More...
 
UHD_API uhd_error uhd_usrp_get_rx_rate (uhd_usrp_handle h, size_t chan, double *rate_out)
 Get the given RX channel's sample rate (in Sps) More...
 
UHD_API uhd_error uhd_usrp_get_rx_rates (uhd_usrp_handle h, size_t chan, uhd_meta_range_handle rates_out)
 Get a range of possible RX rates for the given channel. More...
 
UHD_API uhd_error uhd_usrp_set_rx_freq (uhd_usrp_handle h, uhd_tune_request_t *tune_request, size_t chan, uhd_tune_result_t *tune_result)
 Set the given channel's center RX frequency. More...
 
UHD_API uhd_error uhd_usrp_get_rx_freq (uhd_usrp_handle h, size_t chan, double *freq_out)
 Get the given channel's center RX frequency. More...
 
UHD_API uhd_error uhd_usrp_get_rx_freq_range (uhd_usrp_handle h, size_t chan, uhd_meta_range_handle freq_range_out)
 Get all possible center frequency ranges for the given channel. More...
 
UHD_API uhd_error uhd_usrp_get_fe_rx_freq_range (uhd_usrp_handle h, size_t chan, uhd_meta_range_handle freq_range_out)
 Get all possible RF frequency ranges for the given channel's RX RF frontend. More...
 
UHD_API uhd_error uhd_usrp_set_rx_gain (uhd_usrp_handle h, double gain, size_t chan, const char *gain_name)
 Set the RX gain for the given channel and name. More...
 
UHD_API uhd_error uhd_usrp_set_normalized_rx_gain (uhd_usrp_handle h, double gain, size_t chan)
 Set the normalized RX gain [0.0, 1.0] for the given channel. More...
 
UHD_API uhd_error uhd_usrp_set_rx_agc (uhd_usrp_handle h, bool enable, size_t chan)
 Enable or disable the given channel's RX AGC module. More...
 
UHD_API uhd_error uhd_usrp_get_rx_gain (uhd_usrp_handle h, size_t chan, const char *gain_name, double *gain_out)
 Get the given channel's RX gain. More...
 
UHD_API uhd_error uhd_usrp_get_normalized_rx_gain (uhd_usrp_handle h, size_t chan, double *gain_out)
 Get the given channel's normalized RX gain [0.0, 1.0]. More...
 
UHD_API uhd_error uhd_usrp_get_rx_gain_range (uhd_usrp_handle h, const char *name, size_t chan, uhd_meta_range_handle gain_range_out)
 Get all possible gain ranges for the given channel and name. More...
 
UHD_API uhd_error uhd_usrp_get_rx_gain_names (uhd_usrp_handle h, size_t chan, uhd_string_vector_handle *gain_names_out)
 Get a list of RX gain names for the given channel. More...
 
UHD_API uhd_error uhd_usrp_set_rx_antenna (uhd_usrp_handle h, const char *ant, size_t chan)
 Set the RX antenna for the given channel. More...
 
UHD_API uhd_error uhd_usrp_get_rx_antenna (uhd_usrp_handle h, size_t chan, char *ant_out, size_t strbuffer_len)
 Get the RX antenna for the given channel. More...
 
UHD_API uhd_error uhd_usrp_get_rx_antennas (uhd_usrp_handle h, size_t chan, uhd_string_vector_handle *antennas_out)
 Get a list of RX antennas associated with the given channels. More...
 
UHD_API uhd_error uhd_usrp_get_rx_sensor_names (uhd_usrp_handle h, size_t chan, uhd_string_vector_handle *sensor_names_out)
 Get a list of RX sensors associated with the given channels. More...
 
UHD_API uhd_error uhd_usrp_set_rx_bandwidth (uhd_usrp_handle h, double bandwidth, size_t chan)
 Set the bandwidth for the given channel's RX frontend. More...
 
UHD_API uhd_error uhd_usrp_get_rx_bandwidth (uhd_usrp_handle h, size_t chan, double *bandwidth_out)
 Get the bandwidth for the given channel's RX frontend. More...
 
UHD_API uhd_error uhd_usrp_get_rx_bandwidth_range (uhd_usrp_handle h, size_t chan, uhd_meta_range_handle bandwidth_range_out)
 Get all possible bandwidth ranges for the given channel's RX frontend. More...
 
UHD_API uhd_error uhd_usrp_get_rx_sensor (uhd_usrp_handle h, const char *name, size_t chan, uhd_sensor_value_handle *sensor_value_out)
 Get the value for the given RX sensor. More...
 
UHD_API uhd_error uhd_usrp_set_rx_dc_offset_enabled (uhd_usrp_handle h, bool enb, size_t chan)
 Enable or disable RX DC offset correction for the given channel. More...
 
UHD_API uhd_error uhd_usrp_set_rx_iq_balance_enabled (uhd_usrp_handle h, bool enb, size_t chan)
 Enable or disable RX IQ imbalance correction for the given channel. More...
 
UHD_API uhd_error uhd_usrp_set_tx_subdev_spec (uhd_usrp_handle h, uhd_subdev_spec_handle subdev_spec, size_t mboard)
 Map the given device's TX frontend to a channel. More...
 
UHD_API uhd_error uhd_usrp_get_tx_subdev_spec (uhd_usrp_handle h, size_t mboard, uhd_subdev_spec_handle subdev_spec_out)
 Get the TX frontend specification for the given device. More...
 
UHD_API uhd_error uhd_usrp_get_tx_num_channels (uhd_usrp_handle h, size_t *num_channels_out)
 Get the number of TX channels for the given handle. More...
 
UHD_API uhd_error uhd_usrp_get_tx_subdev_name (uhd_usrp_handle h, size_t chan, char *tx_subdev_name_out, size_t strbuffer_len)
 Get the name for the RX frontend. More...
 
UHD_API uhd_error uhd_usrp_set_tx_rate (uhd_usrp_handle h, double rate, size_t chan)
 Set the given RX channel's sample rate (in Sps) More...
 
UHD_API uhd_error uhd_usrp_get_tx_rate (uhd_usrp_handle h, size_t chan, double *rate_out)
 Get the given RX channel's sample rate (in Sps) More...
 
UHD_API uhd_error uhd_usrp_get_tx_rates (uhd_usrp_handle h, size_t chan, uhd_meta_range_handle rates_out)
 Get a range of possible RX rates for the given channel. More...
 
UHD_API uhd_error uhd_usrp_set_tx_freq (uhd_usrp_handle h, uhd_tune_request_t *tune_request, size_t chan, uhd_tune_result_t *tune_result)
 Set the given channel's center TX frequency. More...
 
UHD_API uhd_error uhd_usrp_get_tx_freq (uhd_usrp_handle h, size_t chan, double *freq_out)
 Get the given channel's center TX frequency. More...
 
UHD_API uhd_error uhd_usrp_get_tx_freq_range (uhd_usrp_handle h, size_t chan, uhd_meta_range_handle freq_range_out)
 Get all possible center frequency ranges for the given channel. More...
 
UHD_API uhd_error uhd_usrp_get_fe_tx_freq_range (uhd_usrp_handle h, size_t chan, uhd_meta_range_handle freq_range_out)
 Get all possible RF frequency ranges for the given channel's TX RF frontend. More...
 
UHD_API uhd_error uhd_usrp_set_tx_gain (uhd_usrp_handle h, double gain, size_t chan, const char *gain_name)
 Set the TX gain for the given channel and name. More...
 
UHD_API uhd_error uhd_usrp_set_normalized_tx_gain (uhd_usrp_handle h, double gain, size_t chan)
 Set the normalized TX gain [0.0, 1.0] for the given channel. More...
 
UHD_API uhd_error uhd_usrp_get_tx_gain_range (uhd_usrp_handle h, const char *name, size_t chan, uhd_meta_range_handle gain_range_out)
 Get all possible gain ranges for the given channel and name. More...
 
UHD_API uhd_error uhd_usrp_get_tx_gain (uhd_usrp_handle h, size_t chan, const char *gain_name, double *gain_out)
 Get the given channel's RX gain. More...
 
UHD_API uhd_error uhd_usrp_get_normalized_tx_gain (uhd_usrp_handle h, size_t chan, double *gain_out)
 Get the given channel's normalized TX gain [0.0, 1.0]. More...
 
UHD_API uhd_error uhd_usrp_get_tx_gain_names (uhd_usrp_handle h, size_t chan, uhd_string_vector_handle *gain_names_out)
 Get a list of TX gain names for the given channel. More...
 
UHD_API uhd_error uhd_usrp_set_tx_antenna (uhd_usrp_handle h, const char *ant, size_t chan)
 Set the TX antenna for the given channel. More...
 
UHD_API uhd_error uhd_usrp_get_tx_antenna (uhd_usrp_handle h, size_t chan, char *ant_out, size_t strbuffer_len)
 Get the TX antenna for the given channel. More...
 
UHD_API uhd_error uhd_usrp_get_tx_antennas (uhd_usrp_handle h, size_t chan, uhd_string_vector_handle *antennas_out)
 Get a list of tx antennas associated with the given channels. More...
 
UHD_API uhd_error uhd_usrp_set_tx_bandwidth (uhd_usrp_handle h, double bandwidth, size_t chan)
 Set the bandwidth for the given channel's TX frontend. More...
 
UHD_API uhd_error uhd_usrp_get_tx_bandwidth (uhd_usrp_handle h, size_t chan, double *bandwidth_out)
 Get the bandwidth for the given channel's TX frontend. More...
 
UHD_API uhd_error uhd_usrp_get_tx_bandwidth_range (uhd_usrp_handle h, size_t chan, uhd_meta_range_handle bandwidth_range_out)
 Get all possible bandwidth ranges for the given channel's TX frontend. More...
 
UHD_API uhd_error uhd_usrp_get_tx_sensor (uhd_usrp_handle h, const char *name, size_t chan, uhd_sensor_value_handle *sensor_value_out)
 Get the value for the given TX sensor. More...
 
UHD_API uhd_error uhd_usrp_get_tx_sensor_names (uhd_usrp_handle h, size_t chan, uhd_string_vector_handle *sensor_names_out)
 Get a list of TX sensors associated with the given channels. More...
 
UHD_API uhd_error uhd_usrp_set_tx_dc_offset_enabled (uhd_usrp_handle h, bool enb, size_t chan)
 Enable or disable TX DC offset correction for the given channel. More...
 
UHD_API uhd_error uhd_usrp_set_tx_iq_balance_enabled (uhd_usrp_handle h, bool enb, size_t chan)
 Enable or disable TX IQ imbalance correction for the given channel. More...
 
UHD_API uhd_error uhd_usrp_get_gpio_banks (uhd_usrp_handle h, size_t mboard, uhd_string_vector_handle *gpio_banks_out)
 Get a list of GPIO banks associated with the given channels. More...
 
UHD_API uhd_error uhd_usrp_set_gpio_attr (uhd_usrp_handle h, const char *bank, const char *attr, uint32_t value, uint32_t mask, size_t mboard)
 Set a GPIO attribute for a given GPIO bank. More...
 
UHD_API uhd_error uhd_usrp_get_gpio_attr (uhd_usrp_handle h, const char *bank, const char *attr, size_t mboard, uint32_t *attr_out)
 Get a GPIO attribute on a particular GPIO bank. More...
 
UHD_API uhd_error uhd_usrp_enumerate_registers (uhd_usrp_handle h, size_t mboard, uhd_string_vector_handle *registers_out)
 Enumerate the full paths of USRP registers available for read/write. More...
 
UHD_API uhd_error uhd_usrp_get_register_info (uhd_usrp_handle h, const char *path, size_t mboard, uhd_usrp_register_info_t *register_info_out)
 Get more information about a low-level device register. More...
 
UHD_API uhd_error uhd_usrp_write_register (uhd_usrp_handle h, const char *path, uint32_t field, uint64_t value, size_t mboard)
 Write a low-level register field for a device register in the USRP hardware. More...
 
UHD_API uhd_error uhd_usrp_read_register (uhd_usrp_handle h, const char *path, uint32_t field, size_t mboard, uint64_t *value_out)
 Read a low-level register field from a device register in the USRP hardware. More...
 

Typedef Documentation

◆ uhd_rx_streamer_handle

typedef struct uhd_rx_streamer* uhd_rx_streamer_handle

C-level interface for working with an RX streamer.

See uhd::rx_streamer for more details.

◆ uhd_tx_streamer_handle

typedef struct uhd_tx_streamer* uhd_tx_streamer_handle

C-level interface for working with a TX streamer.

See uhd::tx_streamer for more details.

◆ uhd_usrp_handle

typedef struct uhd_usrp* uhd_usrp_handle

C-level interface for working with a USRP device.

Enumeration Type Documentation

◆ uhd_stream_mode_t

How streaming is issued to the device.

See uhd::stream_cmd_t for more details.

Enumerator
UHD_STREAM_MODE_START_CONTINUOUS 

Stream samples indefinitely.

UHD_STREAM_MODE_STOP_CONTINUOUS 

End continuous streaming.

UHD_STREAM_MODE_NUM_SAMPS_AND_DONE 

Stream some number of samples and finish.

UHD_STREAM_MODE_NUM_SAMPS_AND_MORE 

Stream some number of samples but expect more.

Function Documentation

◆ uhd_rx_streamer_free()

UHD_API uhd_error uhd_rx_streamer_free ( uhd_rx_streamer_handle h)

Free an RX streamer handle.

NOTE: Using a streamer after passing it into this function will result in a segmentation fault.

◆ uhd_rx_streamer_issue_stream_cmd()

UHD_API uhd_error uhd_rx_streamer_issue_stream_cmd ( uhd_rx_streamer_handle  h,
const uhd_stream_cmd_t stream_cmd 
)

Issue the given stream command.

See uhd::rx_streamer::issue_stream_cmd() for more details.

◆ uhd_rx_streamer_last_error()

UHD_API uhd_error uhd_rx_streamer_last_error ( uhd_rx_streamer_handle  h,
char *  error_out,
size_t  strbuffer_len 
)

Get the last error reported by the RX streamer.

NOTE: This will overwrite the string currently in error_out before using it to return its error.

Parameters
hRX streamer handle
error_outstring buffer in which to place error
strbuffer_lenbuffer size

◆ uhd_rx_streamer_make()

UHD_API uhd_error uhd_rx_streamer_make ( uhd_rx_streamer_handle h)

Create an RX streamer handle.

NOTE: Using this streamer before passing it into uhd_usrp_get_rx_stream() will result in undefined behavior.

◆ uhd_rx_streamer_max_num_samps()

UHD_API uhd_error uhd_rx_streamer_max_num_samps ( uhd_rx_streamer_handle  h,
size_t *  max_num_samps_out 
)

Get the max number of samples per buffer per packet.

◆ uhd_rx_streamer_num_channels()

UHD_API uhd_error uhd_rx_streamer_num_channels ( uhd_rx_streamer_handle  h,
size_t *  num_channels_out 
)

Get the number of channels associated with this streamer.

◆ uhd_rx_streamer_recv()

UHD_API uhd_error uhd_rx_streamer_recv ( uhd_rx_streamer_handle  h,
void **  buffs,
size_t  samps_per_buff,
uhd_rx_metadata_handle md,
double  timeout,
bool  one_packet,
size_t *  items_recvd 
)

Receive buffers containing samples into the given RX streamer.

See uhd::rx_streamer::recv() for more details.

Parameters
hRX streamer handle
buffspointer to buffers in which to receive samples
samps_per_buffmax number of samples per buffer
mdhandle to RX metadata in which to receive results
timeouttimeout in seconds to wait for a packet
one_packetsend a single packet
items_recvdpointer to output variable for number of samples received

◆ uhd_tx_streamer_free()

UHD_API uhd_error uhd_tx_streamer_free ( uhd_tx_streamer_handle h)

Free an TX streamer handle.

NOTE: Using a streamer after passing it into this function will result in a segmentation fault.

◆ uhd_tx_streamer_last_error()

UHD_API uhd_error uhd_tx_streamer_last_error ( uhd_tx_streamer_handle  h,
char *  error_out,
size_t  strbuffer_len 
)

Get the last error reported by the TX streamer.

NOTE: This will overwrite the string currently in error_out before using it to return its error.

Parameters
hTX streamer handle
error_outstring buffer in which to place error
strbuffer_lenbuffer size

◆ uhd_tx_streamer_make()

UHD_API uhd_error uhd_tx_streamer_make ( uhd_tx_streamer_handle h)

Create an TX streamer handle.

NOTE: Using this streamer before passing it into uhd_usrp_get_tx_stream() will result in undefined behavior.

◆ uhd_tx_streamer_max_num_samps()

UHD_API uhd_error uhd_tx_streamer_max_num_samps ( uhd_tx_streamer_handle  h,
size_t *  max_num_samps_out 
)

Get the max number of samples per buffer per packet.

◆ uhd_tx_streamer_num_channels()

UHD_API uhd_error uhd_tx_streamer_num_channels ( uhd_tx_streamer_handle  h,
size_t *  num_channels_out 
)

Get the number of channels associated with this streamer.

◆ uhd_tx_streamer_recv_async_msg()

UHD_API uhd_error uhd_tx_streamer_recv_async_msg ( uhd_tx_streamer_handle  h,
uhd_async_metadata_handle md,
double  timeout,
bool *  valid 
)

Receive an asynchronous message from this streamer.

See uhd::tx_streamer::recv_async_msg() for more details.

◆ uhd_tx_streamer_send()

UHD_API uhd_error uhd_tx_streamer_send ( uhd_tx_streamer_handle  h,
const void **  buffs,
size_t  samps_per_buff,
uhd_tx_metadata_handle md,
double  timeout,
size_t *  items_sent 
)

Send buffers containing samples described by the metadata.

See uhd::tx_streamer::send() for more details.

Parameters
hTX streamer handle
buffspointer to buffers containing samples to send
samps_per_buffmax number of samples per buffer
mdhandle to TX metadata
timeouttimeout in seconds to wait for a packet
items_sentpointer to output variable for number of samples send

◆ uhd_usrp_clear_command_time()

UHD_API uhd_error uhd_usrp_clear_command_time ( uhd_usrp_handle  h,
size_t  mboard 
)

Clear the command time so that commands are sent ASAP.

◆ uhd_usrp_enumerate_registers()

UHD_API uhd_error uhd_usrp_enumerate_registers ( uhd_usrp_handle  h,
size_t  mboard,
uhd_string_vector_handle registers_out 
)

Enumerate the full paths of USRP registers available for read/write.

◆ uhd_usrp_find()

UHD_API uhd_error uhd_usrp_find ( const char *  args,
uhd_string_vector_handle strings_out 
)

Find all connected USRP devices.

See uhd::device::find() for more details.

◆ uhd_usrp_free()

UHD_API uhd_error uhd_usrp_free ( uhd_usrp_handle h)

Safely destroy the USRP object underlying the handle.

NOTE: Attempting to use a USRP handle after passing it into this function will result in a segmentation fault.

◆ uhd_usrp_get_clock_source()

UHD_API uhd_error uhd_usrp_get_clock_source ( uhd_usrp_handle  h,
size_t  mboard,
char *  clock_source_out,
size_t  strbuffer_len 
)

Get the given device's clock source.

See uhd::usrp::multi_usrp::get_clock_source() for more details.

◆ uhd_usrp_get_clock_sources()

UHD_API uhd_error uhd_usrp_get_clock_sources ( uhd_usrp_handle  h,
size_t  mboard,
uhd_string_vector_handle clock_sources_out 
)

Get a list of clock sources for the given device.

◆ uhd_usrp_get_dboard_eeprom()

UHD_API uhd_error uhd_usrp_get_dboard_eeprom ( uhd_usrp_handle  h,
uhd_dboard_eeprom_handle  db_eeprom,
const char *  unit,
const char *  slot,
size_t  mboard 
)

Get a handle for the given device's daughterboard EEPROM.

◆ uhd_usrp_get_fe_rx_freq_range()

UHD_API uhd_error uhd_usrp_get_fe_rx_freq_range ( uhd_usrp_handle  h,
size_t  chan,
uhd_meta_range_handle  freq_range_out 
)

Get all possible RF frequency ranges for the given channel's RX RF frontend.

◆ uhd_usrp_get_fe_tx_freq_range()

UHD_API uhd_error uhd_usrp_get_fe_tx_freq_range ( uhd_usrp_handle  h,
size_t  chan,
uhd_meta_range_handle  freq_range_out 
)

Get all possible RF frequency ranges for the given channel's TX RF frontend.

◆ uhd_usrp_get_gpio_attr()

UHD_API uhd_error uhd_usrp_get_gpio_attr ( uhd_usrp_handle  h,
const char *  bank,
const char *  attr,
size_t  mboard,
uint32_t *  attr_out 
)

Get a GPIO attribute on a particular GPIO bank.

See uhd::usrp::multi_usrp::get_gpio_attr() for more details.

◆ uhd_usrp_get_gpio_banks()

UHD_API uhd_error uhd_usrp_get_gpio_banks ( uhd_usrp_handle  h,
size_t  mboard,
uhd_string_vector_handle gpio_banks_out 
)

Get a list of GPIO banks associated with the given channels.

◆ uhd_usrp_get_master_clock_rate()

UHD_API uhd_error uhd_usrp_get_master_clock_rate ( uhd_usrp_handle  h,
size_t  mboard,
double *  clock_rate_out 
)

Get the master clock rate.

See uhd::usrp::multi_usrp::get_master_clock_rate() for more details.

◆ uhd_usrp_get_mboard_eeprom()

UHD_API uhd_error uhd_usrp_get_mboard_eeprom ( uhd_usrp_handle  h,
uhd_mboard_eeprom_handle  mb_eeprom,
size_t  mboard 
)

Get a handle for the given motherboard's EEPROM.

◆ uhd_usrp_get_mboard_name()

UHD_API uhd_error uhd_usrp_get_mboard_name ( uhd_usrp_handle  h,
size_t  mboard,
char *  mboard_name_out,
size_t  strbuffer_len 
)

Get the motherboard name for the given device.

See uhd::usrp::multi_usrp::get_mboard_name() for more details.

◆ uhd_usrp_get_mboard_sensor()

UHD_API uhd_error uhd_usrp_get_mboard_sensor ( uhd_usrp_handle  h,
const char *  name,
size_t  mboard,
uhd_sensor_value_handle sensor_value_out 
)

Get the value associated with the given sensor name.

◆ uhd_usrp_get_mboard_sensor_names()

UHD_API uhd_error uhd_usrp_get_mboard_sensor_names ( uhd_usrp_handle  h,
size_t  mboard,
uhd_string_vector_handle mboard_sensor_names_out 
)

Get a list of motherboard sensors for the given device.

◆ uhd_usrp_get_normalized_rx_gain()

UHD_API uhd_error uhd_usrp_get_normalized_rx_gain ( uhd_usrp_handle  h,
size_t  chan,
double *  gain_out 
)

Get the given channel's normalized RX gain [0.0, 1.0].

See uhd::usrp::multi_usrp::get_normalized_rx_gain() for more details.

◆ uhd_usrp_get_normalized_tx_gain()

UHD_API uhd_error uhd_usrp_get_normalized_tx_gain ( uhd_usrp_handle  h,
size_t  chan,
double *  gain_out 
)

Get the given channel's normalized TX gain [0.0, 1.0].

See uhd::usrp::multi_usrp::get_normalized_tx_gain() for more details.

◆ uhd_usrp_get_num_mboards()

UHD_API uhd_error uhd_usrp_get_num_mboards ( uhd_usrp_handle  h,
size_t *  num_mboards_out 
)

Get the number of devices associated with the given USRP handle.

◆ uhd_usrp_get_pp_string()

UHD_API uhd_error uhd_usrp_get_pp_string ( uhd_usrp_handle  h,
char *  pp_string_out,
size_t  strbuffer_len 
)

Get a pretty-print representation of the USRP device.

See uhd::usrp::multi_usrp::get_pp_string() for more details.

◆ uhd_usrp_get_register_info()

UHD_API uhd_error uhd_usrp_get_register_info ( uhd_usrp_handle  h,
const char *  path,
size_t  mboard,
uhd_usrp_register_info_t register_info_out 
)

Get more information about a low-level device register.

◆ uhd_usrp_get_rx_antenna()

UHD_API uhd_error uhd_usrp_get_rx_antenna ( uhd_usrp_handle  h,
size_t  chan,
char *  ant_out,
size_t  strbuffer_len 
)

Get the RX antenna for the given channel.

◆ uhd_usrp_get_rx_antennas()

UHD_API uhd_error uhd_usrp_get_rx_antennas ( uhd_usrp_handle  h,
size_t  chan,
uhd_string_vector_handle antennas_out 
)

Get a list of RX antennas associated with the given channels.

◆ uhd_usrp_get_rx_bandwidth()

UHD_API uhd_error uhd_usrp_get_rx_bandwidth ( uhd_usrp_handle  h,
size_t  chan,
double *  bandwidth_out 
)

Get the bandwidth for the given channel's RX frontend.

◆ uhd_usrp_get_rx_bandwidth_range()

UHD_API uhd_error uhd_usrp_get_rx_bandwidth_range ( uhd_usrp_handle  h,
size_t  chan,
uhd_meta_range_handle  bandwidth_range_out 
)

Get all possible bandwidth ranges for the given channel's RX frontend.

◆ uhd_usrp_get_rx_freq()

UHD_API uhd_error uhd_usrp_get_rx_freq ( uhd_usrp_handle  h,
size_t  chan,
double *  freq_out 
)

Get the given channel's center RX frequency.

◆ uhd_usrp_get_rx_freq_range()

UHD_API uhd_error uhd_usrp_get_rx_freq_range ( uhd_usrp_handle  h,
size_t  chan,
uhd_meta_range_handle  freq_range_out 
)

Get all possible center frequency ranges for the given channel.

See uhd::usrp::multi_usrp::get_rx_freq_range() for more details.

◆ uhd_usrp_get_rx_gain()

UHD_API uhd_error uhd_usrp_get_rx_gain ( uhd_usrp_handle  h,
size_t  chan,
const char *  gain_name,
double *  gain_out 
)

Get the given channel's RX gain.

◆ uhd_usrp_get_rx_gain_names()

UHD_API uhd_error uhd_usrp_get_rx_gain_names ( uhd_usrp_handle  h,
size_t  chan,
uhd_string_vector_handle gain_names_out 
)

Get a list of RX gain names for the given channel.

◆ uhd_usrp_get_rx_gain_range()

UHD_API uhd_error uhd_usrp_get_rx_gain_range ( uhd_usrp_handle  h,
const char *  name,
size_t  chan,
uhd_meta_range_handle  gain_range_out 
)

Get all possible gain ranges for the given channel and name.

◆ uhd_usrp_get_rx_info()

UHD_API uhd_error uhd_usrp_get_rx_info ( uhd_usrp_handle  h,
size_t  chan,
uhd_usrp_rx_info_t info_out 
)

Get RX info from the USRP device.

NOTE: After calling this function, uhd_usrp_rx_info_free() must be called on info_out.

◆ uhd_usrp_get_rx_num_channels()

UHD_API uhd_error uhd_usrp_get_rx_num_channels ( uhd_usrp_handle  h,
size_t *  num_channels_out 
)

Get the number of RX channels for the given handle.

◆ uhd_usrp_get_rx_rate()

UHD_API uhd_error uhd_usrp_get_rx_rate ( uhd_usrp_handle  h,
size_t  chan,
double *  rate_out 
)

Get the given RX channel's sample rate (in Sps)

◆ uhd_usrp_get_rx_rates()

UHD_API uhd_error uhd_usrp_get_rx_rates ( uhd_usrp_handle  h,
size_t  chan,
uhd_meta_range_handle  rates_out 
)

Get a range of possible RX rates for the given channel.

◆ uhd_usrp_get_rx_sensor()

UHD_API uhd_error uhd_usrp_get_rx_sensor ( uhd_usrp_handle  h,
const char *  name,
size_t  chan,
uhd_sensor_value_handle sensor_value_out 
)

Get the value for the given RX sensor.

◆ uhd_usrp_get_rx_sensor_names()

UHD_API uhd_error uhd_usrp_get_rx_sensor_names ( uhd_usrp_handle  h,
size_t  chan,
uhd_string_vector_handle sensor_names_out 
)

Get a list of RX sensors associated with the given channels.

◆ uhd_usrp_get_rx_stream()

UHD_API uhd_error uhd_usrp_get_rx_stream ( uhd_usrp_handle  h,
uhd_stream_args_t stream_args,
uhd_rx_streamer_handle  h_out 
)

Create RX streamer from a USRP handle and given stream args.

◆ uhd_usrp_get_rx_subdev_name()

UHD_API uhd_error uhd_usrp_get_rx_subdev_name ( uhd_usrp_handle  h,
size_t  chan,
char *  rx_subdev_name_out,
size_t  strbuffer_len 
)

Get the name for the RX frontend.

◆ uhd_usrp_get_rx_subdev_spec()

UHD_API uhd_error uhd_usrp_get_rx_subdev_spec ( uhd_usrp_handle  h,
size_t  mboard,
uhd_subdev_spec_handle  subdev_spec_out 
)

Get the RX frontend specification for the given device.

◆ uhd_usrp_get_time_last_pps()

UHD_API uhd_error uhd_usrp_get_time_last_pps ( uhd_usrp_handle  h,
size_t  mboard,
time_t *  full_secs_out,
double *  frac_secs_out 
)

Get the time when this device's last PPS pulse occurred.

See uhd::usrp::multi_usrp::get_time_last_pps() for more details.

◆ uhd_usrp_get_time_now()

UHD_API uhd_error uhd_usrp_get_time_now ( uhd_usrp_handle  h,
size_t  mboard,
time_t *  full_secs_out,
double *  frac_secs_out 
)

Get the USRP device's current internal time.

See uhd::usrp::multi_usrp::get_time_now() for more details.

◆ uhd_usrp_get_time_source()

UHD_API uhd_error uhd_usrp_get_time_source ( uhd_usrp_handle  h,
size_t  mboard,
char *  time_source_out,
size_t  strbuffer_len 
)

Get the time source for the given device.

See uhd::usrp::multi_usrp::get_time_source() for more details.

◆ uhd_usrp_get_time_sources()

UHD_API uhd_error uhd_usrp_get_time_sources ( uhd_usrp_handle  h,
size_t  mboard,
uhd_string_vector_handle time_sources_out 
)

Get a list of time sources for the given device.

◆ uhd_usrp_get_time_synchronized()

UHD_API uhd_error uhd_usrp_get_time_synchronized ( uhd_usrp_handle  h,
bool *  result_out 
)

Are all motherboard times synchronized?

◆ uhd_usrp_get_tx_antenna()

UHD_API uhd_error uhd_usrp_get_tx_antenna ( uhd_usrp_handle  h,
size_t  chan,
char *  ant_out,
size_t  strbuffer_len 
)

Get the TX antenna for the given channel.

◆ uhd_usrp_get_tx_antennas()

UHD_API uhd_error uhd_usrp_get_tx_antennas ( uhd_usrp_handle  h,
size_t  chan,
uhd_string_vector_handle antennas_out 
)

Get a list of tx antennas associated with the given channels.

◆ uhd_usrp_get_tx_bandwidth()

UHD_API uhd_error uhd_usrp_get_tx_bandwidth ( uhd_usrp_handle  h,
size_t  chan,
double *  bandwidth_out 
)

Get the bandwidth for the given channel's TX frontend.

◆ uhd_usrp_get_tx_bandwidth_range()

UHD_API uhd_error uhd_usrp_get_tx_bandwidth_range ( uhd_usrp_handle  h,
size_t  chan,
uhd_meta_range_handle  bandwidth_range_out 
)

Get all possible bandwidth ranges for the given channel's TX frontend.

◆ uhd_usrp_get_tx_freq()

UHD_API uhd_error uhd_usrp_get_tx_freq ( uhd_usrp_handle  h,
size_t  chan,
double *  freq_out 
)

Get the given channel's center TX frequency.

◆ uhd_usrp_get_tx_freq_range()

UHD_API uhd_error uhd_usrp_get_tx_freq_range ( uhd_usrp_handle  h,
size_t  chan,
uhd_meta_range_handle  freq_range_out 
)

Get all possible center frequency ranges for the given channel.

See uhd::usrp::multi_usrp::get_rx_freq_range() for more details.

◆ uhd_usrp_get_tx_gain()

UHD_API uhd_error uhd_usrp_get_tx_gain ( uhd_usrp_handle  h,
size_t  chan,
const char *  gain_name,
double *  gain_out 
)

Get the given channel's RX gain.

◆ uhd_usrp_get_tx_gain_names()

UHD_API uhd_error uhd_usrp_get_tx_gain_names ( uhd_usrp_handle  h,
size_t  chan,
uhd_string_vector_handle gain_names_out 
)

Get a list of TX gain names for the given channel.

◆ uhd_usrp_get_tx_gain_range()

UHD_API uhd_error uhd_usrp_get_tx_gain_range ( uhd_usrp_handle  h,
const char *  name,
size_t  chan,
uhd_meta_range_handle  gain_range_out 
)

Get all possible gain ranges for the given channel and name.

◆ uhd_usrp_get_tx_info()

UHD_API uhd_error uhd_usrp_get_tx_info ( uhd_usrp_handle  h,
size_t  chan,
uhd_usrp_tx_info_t info_out 
)

Get TX info from the USRP device.

NOTE: After calling this function, uhd_usrp_tx_info_free() must be called on info_out.

◆ uhd_usrp_get_tx_num_channels()

UHD_API uhd_error uhd_usrp_get_tx_num_channels ( uhd_usrp_handle  h,
size_t *  num_channels_out 
)

Get the number of TX channels for the given handle.

◆ uhd_usrp_get_tx_rate()

UHD_API uhd_error uhd_usrp_get_tx_rate ( uhd_usrp_handle  h,
size_t  chan,
double *  rate_out 
)

Get the given RX channel's sample rate (in Sps)

◆ uhd_usrp_get_tx_rates()

UHD_API uhd_error uhd_usrp_get_tx_rates ( uhd_usrp_handle  h,
size_t  chan,
uhd_meta_range_handle  rates_out 
)

Get a range of possible RX rates for the given channel.

◆ uhd_usrp_get_tx_sensor()

UHD_API uhd_error uhd_usrp_get_tx_sensor ( uhd_usrp_handle  h,
const char *  name,
size_t  chan,
uhd_sensor_value_handle sensor_value_out 
)

Get the value for the given TX sensor.

◆ uhd_usrp_get_tx_sensor_names()

UHD_API uhd_error uhd_usrp_get_tx_sensor_names ( uhd_usrp_handle  h,
size_t  chan,
uhd_string_vector_handle sensor_names_out 
)

Get a list of TX sensors associated with the given channels.

◆ uhd_usrp_get_tx_stream()

UHD_API uhd_error uhd_usrp_get_tx_stream ( uhd_usrp_handle  h,
uhd_stream_args_t stream_args,
uhd_tx_streamer_handle  h_out 
)

Create TX streamer from a USRP handle and given stream args.

◆ uhd_usrp_get_tx_subdev_name()

UHD_API uhd_error uhd_usrp_get_tx_subdev_name ( uhd_usrp_handle  h,
size_t  chan,
char *  tx_subdev_name_out,
size_t  strbuffer_len 
)

Get the name for the RX frontend.

◆ uhd_usrp_get_tx_subdev_spec()

UHD_API uhd_error uhd_usrp_get_tx_subdev_spec ( uhd_usrp_handle  h,
size_t  mboard,
uhd_subdev_spec_handle  subdev_spec_out 
)

Get the TX frontend specification for the given device.

◆ uhd_usrp_last_error()

UHD_API uhd_error uhd_usrp_last_error ( uhd_usrp_handle  h,
char *  error_out,
size_t  strbuffer_len 
)

Get the last error reported by the USRP handle.

◆ uhd_usrp_make()

UHD_API uhd_error uhd_usrp_make ( uhd_usrp_handle h,
const char *  args 
)

Create a USRP handle.

Parameters
hthe handle
argsdevice args (e.g. "type=x300")

◆ uhd_usrp_read_register()

UHD_API uhd_error uhd_usrp_read_register ( uhd_usrp_handle  h,
const char *  path,
uint32_t  field,
size_t  mboard,
uint64_t *  value_out 
)

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

◆ uhd_usrp_set_clock_source()

UHD_API uhd_error uhd_usrp_set_clock_source ( uhd_usrp_handle  h,
const char *  clock_source,
size_t  mboard 
)

Set the given device's clock source.

See uhd::usrp::multi_usrp::set_clock_source() for more details.

◆ uhd_usrp_set_clock_source_out()

UHD_API uhd_error uhd_usrp_set_clock_source_out ( uhd_usrp_handle  h,
bool  enb,
size_t  mboard 
)

Enable or disable sending the clock source to an output connector.

See uhd::usrp::set_clock_source_out() for more details.

◆ uhd_usrp_set_command_time()

UHD_API uhd_error uhd_usrp_set_command_time ( uhd_usrp_handle  h,
time_t  full_secs,
double  frac_secs,
size_t  mboard 
)

Set the time at which timed commands will take place.

See uhd::usrp::multi_usrp::set_command_time() for more details.

◆ uhd_usrp_set_dboard_eeprom()

UHD_API uhd_error uhd_usrp_set_dboard_eeprom ( uhd_usrp_handle  h,
uhd_dboard_eeprom_handle  db_eeprom,
const char *  unit,
const char *  slot,
size_t  mboard 
)

Set values in the given daughterboard's EEPROM.

◆ uhd_usrp_set_gpio_attr()

UHD_API uhd_error uhd_usrp_set_gpio_attr ( uhd_usrp_handle  h,
const char *  bank,
const char *  attr,
uint32_t  value,
uint32_t  mask,
size_t  mboard 
)

Set a GPIO attribute for a given GPIO bank.

See uhd::usrp::multi_usrp::set_gpio_attr() for more details.

◆ uhd_usrp_set_master_clock_rate()

UHD_API uhd_error uhd_usrp_set_master_clock_rate ( uhd_usrp_handle  h,
double  rate,
size_t  mboard 
)

Set the master clock rate.

See uhd::usrp::multi_usrp::set_master_clock_rate() for more details.

◆ uhd_usrp_set_mboard_eeprom()

UHD_API uhd_error uhd_usrp_set_mboard_eeprom ( uhd_usrp_handle  h,
uhd_mboard_eeprom_handle  mb_eeprom,
size_t  mboard 
)

Set values in the given motherboard's EEPROM.

◆ uhd_usrp_set_normalized_rx_gain()

UHD_API uhd_error uhd_usrp_set_normalized_rx_gain ( uhd_usrp_handle  h,
double  gain,
size_t  chan 
)

Set the normalized RX gain [0.0, 1.0] for the given channel.

See uhd::usrp::multi_usrp::set_normalized_rx_gain() for more details.

◆ uhd_usrp_set_normalized_tx_gain()

UHD_API uhd_error uhd_usrp_set_normalized_tx_gain ( uhd_usrp_handle  h,
double  gain,
size_t  chan 
)

Set the normalized TX gain [0.0, 1.0] for the given channel.

See uhd::usrp::multi_usrp::set_normalized_tx_gain() for more details.

◆ uhd_usrp_set_rx_agc()

UHD_API uhd_error uhd_usrp_set_rx_agc ( uhd_usrp_handle  h,
bool  enable,
size_t  chan 
)

Enable or disable the given channel's RX AGC module.

See uhd::usrp::multi_usrp::set_rx_agc() for more details.

◆ uhd_usrp_set_rx_antenna()

UHD_API uhd_error uhd_usrp_set_rx_antenna ( uhd_usrp_handle  h,
const char *  ant,
size_t  chan 
)

Set the RX antenna for the given channel.

◆ uhd_usrp_set_rx_bandwidth()

UHD_API uhd_error uhd_usrp_set_rx_bandwidth ( uhd_usrp_handle  h,
double  bandwidth,
size_t  chan 
)

Set the bandwidth for the given channel's RX frontend.

◆ uhd_usrp_set_rx_dc_offset_enabled()

UHD_API uhd_error uhd_usrp_set_rx_dc_offset_enabled ( uhd_usrp_handle  h,
bool  enb,
size_t  chan 
)

Enable or disable RX DC offset correction for the given channel.

See uhd::usrp::multi_usrp::set_rx_dc_offset() for more details.

◆ uhd_usrp_set_rx_freq()

UHD_API uhd_error uhd_usrp_set_rx_freq ( uhd_usrp_handle  h,
uhd_tune_request_t tune_request,
size_t  chan,
uhd_tune_result_t tune_result 
)

Set the given channel's center RX frequency.

◆ uhd_usrp_set_rx_gain()

UHD_API uhd_error uhd_usrp_set_rx_gain ( uhd_usrp_handle  h,
double  gain,
size_t  chan,
const char *  gain_name 
)

Set the RX gain for the given channel and name.

◆ uhd_usrp_set_rx_iq_balance_enabled()

UHD_API uhd_error uhd_usrp_set_rx_iq_balance_enabled ( uhd_usrp_handle  h,
bool  enb,
size_t  chan 
)

Enable or disable RX IQ imbalance correction for the given channel.

◆ uhd_usrp_set_rx_rate()

UHD_API uhd_error uhd_usrp_set_rx_rate ( uhd_usrp_handle  h,
double  rate,
size_t  chan 
)

Set the given RX channel's sample rate (in Sps)

◆ uhd_usrp_set_rx_subdev_spec()

UHD_API uhd_error uhd_usrp_set_rx_subdev_spec ( uhd_usrp_handle  h,
uhd_subdev_spec_handle  subdev_spec,
size_t  mboard 
)

Map the given device's RX frontend to a channel.

See uhd::usrp::multi_usrp::set_rx_subdev_spec() for more details.

◆ uhd_usrp_set_time_next_pps()

UHD_API uhd_error uhd_usrp_set_time_next_pps ( uhd_usrp_handle  h,
time_t  full_secs,
double  frac_secs,
size_t  mboard 
)

Set the USRP device's time to the given value upon the next PPS detection.

See uhd::usrp::multi_usrp::set_time_next_pps() for more details.

◆ uhd_usrp_set_time_now()

UHD_API uhd_error uhd_usrp_set_time_now ( uhd_usrp_handle  h,
time_t  full_secs,
double  frac_secs,
size_t  mboard 
)

Set the USRP device's time.

See uhd::usrp::multi_usrp::set_time_now() for more details.

◆ uhd_usrp_set_time_source()

UHD_API uhd_error uhd_usrp_set_time_source ( uhd_usrp_handle  h,
const char *  time_source,
size_t  mboard 
)

Set the time source for the given device.

See uhd::usrp::multi_usrp::set_time_source() for more details.

◆ uhd_usrp_set_time_source_out()

UHD_API uhd_error uhd_usrp_set_time_source_out ( uhd_usrp_handle  h,
bool  enb,
size_t  mboard 
)

Enable or disable sending the time source to an output connector.

See uhd::usrp::set_time_source_out() for more details.

◆ uhd_usrp_set_time_unknown_pps()

UHD_API uhd_error uhd_usrp_set_time_unknown_pps ( uhd_usrp_handle  h,
time_t  full_secs,
double  frac_secs 
)

Synchronize the time across all motherboards.

See uhd::usrp::multi_usrp::set_time_unknown_pps() for more details.

◆ uhd_usrp_set_tx_antenna()

UHD_API uhd_error uhd_usrp_set_tx_antenna ( uhd_usrp_handle  h,
const char *  ant,
size_t  chan 
)

Set the TX antenna for the given channel.

◆ uhd_usrp_set_tx_bandwidth()

UHD_API uhd_error uhd_usrp_set_tx_bandwidth ( uhd_usrp_handle  h,
double  bandwidth,
size_t  chan 
)

Set the bandwidth for the given channel's TX frontend.

◆ uhd_usrp_set_tx_dc_offset_enabled()

UHD_API uhd_error uhd_usrp_set_tx_dc_offset_enabled ( uhd_usrp_handle  h,
bool  enb,
size_t  chan 
)

Enable or disable TX DC offset correction for the given channel.

See uhd::usrp::multi_usrp::set_tx_dc_offset() for more details.

◆ uhd_usrp_set_tx_freq()

UHD_API uhd_error uhd_usrp_set_tx_freq ( uhd_usrp_handle  h,
uhd_tune_request_t tune_request,
size_t  chan,
uhd_tune_result_t tune_result 
)

Set the given channel's center TX frequency.

◆ uhd_usrp_set_tx_gain()

UHD_API uhd_error uhd_usrp_set_tx_gain ( uhd_usrp_handle  h,
double  gain,
size_t  chan,
const char *  gain_name 
)

Set the TX gain for the given channel and name.

◆ uhd_usrp_set_tx_iq_balance_enabled()

UHD_API uhd_error uhd_usrp_set_tx_iq_balance_enabled ( uhd_usrp_handle  h,
bool  enb,
size_t  chan 
)

Enable or disable TX IQ imbalance correction for the given channel.

◆ uhd_usrp_set_tx_rate()

UHD_API uhd_error uhd_usrp_set_tx_rate ( uhd_usrp_handle  h,
double  rate,
size_t  chan 
)

Set the given RX channel's sample rate (in Sps)

◆ uhd_usrp_set_tx_subdev_spec()

UHD_API uhd_error uhd_usrp_set_tx_subdev_spec ( uhd_usrp_handle  h,
uhd_subdev_spec_handle  subdev_spec,
size_t  mboard 
)

Map the given device's TX frontend to a channel.

See uhd::usrp::multi_usrp::set_tx_subdev_spec() for more details.

◆ uhd_usrp_set_user_register()

UHD_API uhd_error uhd_usrp_set_user_register ( uhd_usrp_handle  h,
uint8_t  addr,
uint32_t  data,
size_t  mboard 
)

Perform a write on a user configuration register bus.

See uhd::usrp::multi_usrp::set_user_register() for more details.

◆ uhd_usrp_write_register()

UHD_API uhd_error uhd_usrp_write_register ( uhd_usrp_handle  h,
const char *  path,
uint32_t  field,
uint64_t  value,
size_t  mboard 
)

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