gnuradio.uhd

Provides source and sink blocks to interface with the UHD library. Used to send and receive data between the Ettus Research, LLC product line.

gnuradio.uhd.usrp_sink(*args, **kwargs)
usrp_sink_sptr.active_thread_priority(usrp_sink_sptr self) → int
usrp_sink_sptr.clear_command_time(usrp_sink_sptr self, size_t mboard=0)

Clear the command time so future commands are sent ASAP.

usrp_sink_sptr.declare_sample_delay(usrp_sink_sptr self, int which, int delay)

declare_sample_delay(usrp_sink_sptr self, unsigned int delay)

usrp_sink_sptr.get_antenna(usrp_sink_sptr self, size_t chan=0) → std::string

Get the antenna in use.

usrp_sink_sptr.get_antennas(usrp_sink_sptr self, size_t chan=0) → std::vector< std::string,std::allocator< std::string > >

Get a list of possible antennas.

usrp_sink_sptr.get_bandwidth(usrp_sink_sptr self, size_t chan=0) → double

Get the bandpass filter setting on the RF frontend.

usrp_sink_sptr.get_bandwidth_range(usrp_sink_sptr self, size_t chan=0) → meta_range_t

Get the bandpass filter range of the RF frontend.

usrp_sink_sptr.get_center_freq(usrp_sink_sptr self, size_t chan=0) → double

Get the center frequency.

usrp_sink_sptr.get_clock_rate(usrp_sink_sptr self, size_t mboard=0) → double

Get the master clock rate.

usrp_sink_sptr.get_clock_source(usrp_sink_sptr self, size_t const mboard) → std::string

Get the currently set clock source.

usrp_sink_sptr.get_clock_sources(usrp_sink_sptr self, size_t const mboard) → std::vector< std::string,std::allocator< std::string > >

Get a list of possible clock sources.

usrp_sink_sptr.get_dboard_iface(usrp_sink_sptr self, size_t chan=0) → dboard_iface_sptr

Get access to the underlying uhd dboard iface object.

usrp_sink_sptr.get_dboard_sensor(usrp_sink_sptr self, std::string const & name, size_t chan=0) → sensor_value_t

DEPRECATED use get_sensor.

usrp_sink_sptr.get_dboard_sensor_names(usrp_sink_sptr self, size_t chan=0) → std::vector< std::string,std::allocator< std::string > >

DEPRECATED use get_sensor_names.

usrp_sink_sptr.get_freq_range(usrp_sink_sptr self, size_t chan=0) → meta_range_t

Get the tunable frequency range.

usrp_sink_sptr.get_gain(usrp_sink_sptr self, size_t chan=0) → double

get_gain(usrp_sink_sptr self, std::string const & name, size_t chan=0) -> double

Get the actual dboard gain setting.

usrp_sink_sptr.get_gain_names(usrp_sink_sptr self, size_t chan=0) → std::vector< std::string,std::allocator< std::string > >

Get the actual dboard gain setting of named stage.

usrp_sink_sptr.get_gain_range(usrp_sink_sptr self, size_t chan=0) → meta_range_t

get_gain_range(usrp_sink_sptr self, std::string const & name, size_t chan=0) -> meta_range_t

Get the settable gain range.

usrp_sink_sptr.get_mboard_sensor(usrp_sink_sptr self, std::string const & name, size_t mboard=0) → sensor_value_t

Get a motherboard sensor value.

usrp_sink_sptr.get_mboard_sensor_names(usrp_sink_sptr self, size_t mboard=0) → std::vector< std::string,std::allocator< std::string > >

Get a list of possible motherboard sensor names.

usrp_sink_sptr.get_normalized_gain(usrp_sink_sptr self, size_t chan=0) → double

Returns the normalized gain.

The normalized gain is always in [0, 1], regardless of the device. See also set_normalized_gain().

Note that it is not possible to specify a gain name for this function, the result is over the entire gain chain.

