23 #ifndef INCLUDED_GR_UHD_USRP_BLOCK_H 24 #define INCLUDED_GR_UHD_USRP_BLOCK_H 28 #include <uhd/usrp/multi_usrp.hpp> 75 virtual void set_subdev_spec(
const std::string &spec,
size_t mboard = 0) = 0;
83 virtual std::string get_subdev_spec(
size_t mboard = 0) = 0;
88 virtual size_t get_num_mboards() = 0;
95 virtual void set_samp_rate(
double rate) = 0;
103 virtual double get_samp_rate(
void) = 0;
110 virtual ::uhd::meta_range_t get_samp_rates(
void) = 0;
119 virtual ::uhd::tune_result_t set_center_freq(
120 const ::uhd::tune_request_t tune_request,
137 return set_center_freq(::uhd::tune_request_t(freq), chan);
146 virtual double get_center_freq(
size_t chan = 0) = 0;
154 virtual ::uhd::freq_range_t get_freq_range(
size_t chan = 0) = 0;
162 virtual void set_gain(
double gain,
size_t chan = 0) = 0;
171 virtual void set_gain(
double gain,
172 const std::string &name,
173 size_t chan = 0) = 0;
191 virtual void set_normalized_gain(
double norm_gain,
size_t chan = 0) = 0;
199 virtual double get_gain(
size_t chan = 0) = 0;
208 virtual double get_gain(
const std::string &name,
209 size_t chan = 0) = 0;
222 virtual double get_normalized_gain(
size_t chan = 0) = 0;
230 virtual std::vector<std::string> get_gain_names(
size_t chan = 0) = 0;
238 virtual ::uhd::gain_range_t get_gain_range(
size_t chan = 0) = 0;
247 virtual ::uhd::gain_range_t get_gain_range(
const std::string &name,
248 size_t chan = 0) = 0;
256 virtual void set_antenna(
const std::string &ant,
257 size_t chan = 0) = 0;
265 virtual std::string get_antenna(
size_t chan = 0) = 0;
273 virtual std::vector<std::string> get_antennas(
size_t chan = 0) = 0;
281 virtual void set_bandwidth(
double bandwidth,
size_t chan = 0) = 0;
289 virtual double get_bandwidth(
size_t chan = 0) = 0;
297 virtual ::uhd::freq_range_t get_bandwidth_range(
size_t chan = 0) = 0;
305 virtual ::uhd::sensor_value_t get_sensor(
const std::string &name,
306 size_t chan = 0) = 0;
313 virtual std::vector<std::string> get_sensor_names(
size_t chan = 0) = 0;
319 return this->get_sensor(name, chan);
325 return this->get_sensor_names(chan);
335 virtual ::uhd::sensor_value_t get_mboard_sensor(
const std::string &name,
336 size_t mboard = 0) = 0;
344 virtual std::vector<std::string> get_mboard_sensor_names(
size_t mboard = 0) = 0;
352 virtual std::string get_time_source(
const size_t mboard) = 0;
360 virtual std::vector<std::string> get_time_sources(
const size_t mboard) = 0;
371 virtual void set_clock_source(
const std::string &source,
372 const size_t mboard = 0) = 0;
380 virtual std::string get_clock_source(
const size_t mboard) = 0;
388 virtual std::vector<std::string> get_clock_sources(
const size_t mboard) = 0;
396 virtual double get_clock_rate(
size_t mboard = 0) = 0;
404 virtual void set_clock_rate(
double rate,
size_t mboard = 0) = 0;
412 virtual ::uhd::time_spec_t get_time_now(
size_t mboard = 0) = 0;
419 virtual ::uhd::time_spec_t get_time_last_pps(
size_t mboard = 0) = 0;
426 virtual void set_time_now(const ::uhd::time_spec_t &time_spec,
size_t mboard = 0) = 0;
432 virtual void set_time_next_pps(const ::uhd::time_spec_t &time_spec) = 0;
438 virtual void set_time_unknown_pps(const ::uhd::time_spec_t &time_spec) = 0;
450 virtual void set_command_time(const ::uhd::time_spec_t &time_spec,
451 size_t mboard = 0) = 0;
458 virtual void clear_command_time(
size_t mboard = 0) = 0;
465 virtual ::uhd::usrp::dboard_iface::sptr get_dboard_iface(
size_t chan = 0) = 0;
473 virtual ::uhd::usrp::multi_usrp::sptr get_device(
void) = 0;
484 virtual void set_user_register(
const uint8_t addr,
486 size_t mboard = 0) = 0;
495 virtual void set_clock_config(const ::uhd::clock_config_t &clock_config,
496 size_t mboard = 0) = 0;
507 virtual void set_time_source(
const std::string &source,
508 const size_t mboard = 0) = 0;
525 virtual void set_stream_args(const ::uhd::stream_args_t &stream_args) = 0;
535 virtual std::vector<std::string> get_gpio_banks(
const size_t mboard) = 0;
553 virtual void set_gpio_attr(
554 const std::string &bank,
555 const std::string &attr,
556 const boost::uint32_t value,
557 const boost::uint32_t mask = 0xffffffff,
558 const size_t mboard = 0
577 virtual boost::uint32_t get_gpio_attr(
578 const std::string &bank,
579 const std::string &attr,
580 const size_t mboard = 0
GR_UHD_API const pmt::pmt_t cmd_mboard_key()
boost::shared_ptr< io_signature > sptr
Definition: io_signature.h:45
Definition: usrp_block.h:59
GR_UHD_API const pmt::pmt_t cmd_tune_key()
GR_UHD_API const pmt::pmt_t ant_direction_rx()
GR_UHD_API const pmt::pmt_t cmd_bandwidth_key()
GR_UHD_API const pmt::pmt_t cmd_lo_freq_key()
::uhd::tune_result_t set_center_freq(double freq, size_t chan=0)
Definition: usrp_block.h:135
Definition: usrp_sink.h:30
GR_UHD_API const pmt::pmt_t ant_direction_tx()
usrp_block()
Definition: usrp_block.h:62
GR_UHD_API const pmt::pmt_t cmd_tag_key()
Include this header to use the message passing features.
Definition: logger.h:695
GR_UHD_API const pmt::pmt_t cmd_dsp_freq_key()
synchronous 1:1 input to output with historyOverride work to provide the signal processing implementa...
Definition: sync_block.h:37
GR_UHD_API const pmt::pmt_t cmd_lo_offset_key()
GR_UHD_API const pmt::pmt_t cmd_direction_key()
#define GR_UHD_API
Definition: gr-uhd/include/gnuradio/uhd/api.h:30
GR_UHD_API const pmt::pmt_t cmd_gain_key()
GR_UHD_API const pmt::pmt_t cmd_chan_key()
GR_UHD_API const pmt::pmt_t cmd_antenna_key()
GR_UHD_API const pmt::pmt_t cmd_time_key()
std::vector< std::string > get_dboard_sensor_names(size_t chan=0)
DEPRECATED use get_sensor_names.
Definition: usrp_block.h:323
::uhd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan=0)
DEPRECATED use get_sensor.
Definition: usrp_block.h:316
boost::intrusive_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting). See http://www.boost.org/libs/smart_ptr/smart_ptr.htm
Definition: pmt.h:56
GR_UHD_API const pmt::pmt_t cmd_rate_key()
GR_UHD_API const pmt::pmt_t cmd_freq_key()