23 #ifndef INCLUDED_GR_UHD_USRP_BLOCK_H 24 #define INCLUDED_GR_UHD_USRP_BLOCK_H 28 #include <uhd/usrp/multi_usrp.hpp> 74 virtual void set_subdev_spec(
const std::string& spec,
size_t mboard = 0) = 0;
82 virtual std::string get_subdev_spec(
size_t mboard = 0) = 0;
87 virtual size_t get_num_mboards() = 0;
94 virtual void set_samp_rate(
double rate) = 0;
102 virtual double get_samp_rate(
void) = 0;
109 virtual ::uhd::meta_range_t get_samp_rates(
void) = 0;
118 virtual ::uhd::tune_result_t set_center_freq(const ::uhd::tune_request_t tune_request,
119 size_t chan = 0) = 0;
134 return set_center_freq(::uhd::tune_request_t(freq), chan);
143 virtual double get_center_freq(
size_t chan = 0) = 0;
151 virtual ::uhd::freq_range_t get_freq_range(
size_t chan = 0) = 0;
159 virtual void set_gain(
double gain,
size_t chan = 0) = 0;
168 virtual void set_gain(
double gain,
const std::string& name,
size_t chan = 0) = 0;
186 virtual void set_normalized_gain(
double norm_gain,
size_t chan = 0) = 0;
194 virtual double get_gain(
size_t chan = 0) = 0;
203 virtual double get_gain(
const std::string& name,
size_t chan = 0) = 0;
216 virtual double get_normalized_gain(
size_t chan = 0) = 0;
224 virtual std::vector<std::string> get_gain_names(
size_t chan = 0) = 0;
232 virtual ::uhd::gain_range_t get_gain_range(
size_t chan = 0) = 0;
241 virtual ::uhd::gain_range_t get_gain_range(
const std::string& name,
242 size_t chan = 0) = 0;
250 virtual void set_antenna(
const std::string& ant,
size_t chan = 0) = 0;
258 virtual std::string get_antenna(
size_t chan = 0) = 0;
266 virtual std::vector<std::string> get_antennas(
size_t chan = 0) = 0;
274 virtual void set_bandwidth(
double bandwidth,
size_t chan = 0) = 0;
282 virtual double get_bandwidth(
size_t chan = 0) = 0;
290 virtual ::uhd::freq_range_t get_bandwidth_range(
size_t chan = 0) = 0;
298 virtual ::uhd::sensor_value_t get_sensor(
const std::string& name,
299 size_t chan = 0) = 0;
306 virtual std::vector<std::string> get_sensor_names(
size_t chan = 0) = 0;
311 return this->get_sensor(name, chan);
317 return this->get_sensor_names(chan);
327 virtual ::uhd::sensor_value_t get_mboard_sensor(
const std::string& name,
328 size_t mboard = 0) = 0;
336 virtual std::vector<std::string> get_mboard_sensor_names(
size_t mboard = 0) = 0;
344 virtual std::string get_time_source(
const size_t mboard) = 0;
352 virtual std::vector<std::string> get_time_sources(
const size_t mboard) = 0;
363 virtual void set_clock_source(
const std::string& source,
const size_t mboard = 0) = 0;
371 virtual std::string get_clock_source(
const size_t mboard) = 0;
379 virtual std::vector<std::string> get_clock_sources(
const size_t mboard) = 0;
387 virtual double get_clock_rate(
size_t mboard = 0) = 0;
395 virtual void set_clock_rate(
double rate,
size_t mboard = 0) = 0;
403 virtual ::uhd::time_spec_t get_time_now(
size_t mboard = 0) = 0;
410 virtual ::uhd::time_spec_t get_time_last_pps(
size_t mboard = 0) = 0;
417 virtual void set_time_now(const ::uhd::time_spec_t& time_spec,
size_t mboard = 0) = 0;
423 virtual void set_time_next_pps(const ::uhd::time_spec_t& time_spec) = 0;
429 virtual void set_time_unknown_pps(const ::uhd::time_spec_t& time_spec) = 0;
441 virtual void set_command_time(const ::uhd::time_spec_t& time_spec,
442 size_t mboard = 0) = 0;
449 virtual void clear_command_time(
size_t mboard = 0) = 0;
456 virtual ::uhd::usrp::dboard_iface::sptr get_dboard_iface(
size_t chan = 0) = 0;
464 virtual ::uhd::usrp::multi_usrp::sptr get_device(
void) = 0;
476 set_user_register(
const uint8_t addr,
const uint32_t data,
size_t mboard = 0) = 0;
487 virtual void set_time_source(
const std::string& source,
const size_t mboard = 0) = 0;
504 virtual void set_stream_args(const ::uhd::stream_args_t& stream_args) = 0;
514 virtual std::vector<std::string> get_gpio_banks(
const size_t mboard) = 0;
532 virtual void set_gpio_attr(
const std::string& bank,
533 const std::string& attr,
534 const boost::uint32_t value,
535 const boost::uint32_t mask = 0xffffffff,
536 const size_t mboard = 0) = 0;
554 virtual boost::uint32_t get_gpio_attr(
const std::string& bank,
555 const std::string& attr,
556 const size_t mboard = 0) = 0;
568 virtual std::vector<std::string>
569 get_filter_names(
const std::string& search_mask =
"") = 0;
578 virtual void set_filter(
const std::string& path,
579 ::uhd::filter_info_base::sptr filter) = 0;
586 virtual ::uhd::filter_info_base::sptr get_filter(
const std::string& path) = 0;
GR_UHD_API const pmt::pmt_t cmd_mboard_key()
boost::shared_ptr< io_signature > sptr
Definition: io_signature.h:46
Definition: usrp_block.h:59
GR_UHD_API const pmt::pmt_t cmd_tune_key()
boost::shared_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:96
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:132
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()
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:43
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:315
::uhd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan=0)
DEPRECATED use get_sensor.
Definition: usrp_block.h:309
GR_UHD_API const pmt::pmt_t cmd_rate_key()
GR_UHD_API const pmt::pmt_t cmd_freq_key()