usrp_sink_sptr.get_samp_rate(usrp_sink_sptr self) → double

Get the sample rate for the usrp device. This is the actual sample rate and may differ from the rate set.

usrp_sink_sptr.get_samp_rates(usrp_sink_sptr self) → meta_range_t

Get the possible sample rates for the usrp device.

usrp_sink_sptr.get_sensor(usrp_sink_sptr self, std::string const & name, size_t chan=0) → sensor_value_t

Get an RF frontend sensor value.

usrp_sink_sptr.get_sensor_names(usrp_sink_sptr self, size_t chan=0) → std::vector< std::string,std::allocator< std::string > >

Get a list of possible RF frontend sensor names.

usrp_sink_sptr.get_subdev_spec(usrp_sink_sptr self, size_t mboard=0) → std::string

Get the TX frontend specification.

usrp_sink_sptr.get_time_last_pps(usrp_sink_sptr self, size_t mboard=0) → time_spec_t

Get the time when the last pps pulse occured.

usrp_sink_sptr.get_time_now(usrp_sink_sptr self, size_t mboard=0) → time_spec_t

Get the current time registers.

usrp_sink_sptr.get_time_source(usrp_sink_sptr self, size_t const mboard) → std::string

Get the currently set time source.

usrp_sink_sptr.get_time_sources(usrp_sink_sptr self, size_t const mboard) → std::vector< std::string,std::allocator< std::string > >

Get a list of possible time sources.

usrp_sink_sptr.get_usrp_info(usrp_sink_sptr self, size_t chan=0) → string_string_dict_t

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.

usrp_sink_sptr.message_subscribers(usrp_sink_sptr self, swig_int_ptr which_port) → swig_int_ptr
usrp_sink_sptr.min_noutput_items(usrp_sink_sptr self) → int
usrp_sink_sptr.pc_input_buffers_full_avg(usrp_sink_sptr self, int which) → float

pc_input_buffers_full_avg(usrp_sink_sptr self) -> pmt_vector_float

usrp_sink_sptr.pc_noutput_items_avg(usrp_sink_sptr self) → float
usrp_sink_sptr.pc_nproduced_avg(usrp_sink_sptr self) → float
usrp_sink_sptr.pc_output_buffers_full_avg(usrp_sink_sptr self, int which) → float

pc_output_buffers_full_avg(usrp_sink_sptr self) -> pmt_vector_float

usrp_sink_sptr.pc_throughput_avg(usrp_sink_sptr self) → float
usrp_sink_sptr.pc_work_time_avg(usrp_sink_sptr self) → float
usrp_sink_sptr.pc_work_time_total(usrp_sink_sptr self) → float
usrp_sink_sptr.sample_delay(usrp_sink_sptr self, int which) → unsigned int
usrp_sink_sptr.set_antenna(usrp_sink_sptr self, std::string const & ant, size_t chan=0)

Set the antenna to use.

usrp_sink_sptr.set_bandwidth(usrp_sink_sptr self, double bandwidth, size_t chan=0)

Set the bandpass filter on the RF frontend.

usrp_sink_sptr.set_center_freq(usrp_sink_sptr self, tune_request_t tune_request, size_t chan=0) → tune_result_t

set_center_freq(usrp_sink_sptr self, double freq, size_t chan=0) -> tune_result_t

Tune the usrp device to the desired center frequency.

usrp_sink_sptr.set_clock_config(usrp_sink_sptr self, clock_config_t clock_config, size_t mboard=0)

Set the clock configuration. DEPRECATED for set_time/clock_source.

usrp_sink_sptr.set_clock_rate(usrp_sink_sptr self, double rate, size_t mboard=0)

Set the master clock rate.

usrp_sink_sptr.set_clock_source(usrp_sink_sptr self, std::string const & source, size_t const mboard=0)

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

usrp_sink_sptr.set_command_time(usrp_sink_sptr self, time_spec_t time_spec, size_t mboard=0)

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.

usrp_sink_sptr.set_dc_offset(usrp_sink_sptr self, std::complex< double > const & offset, size_t chan=0)

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

usrp_sink_sptr.set_gain(usrp_sink_sptr self, double gain, size_t chan=0)

set_gain(usrp_sink_sptr self, double gain, std::string const & name, size_t chan=0)

Set the gain for the dboard.

usrp_sink_sptr.set_iq_balance(usrp_sink_sptr self, std::complex< double > const & correction, size_t chan=0)

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

usrp_sink_sptr.set_min_noutput_items(usrp_sink_sptr self, int m)
usrp_sink_sptr.set_normalized_gain(usrp_sink_sptr self, double norm_gain, size_t chan=0)

Set the normalized gain.

The normalized gain is always in [0, 1], regardless of the device. 0 corresponds to minimum gain (usually 0 dB, but make sure to read the device notes in the UHD manual) and 1 corresponds to maximum gain. This will work for any UHD device. Use get_gain() to see which dB value the normalized gain value corresponds to.

Note that it is not possible to specify a gain name for this function.

usrp_sink_sptr.set_samp_rate(usrp_sink_sptr self, double rate)

Set the sample rate for the usrp device.

usrp_sink_sptr.set_start_time(usrp_sink_sptr self, time_spec_t time)

Set the start time for outgoing samples. To control when samples are transmitted, set this value before starting the flow graph. The value is cleared after each run. When not specified, the start time will be:

usrp_sink_sptr.set_stream_args(usrp_sink_sptr self, stream_args_t stream_args)

Update the stream args for this device.

This update will only take effect after a restart of the streaming, or before streaming and after construction. This will also delete the current streamer. Note you cannot change the I/O signature of this block using this function, or it will throw.

It is possible to leave the ‘channels’ fields of unset. In this case, the previous channels field is used.

usrp_sink_sptr.set_subdev_spec(usrp_sink_sptr self, std::string const & spec, size_t mboard=0)

Set the frontend specification.

usrp_sink_sptr.set_thread_priority(usrp_sink_sptr self, int priority) → int
usrp_sink_sptr.set_time_next_pps(usrp_sink_sptr self, time_spec_t time_spec)

Set the time registers at the next pps.

usrp_sink_sptr.set_time_now(usrp_sink_sptr self, time_spec_t time_spec, size_t mboard=0)

Sets the time registers immediately.

usrp_sink_sptr.set_time_source(usrp_sink_sptr self, std::string const & source, size_t const mboard=0)

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

usrp_sink_sptr.set_time_unknown_pps(usrp_sink_sptr self, time_spec_t time_spec)

Sync the time registers with an unknown pps edge.

usrp_sink_sptr.set_user_register(usrp_sink_sptr self, uint8_t const addr, uint32_t const data, size_t mboard=0)

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

usrp_sink_sptr.thread_priority(usrp_sink_sptr self) → int
gnuradio.uhd.usrp_source(*args, **kwargs)
usrp_source_sptr.active_thread_priority(usrp_source_sptr self) → int
usrp_source_sptr.clear_command_time(usrp_source_sptr self, size_t mboard=0)

Clear the command time so future commands are sent ASAP.

usrp_source_sptr.declare_sample_delay(usrp_source_sptr self, int which, int delay)

declare_sample_delay(usrp_source_sptr self, unsigned int delay)

usrp_source_sptr.finite_acquisition(usrp_source_sptr self, size_t const nsamps) → pmt_vector_cfloat

Convenience function for finite data acquisition. This is not to be used with the scheduler; rather, one can request samples from the USRP in python. //TODO assumes fc32

usrp_source_sptr.finite_acquisition_v(usrp_source_sptr self, size_t const nsamps) → gr_vector_vector_complexf

Convenience function for finite data acquisition. This is the multi-channel version of finite_acquisition; This is not to be used with the scheduler; rather, one can request samples from the USRP in python. //TODO assumes fc32

usrp_source_sptr.get_antenna(usrp_source_sptr self, size_t chan=0) → std::string

Get the antenna in use.

usrp_source_sptr.get_antennas(usrp_source_sptr self, size_t chan=0) → std::vector< std::string,std::allocator< std::string > >

Get a list of possible antennas.

usrp_source_sptr.get_bandwidth(usrp_source_sptr self, size_t chan=0) → double

Get the bandpass filter setting on the RF frontend.

usrp_source_sptr.get_bandwidth_range(usrp_source_sptr self, size_t chan=0) → meta_range_t

Get the bandpass filter range of the RF frontend.

usrp_source_sptr.get_center_freq(usrp_source_sptr self, size_t chan=0) → double

Get the center frequency.

usrp_source_sptr.get_clock_rate(usrp_source_sptr self, size_t mboard=0) → double

Get the master clock rate.

usrp_source_sptr.get_clock_source(usrp_source_sptr self, size_t const mboard) → std::string

Get the currently set clock source.

usrp_source_sptr.get_clock_sources(usrp_source_sptr self, size_t const mboard) → std::vector< std::string,std::allocator< std::string > >

Get a list of possible clock sources.

usrp_source_sptr.get_dboard_iface(usrp_source_sptr self, size_t chan=0) → dboard_iface_sptr

Get access to the underlying uhd dboard iface object.

usrp_source_sptr.get_dboard_sensor(usrp_source_sptr self, std::string const & name, size_t chan=0) → sensor_value_t

DEPRECATED use get_sensor.

usrp_source_sptr.get_dboard_sensor_names(usrp_source_sptr self, size_t chan=0) → std::vector< std::string,std::allocator< std::string > >

DEPRECATED use get_sensor_names.

usrp_source_sptr.get_freq_range(usrp_source_sptr self, size_t chan=0) → meta_range_t

Get the tunable frequency range.

usrp_source_sptr.get_gain(usrp_source_sptr self, size_t chan=0) → double

get_gain(usrp_source_sptr self, std::string const & name, size_t chan=0) -> double

Get the actual dboard gain setting.

usrp_source_sptr.get_gain_names(usrp_source_sptr self, size_t chan=0) → std::vector< std::string,std::allocator< std::string > >

Get the actual dboard gain setting of named stage.

usrp_source_sptr.get_gain_range(usrp_source_sptr self, size_t chan=0) → meta_range_t

get_gain_range(usrp_source_sptr self, std::string const & name, size_t chan=0) -> meta_range_t

Get the settable gain range.

usrp_source_sptr.get_mboard_sensor(usrp_source_sptr self, std::string const & name, size_t mboard=0) → sensor_value_t

Get a motherboard sensor value.

usrp_source_sptr.get_mboard_sensor_names(usrp_source_sptr self, size_t mboard=0) → std::vector< std::string,std::allocator< std::string > >

Get a list of possible motherboard sensor names.

usrp_source_sptr.get_normalized_gain(usrp_source_sptr self, size_t chan=0) → double

Returns the normalized gain.

The normalized gain is always in [0, 1], regardless of the device. See also set_normalized_gain().

Note that it is not possible to specify a gain name for this function, the result is over the entire gain chain.

usrp_source_sptr.get_samp_rate(usrp_source_sptr self) → double

Get the sample rate for the usrp device. This is the actual sample rate and may differ from the rate set.

usrp_source_sptr.get_samp_rates(usrp_source_sptr self) → meta_range_t

Get the possible sample rates for the usrp device.

usrp_source_sptr.get_sensor(usrp_source_sptr self, std::string const & name, size_t chan=0) → sensor_value_t

Get a RF frontend sensor value.

usrp_source_sptr.get_sensor_names(usrp_source_sptr self, size_t chan=0) → std::vector< std::string,std::allocator< std::string > >

Get a list of possible RF frontend sensor names.

usrp_source_sptr.get_subdev_spec(usrp_source_sptr self, size_t mboard=0) → std::string

Get the RX frontend specification.

usrp_source_sptr.get_time_last_pps(usrp_source_sptr self, size_t mboard=0) → time_spec_t

Get the time when the last pps pulse occured.

usrp_source_sptr.get_time_now(usrp_source_sptr self, size_t mboard=0) → time_spec_t

Get the current time registers.

usrp_source_sptr.get_time_source(usrp_source_sptr self, size_t const mboard) → std::string

Get the currently set time source.

usrp_source_sptr.get_time_sources(usrp_source_sptr self, size_t const mboard) → std::vector< std::string,std::allocator< std::string > >

Get a list of possible time sources.

usrp_source_sptr.get_usrp_info(usrp_source_sptr self, size_t chan=0) → string_string_dict_t

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.

usrp_source_sptr.issue_stream_cmd(usrp_source_sptr self, stream_cmd_t cmd)

Issue a stream command to all channels in this source block.

This method is intended to override the default “always on” behavior. After starting the flow graph, the user should call stop() on this block, then issue any desired arbitrary stream_cmd_t structs to the device. The USRP will be able to enqueue several stream commands in the FPGA.

usrp_source_sptr.message_subscribers(usrp_source_sptr self, swig_int_ptr which_port) → swig_int_ptr
usrp_source_sptr.min_noutput_items(usrp_source_sptr self) → int
usrp_source_sptr.pc_input_buffers_full_avg(usrp_source_sptr self, int which) → float

pc_input_buffers_full_avg(usrp_source_sptr self) -> pmt_vector_float

usrp_source_sptr.pc_noutput_items_avg(usrp_source_sptr self) → float
usrp_source_sptr.pc_nproduced_avg(usrp_source_sptr self) → float
usrp_source_sptr.pc_output_buffers_full_avg(usrp_source_sptr self, int which) → float

pc_output_buffers_full_avg(usrp_source_sptr self) -> pmt_vector_float

usrp_source_sptr.pc_throughput_avg(usrp_source_sptr self) → float
usrp_source_sptr.pc_work_time_avg(usrp_source_sptr self) → float
usrp_source_sptr.pc_work_time_total(usrp_source_sptr self) → float
usrp_source_sptr.sample_delay(usrp_source_sptr self, int which) → unsigned int
usrp_source_sptr.set_antenna(usrp_source_sptr self, std::string const & ant, size_t chan=0)

Set the antenna to use.

usrp_source_sptr.set_auto_dc_offset(usrp_source_sptr self, bool const enb, size_t chan=0)

Enable/disable the automatic 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.

usrp_source_sptr.set_auto_iq_balance(usrp_source_sptr self, bool const enb, size_t chan=0)

Enable/Disable the RX frontend IQ imbalance correction.

usrp_source_sptr.set_bandwidth(usrp_source_sptr self, double bandwidth, size_t chan=0)

Set the bandpass filter on the RF frontend.

usrp_source_sptr.set_center_freq(usrp_source_sptr self, tune_request_t tune_request, size_t chan=0) → tune_result_t

set_center_freq(usrp_source_sptr self, double freq, size_t chan=0) -> tune_result_t

Tune the usrp device to the desired center frequency.

usrp_source_sptr.set_clock_config(usrp_source_sptr self, clock_config_t clock_config, size_t mboard=0)

Set the clock configuration. DEPRECATED for set_time/clock_source.

usrp_source_sptr.set_clock_rate(usrp_source_sptr self, double rate, size_t mboard=0)

Set the master clock rate.

usrp_source_sptr.set_clock_source(usrp_source_sptr self, std::string const & source, size_t const mboard=0)

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

usrp_source_sptr.set_command_time(usrp_source_sptr self, time_spec_t time_spec, size_t mboard=0)

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.

usrp_source_sptr.set_dc_offset(usrp_source_sptr self, std::complex< double > const & offset, size_t chan=0)

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

usrp_source_sptr.set_gain(usrp_source_sptr self, double gain, size_t chan=0)

set_gain(usrp_source_sptr self, double gain, std::string const & name, size_t chan=0)

Set the gain for the dboard.

usrp_source_sptr.set_iq_balance(usrp_source_sptr self, std::complex< double > const & correction, size_t chan=0)

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

usrp_source_sptr.set_min_noutput_items(usrp_source_sptr self, int m)
usrp_source_sptr.set_normalized_gain(usrp_source_sptr self, double norm_gain, size_t chan=0)

Set the normalized gain.

The normalized gain is always in [0, 1], regardless of the device. 0 corresponds to minimum gain (usually 0 dB, but make sure to read the device notes in the UHD manual) and 1 corresponds to maximum gain. This will work for any UHD device. Use get_gain() to see which dB value the normalized gain value corresponds to.

Note that it is not possible to specify a gain name for this function.

usrp_source_sptr.set_samp_rate(usrp_source_sptr self, double rate)

Set the sample rate for the usrp device.

usrp_source_sptr.set_start_time(usrp_source_sptr self, time_spec_t time)

Set the start time for incoming samples. To control when samples are received, set this value before starting the flow graph. The value is cleared after each run. When not specified, the start time will be:

usrp_source_sptr.set_stream_args(usrp_source_sptr self, stream_args_t stream_args)

Update the stream args for this device.

This update will only take effect after a restart of the streaming, or before streaming and after construction. This will also delete the current streamer. Note you cannot change the I/O signature of this block using this function, or it will throw.

It is possible to leave the ‘channels’ fields of unset. In this case, the previous channels field is used.

usrp_source_sptr.set_subdev_spec(usrp_source_sptr self, std::string const & spec, size_t mboard=0)

Set the frontend specification.

usrp_source_sptr.set_thread_priority(usrp_source_sptr self, int priority) → int
usrp_source_sptr.set_time_next_pps(usrp_source_sptr self, time_spec_t time_spec)

Set the time registers at the next pps.

usrp_source_sptr.set_time_now(usrp_source_sptr self, time_spec_t time_spec, size_t mboard=0)

Sets the time registers immediately.

usrp_source_sptr.set_time_source(usrp_source_sptr self, std::string const & source, size_t const mboard=0)

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

usrp_source_sptr.set_time_unknown_pps(usrp_source_sptr self, time_spec_t time_spec)

Sync the time registers with an unknown pps edge.

usrp_source_sptr.set_user_register(usrp_source_sptr self, uint8_t const addr, uint32_t const data, size_t mboard=0)

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

usrp_source_sptr.thread_priority(usrp_source_sptr self) → int
gnuradio.uhd.amsg_source(*args, **kwargs)
amsg_source_sptr.msg_to_async_metadata_t(amsg_source_sptr self, message_sptr msg) → async_metadata_t

Convert a raw asynchronous message to an asynchronous metatdata object.

class gnuradio.uhd.stream_cmd_t(uhd::stream_cmd_t self, uhd::stream_cmd_t::stream_mode_t const & stream_mode)

Proxy of C++ uhd::stream_cmd_t class

class gnuradio.uhd.time_spec_t(uhd::time_spec_t self, double secs=0)

Proxy of C++ uhd::time_spec_t class

class gnuradio.uhd.meta_range_t(uhd::meta_range_t self)

Proxy of C++ uhd::meta_range_t class

class gnuradio.uhd.stream_args_t(*args, **kwargs)
class gnuradio.uhd.device_addr_t(*args, **kwargs)
class gnuradio.uhd.tune_request_t(*args, **kwargs)
class gnuradio.uhd.tune_result_t(uhd::tune_result_t self)

Proxy of C++ uhd::tune_result_t class

class gnuradio.uhd.sensor_value_t(uhd::sensor_value_t self, std::string const & name, bool value, std::string const & utrue, std::string const & ufalse)

Proxy of C++ uhd::sensor_value_t class

Previous topic

gnuradio.wxgui

Next topic

gnuradio.fcd

This Page